text:
<?php

// API key must match what is sent from the client
$apikey="";

//dataconnect to MySQL
$hostname = "";
$username = "";
$password = "";
$schema = "yamsdb";
$port = "3306";

$link = mysqli_connect($hostname, $username, $password, $schema, $port);

if (!$link) {
    die('Connect Error (' . mysqli_connect_errno() . ') '
            . mysqli_connect_error());
}

?>

redpajama_set_name: RedPajamaGithub


text:
MWParserFromHell v\ |version| Documentation
===========================================

:mod:`mwparserfromhell` (the *MediaWiki Parser from Hell*) is a Python package
that provides an easy-to-use and outrageously powerful parser for MediaWiki_
wikicode. It supports Python 3.5+.

Developed by Earwig_ with contributions from `Σ`_, Legoktm_, and others.
Development occurs on GitHub_.

.. _MediaWiki:            https://www.mediawiki.org
.. _Earwig:               https://en.wikipedia.org/wiki/User:The_Earwig
.. _Σ:                    https://en.wikipedia.org/wiki/User:%CE%A3
.. _Legoktm:              https://en.wikipedia.org/wiki/User:Legoktm
.. _GitHub:               https://github.com/earwig/mwparserfromhell

Installation
------------

The easiest way to install the parser is through the `Python Package Index`_;
you can install the latest release with ``pip install mwparserfromhell``
(`get pip`_). Make sure your pip is up-to-date first, especially on Windows.

Alternatively, get the latest development version::

    git clone https://github.com/earwig/mwparserfromhell.git
    cd mwparserfromhell
    python setup.py install

The comprehensive unit testing suite requires `pytest`_ (``pip install pytest``)
and can be run with ``python -m pytest``.

.. _Python Package Index:   https://pypi.org/
.. _get pip:                https://pypi.org/project/pip/
.. _pytest:                 https://docs.pytest.org/

Contents
--------

.. toctree::
   :maxdepth: 2

   usage
   limitations
   integration
   changelog
   API Reference <api/modules>

Indices and tables
------------------

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


text:
@implementation UserData (CoreDataProperties)

+ (NSFetchRequest<UserData *> *)fetchRequest {
	return [[NSFetchRequest alloc] initWithEntityName:@"UserData"];
}

@dynamic iid;
@dynamic cname;
@dynamic own;

@end


text:
describe ActionDispatcher::Dispatcher do
  let(:action_name) { :add }

  before(:each) do
    @dispatcher = ActionDispatcher::Dispatcher.new
  end

  it 'executes chosen action with its parameters' do
    @dispatcher.add_action(action_name, AdderAction.new)

    result = @dispatcher.execute(action_name, operand1: 1, operand2: 2)

    expect(result).to eq(3)
  end

  context 'when action does not have any parameters' do
    it 'executes the action without any parameters' do
      @dispatcher.add_action(:without_parameters, ActionWithoutParameters.new)

      result = @dispatcher.execute(:without_parameters)

      expect(result).to eq(ActionWithoutParameters::RESULT)
    end

    context 'and action dispatcher receives parameters' do
      it 'executes the action without any parameters' do
        @dispatcher.add_action(:without_parameters, ActionWithoutParameters.new)

        result = @dispatcher.execute(:without_parameters, operand1: 1)

        expect(result).to eq(ActionWithoutParameters::RESULT)
      end
    end
  end

  context 'when action has different number of parameters' do
    it 'executes action with parameters' do
      @dispatcher.add_action(action_name, AdderAction.new)

      result = @dispatcher.execute(action_name, \
                                   operand1: 1, operand2: 2, operand3: 3)

      expect(result).to eq(3)
    end

    context 'and dispatch does not pass parameters' do
      it 'raises an error' do
        @dispatcher.add_action(action_name, AdderAction.new)

        expect { @dispatcher.execute(action_name) }.to \
          raise_error(ArgumentError)
      end
    end
  end

  context 'when action has keyword parameters' do
    it 'executes action with parameters' do
      @dispatcher.add_action(action_name, AdderActionWithKeywordParameters.new)

      result = @dispatcher.execute(action_name, operand1: 1, operand2: 2)

      expect(result).to eq(3)
    end
  end

  context 'when action is not found' do
    it 'raises an error' do
      expect { @dispatcher.execute(:non_existent, {}) }.to \
        raise_error(ActionDispatcher::ActionNotFoundError)
    end
  end

  context 'when adding an action' do
    it 'adds the action to dispatcher' do
      @dispatcher.add_action(action_name, AdderAction.new)

      expect(@dispatcher).to include(action_name)
    end
    context 'and has been already added' do
      it 'raises an error' do
        @dispatcher.add_action(action_name, AdderAction.new)

        expect { @dispatcher.add_action(action_name, AdderAction.new) }.to \
          raise_error(ActionDispatcher::ActionAlreadyExistsError)
      end
    end
  end
end

class AdderAction
  def execute(params)
    params[:operand1] + params[:operand2]
  end
end

class AdderActionWithKeywordParameters
  def execute(operand1:, operand2:)
    operand1 + operand2
  end
end

class ActionWithoutParameters
  RESULT = 'a result'

  def execute
    RESULT
  end
end


text:
<bill session="115" type="s" number="644" updated="2017-08-10T13:24:07Z">
  <state datetime="2017-03-30">REPORTED</state>
  <status>
    <unknown datetime="2017-03-30"/>
  </status>
  <introduced datetime="2017-03-15"/>
  <titles>
    <title type="short" as="introduced">Medgar Evers House Study Act</title>
    <title type="short" as="introduced">Medgar Evers House Study Act</title>
    <title type="short" as="reported to senate">Medgar Evers House Study Act</title>
    <title type="short" as="reported to senate">Medgar Evers House Study Act</title>
    <title type="official" as="introduced">A bill to authorize the Secretary of the Interior to conduct a special resource study of the Medgar Evers House, located in Jackson, Mississippi, and for other purposes.</title>
    <title type="display">Medgar Evers House Study Act</title>
  </titles>
  <sponsor bioguide_id="C000567"/>
  <cosponsors>
    <cosponsor bioguide_id="W000437" joined="2017-03-15"/>
  </cosponsors>
  <actions>
    <action datetime="2017-03-15">
      <text>Introduced in Senate</text>
    </action>
    <action datetime="2017-03-15" state="REFERRED">
      <text>Read twice and referred to the Committee on Energy and Natural Resources.</text>
    </action>
    <calendar datetime="2017-03-30" state="REPORTED">
      <text>Committee on Energy and Natural Resources. Ordered to be reported with an amendment in the nature of a substitute favorably.</text>
    </calendar>
    <action datetime="2017-05-09">
      <text>Committee on Energy and Natural Resources. Reported by Senator Murkowski with an amendment in the nature of a substitute. With written report No. 115-46.</text>
    </action>
    <calendar datetime="2017-05-09" calendar="Senate Legislative" under="General Orders" number="59">
      <text>Placed on Senate Legislative Calendar under General Orders. Calendar No. 59.</text>
    </calendar>
  </actions>
  <committees>
    <committee subcommittee="" code="SSEG" name="Senate Energy and Natural Resources" activity="Reporting, Markup, Referral"/>
  </committees>
  <relatedbills>
    <bill type="h" session="115" relation="unknown" number="1715"/>
  </relatedbills>
  <subjects>
    <term name="Public lands and natural resources"/>
    <term name="Government studies and investigations"/>
    <term name="Historic sites and heritage areas"/>
    <term name="Land use and conservation"/>
    <term name="Mississippi"/>
    <term name="Parks, recreation areas, trails"/>
    <term name="Racial and ethnic relations"/>
    <term name="U.S. history"/>
  </subjects>
  <amendments/>
  <summary date="2017-03-15T04:00:00Z" status="Introduced in Senate">Medgar Evers House Study Act

 This bill directs the Department of the Interior to conduct a special resource study of the home of the late civil rights activist Medgar Evers, which is located at 2332 Margaret Walker Alexander Drive in Jackson, Mississippi.

 Interior shall: (1) evaluate the national significance of the site, and (2) determine the suitability and feasibility of designating it as a unit of the National Park System.</summary>
  <committee-reports>
    <report>S. Rept. 115-46</report>
  </committee-reports>
</bill>


text:
namespace ClassBox
{
    using System;

    public class Box
    {
        private double length;
        private double width;
        private double height;

        public Box(double length, double width, double height)
        {
            this.Length = length;
            this.Width = width;
            this.Height = height;
        }

        private double Length
        {
            set
            {
                if (value <= 0)
                {
                    throw new ArgumentException($"{nameof(Length)} cannot be zero or negative.");
                }

                this.length = value;
            }
        }

        private double Width
        {
            set
            {
                if (value <= 0)
                {
                    throw new ArgumentException($"{nameof(Width)} cannot be zero or negative.");
                }

                this.width = value;
            }
        }

        private double Height
        {
            set
            {
                if (value <= 0)
                {
                    throw new ArgumentException($"{nameof(Height)} cannot be zero or negative.");
                }
                this.height = value;
            }
        }

        public double GetSurfaceArea()
        {
            return 2 * this.length * this.width + 2 * this.length * this.height + 2 * this.width * this.height;
        }

        public double GetLateralSurfaceArea()
        {
            return 2 * this.length * this.height + 2 * this.width * this.height;
        }

        public double GetVolume()
        {
            return this.length * this.height * this.width;
        }
    }
}


text:
import { assert, deprecate } from 'ember-metal/debug';
import { get } from 'ember-metal/property_get';

import EmberObject from 'ember-runtime/system/object';
import Evented from 'ember-runtime/mixins/evented';
import ActionHandler, { deprecateUnderscoreActions } from 'ember-runtime/mixins/action_handler';
import { typeOf } from 'ember-runtime/utils';

import Renderer from 'ember-metal-views/renderer';
import { cloneStates, states } from 'ember-views/views/states';
import { internal } from 'htmlbars-runtime';
import require from 'require';

function K() { return this; }

// Normally, the renderer is injected by the container when the view is looked
// up. However, if someone creates a view without looking it up via the
// container (e.g. `Ember.View.create().append()`) then we create a fallback
// DOM renderer that is shared. In general, this path should be avoided since
// views created this way cannot run in a node environment.
var renderer;

/**
  `Ember.CoreView` is an abstract class that exists to give view-like behavior
  to both Ember's main view class `Ember.View` and other classes that don't need
  the fully functionaltiy of `Ember.View`.

  Unless you have specific needs for `CoreView`, you will use `Ember.View`
  in your applications.

  @class CoreView
  @namespace Ember
  @extends Ember.Object
  @deprecated Use `Ember.View` instead.
  @uses Ember.Evented
  @uses Ember.ActionHandler
  @private
*/
const CoreView = EmberObject.extend(Evented, ActionHandler, {
  isView: true,

  _states: cloneStates(states),

  init() {
    this._super(...arguments);
    this._state = 'preRender';
    this._currentState = this._states.preRender;
    this._isVisible = get(this, 'isVisible');

    // Fallback for legacy cases where the view was created directly
    // via `create()` instead of going through the container.
    if (!this.renderer) {
      var DOMHelper = domHelper();
      renderer = renderer || new Renderer(new DOMHelper());
      this.renderer = renderer;
    }

    this._destroyingSubtreeForView = null;
    this._dispatching = null;
  },

  /**
    If the view is currently inserted into the DOM of a parent view, this
    property will point to the parent of the view.

    @property parentView
    @type Ember.View
    @default null
    @private
  */
  parentView: null,

  _state: null,

  instrumentName: 'core_view',

  instrumentDetails(hash) {
    hash.object = this.toString();
    hash.containerKey = this._debugContainerKey;
    hash.view = this;
  },

  /**
    Override the default event firing from `Ember.Evented` to
    also call methods with the given name.

    @method trigger
    @param name {String}
    @private
  */
  trigger() {
    this._super(...arguments);
    var name = arguments[0];
    var method = this[name];
    if (method) {
      var length = arguments.length;
      var args = new Array(length - 1);
      for (var i = 1; i < length; i++) {
        args[i - 1] = arguments[i];
      }
      return method.apply(this, args);
    }
  },

  has(name) {
    return typeOf(this[name]) === 'function' || this._super(name);
  },

  destroy() {
    if (!this._super(...arguments)) { return; }

    this._currentState.cleanup(this);

    // If the destroyingSubtreeForView property is not set but we have an
    // associated render node, it means this view is being destroyed from user
    // code and not via a change in the templating layer (like an {{if}}
    // becoming falsy, for example).  In this case, it is our responsibility to
    // make sure that any render nodes created as part of the rendering process
    // are cleaned up.
    if (!this.ownerView._destroyingSubtreeForView && this._renderNode) {
      assert('BUG: Render node exists without concomitant env.', this.ownerView.env);
      internal.clearMorph(this._renderNode, this.ownerView.env, true);
    }

    return this;
  },

  clearRenderedChildren: K,
  _transitionTo: K,
  destroyElement: K
});

deprecateUnderscoreActions(CoreView);

CoreView.reopenClass({
  isViewFactory: true
});

export var DeprecatedCoreView = CoreView.extend({
  init() {
    deprecate(
      'Ember.CoreView is deprecated. Please use Ember.View.',
      false, { id: 'ember-views.core-view', until: '2.4.0' }
    );
    this._super(...arguments);
  }
});

var _domHelper;
function domHelper() {
  return _domHelper = _domHelper || require('ember-htmlbars/system/dom-helper').default;
}

export default CoreView;


text:
lang:   RU
title:  Подсчет букв
answer: ^\d+$
ok:     Ага! length - это тоже метод!
error:
---

Вы уже попробовали использовать __method__ reverse на своем имени! Заключив имя в кавычки, Вы создали строку. Затем Вы вызвали метод reverse, который работает со строками и разворачивает ее задом наперед.

А теперь давайте посмотрим, сколько букв в Вашем имени:

    "Ivan".length


text:
package com.cqut.compusEC.controller;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import net.sf.json.JSONObject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cqut.compusEC.service.RoleService;

@Controller
@RequestMapping("/roleController")
public class RoleController {

	@Resource
	private RoleService roleService;

	@RequestMapping("/getRoleList")
    @ResponseBody
	public JSONObject getRoleList(int limit, int offset, String order, String sort){
		Map<String, Object> result = roleService.getRoleList(limit, offset, sort, order);
		return JSONObject.fromObject(result);
	}

	@RequestMapping("/addRole")
    @ResponseBody
	public JSONObject addRoleInfo(String roleName, String remarks){
		Map<String, Object> result = roleService.addRoleInfo(roleName, remarks);
		return JSONObject.fromObject(result);
	}

	@RequestMapping("/editRole")
    @ResponseBody
	public JSONObject editRoleInfo(String roleId, String roleName, String remarks){
		Map<String, Object> result = roleService.editRoleInfo(roleId, roleName, remarks);
		return JSONObject.fromObject(result);
	}

	@RequestMapping("/delRole")
    @ResponseBody
	public JSONObject delRole(String roleIds){
		Map<String, Object> result = new HashMap<String, Object>();
		try {
			result = roleService.delRole(roleIds);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			result.put("resultCode", "9999");
			result.put("resultMessage", "删除角色异常");
		}
		return JSONObject.fromObject(result);
	}

	@RequestMapping("/getRoleModuleListInfo")
    @ResponseBody
	public JSONObject getRoleModuleListInfo(String roleId){
		Map<String, Object> result = roleService.getRoleModuleListInfo(roleId);
		return JSONObject.fromObject(result);
	}

	@RequestMapping("/saveRoleModuleInfo")
    @ResponseBody
	public JSONObject saveRoleModuleInfo(String roleId, String moduleIds){
		Map<String, Object> result = roleService.saveRoleModuleInfo(roleId, moduleIds);
		return JSONObject.fromObject(result);
	}
}


text:
Dir[File.join(Rails.root, 'lib', 'caching', '*.rb')].each { |file| require file }

# REDIS_URL env variable will be used automatically if set,
# otherwise, default will be 'redis://127.0.0.1:6379'
#
Caching.backend = if Rails.env.production?
                    Caching::RedisStore
                  else
                    Caching::MemoryStore
                  end


text:
<?php

	return array(

	/**
	 * Package URI
	 *
	 * @type string
	 */
	'uri' => 'administrator',

	/**
	 * Page title
	 *
	 * @type string
	 */
	'title' => 'Viajes Transparentes',

	/**
	 * The path to your model config directory
	 *
	 * @type string
	 */
	'model_config_path' => app('path') . '/config/administrator',

	/**
	 * The path to your settings config directory
	 *
	 * @type string
	 */
	'settings_config_path' => app('path') . '/config/administrator/settings',

	/**
	 * The menu structure of the site. For models, you should either supply the name of a model config file or an array of names of model config
	 * files. The same applies to settings config files, except you must prepend 'settings.' to the settings config file name. You can also add
	 * custom pages by prepending a view path with 'page.'. By providing an array of names, you can group certain models or settings pages
	 * together. Each name needs to either have a config file in your model config path, settings config path with the same name, or a path to a
	 * fully-qualified Laravel view. So 'users' would require a 'users.php' file in your model config path, 'settings.site' would require a
	 * 'site.php' file in your settings config path, and 'page.foo.test' would require a 'test.php' or 'test.blade.php' file in a 'foo' directory
	 * inside your view directory.
	 *
	 * @type array
	 *
	 * 	array(
	 *		'E-Commerce' => array('collections', 'products', 'product_images', 'orders'),
	 *		'homepage_sliders',
	 *		'users',
	 *		'roles',
	 *		'colors',
	 *		'Settings' => array('settings.site', 'settings.ecommerce', 'settings.social'),
	 * 		'Analytics' => array('E-Commerce' => 'page.ecommerce.analytics'),
	 *	)
	 */
	'menu' => array('Config. de Usuarios'=> array('users','servidores','puestos','unidadAdministrativa','cargos','remuneraciones'),
					'Config. Geográfica' => array('countries','states','cities'),
					'Config. de Viajes'  => array('tipoComision','temas','mecanismoOrigen','instGenera','companiaTransporte'),
					'Config. de Test'  => array('hospedaje','viaticos','pasaje','eventos','viajes'),
					),

	/**
	 * The permission option is the highest-level authentication check that lets you define a closure that should return true if the current user
	 * is allowed to view the admin section. Any "falsey" response will send the user back to the 'login_path' defined below.
	 *
	 * @type closure
	 */
	'permission'=> function()
	{
		$isAuth =  false;
		if (Auth::check() && Auth::user()->role_id == 1) {
			$isAuth =  true;
		}
		return $isAuth;
	},

	/**
	 * This determines if you will have a dashboard (whose view you provide in the dashboard_view option) or a non-dashboard home
	 * page (whose menu item you provide in the home_page option)
	 *
	 * @type bool
	 */
	'use_dashboard' => false,

	/**
	 * If you want to create a dashboard view, provide the view string here.
	 *
	 * @type string
	 */
	'dashboard_view' => '',

	/**
	 * The menu item that should be used as the default landing page of the administrative section
	 *
	 * @type string
	 */
	'home_page' => 'users',

	/**
	 * The route to which the user will be taken when they click the "back to site" button
	 *
	 * @type string
	 */
	'back_to_site_path' => '/',

	/**
	 * The login path is the path where Administrator will send the user if they fail a permission check
	 *
	 * @type string
	 */
	'login_path' => 'users/login',

	/**
	 * The logout path is the path where Administrator will send the user when they click the logout link
	 *
	 * @type string
	 */
	'logout_path' => 'users/logout',

	/**
	 * This is the key of the return path that is sent with the redirection to your login_action. Session::get('redirect') will hold the return URL.
	 *
	 * @type string
	 */
	'login_redirect_key' => 'redirect',

	/**
	 * Global default rows per page
	 *
	 * @type NULL|int
	 */
	'global_rows_per_page' => 20,

	/**
	 * An array of available locale strings. This determines which locales are available in the languages menu at the top right of the Administrator
	 * interface.
	 *
	 * @type array
	 */
	'locales' => array(),

);


text:
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;

namespace Belikov.GenuineChannels.BroadcastEngine
{
	/// <summary>
	/// Executes specified invocation of the object localted in the current appdomain.
	/// </summary>
	public class LocalPerformer
	{
		/// <summary>
		/// Constructs an instance of the LocalPerformer class.
		/// </summary>
		/// <param name="msg">The invocation to be executed.</param>
		/// <param name="resultCollector">The Result Collector.</param>
		/// <param name="mbr">The target.</param>
		public LocalPerformer(IMessage msg, ResultCollector resultCollector, MarshalByRefObject mbr)
		{
			this._msg = msg;
			this._resultCollector = resultCollector;
			this._mbr = mbr;
			this._mbrUri = RemotingServices.GetObjectUri(mbr);
		}

		private IMessage _msg;
		private ResultCollector _resultCollector;
		private MarshalByRefObject _mbr;
		private string _mbrUri;

		/// <summary>
		/// Invokes the target.
		/// </summary>
		/// <param name="state">Ignored.</param>
		public void Call(object state)
		{
			try
			{
				IMethodReturnMessage ret = RemotingServices.ExecuteMessage(this._mbr, (IMethodCallMessage) this._msg);
				this._resultCollector.ParseResult(this._mbrUri, ret, null);
			}
			catch(Exception ex)
			{
				this._resultCollector.ParseResult(this._mbrUri, null, ex);
			}
		}
	}
}


text:
<?php

namespace Drupal\text\Plugin\Field\FieldFormatter;

use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Security\TrustedCallbackInterface;

/**
 * Plugin implementation of the 'text_trimmed' formatter.
 *
 * Note: This class also contains the implementations used by the
 * 'text_summary_or_trimmed' formatter.
 *
 * @see \Drupal\text\Field\Formatter\TextSummaryOrTrimmedFormatter
 *
 * @FieldFormatter(
 *   id = "text_trimmed",
 *   label = @Translation("Trimmed"),
 *   field_types = {
 *     "text",
 *     "text_long",
 *     "text_with_summary"
 *   },
 *   quickedit = {
 *     "editor" = "form"
 *   }
 * )
 */
class TextTrimmedFormatter extends FormatterBase implements TrustedCallbackInterface {

  /**
   * {@inheritdoc}
   */
  public static function defaultSettings() {
    return [
      'trim_length' => '600',
    ] + parent::defaultSettings();
  }

  /**
   * {@inheritdoc}
   */
  public function settingsForm(array $form, FormStateInterface $form_state) {
    $element['trim_length'] = [
      '#title' => t('Trimmed limit'),
      '#type' => 'number',
      '#field_suffix' => t('characters'),
      '#default_value' => $this->getSetting('trim_length'),
      '#description' => t('If the summary is not set, the trimmed %label field will end at the last full sentence before this character limit.', ['%label' => $this->fieldDefinition->getLabel()]),
      '#min' => 1,
      '#required' => TRUE,
    ];
    return $element;
  }

  /**
   * {@inheritdoc}
   */
  public function settingsSummary() {
    $summary = [];
    $summary[] = t('Trimmed limit: @trim_length characters', ['@trim_length' => $this->getSetting('trim_length')]);
    return $summary;
  }

  /**
   * {@inheritdoc}
   */
  public function viewElements(FieldItemListInterface $items, $langcode) {
    $elements = [];

    $render_as_summary = function (&$element) {
      // Make sure any default #pre_render callbacks are set on the element,
      // because text_pre_render_summary() must run last.
      $element += \Drupal::service('element_info')->getInfo($element['#type']);
      // Add the #pre_render callback that renders the text into a summary.
      $element['#pre_render'][] = [TextTrimmedFormatter::class, 'preRenderSummary'];
      // Pass on the trim length to the #pre_render callback via a property.
      $element['#text_summary_trim_length'] = $this->getSetting('trim_length');
    };

    // The ProcessedText element already handles cache context & tag bubbling.
    // @see \Drupal\filter\Element\ProcessedText::preRenderText()
    foreach ($items as $delta => $item) {
      $elements[$delta] = [
        '#type' => 'processed_text',
        '#text' => NULL,
        '#format' => $item->format,
        '#langcode' => $item->getLangcode(),
      ];

      if ($this->getPluginId() == 'text_summary_or_trimmed' && !empty($item->summary)) {
        $elements[$delta]['#text'] = $item->summary;
      }
      else {
        $elements[$delta]['#text'] = $item->value;
        $render_as_summary($elements[$delta]);
      }
    }

    return $elements;
  }

  /**
   * Pre-render callback: Renders a processed text element's #markup as a summary.
   *
   * @param array $element
   *   A structured array with the following key-value pairs:
   *   - #markup: the filtered text (as filtered by filter_pre_render_text())
   *   - #format: containing the machine name of the filter format to be used to
   *     filter the text. Defaults to the fallback format. See
   *     filter_fallback_format().
   *   - #text_summary_trim_length: the desired character length of the summary
   *     (used by text_summary())
   *
   * @return array
   *   The passed-in element with the filtered text in '#markup' trimmed.
   *
   * @see filter_pre_render_text()
   * @see text_summary()
   */
  public static function preRenderSummary(array $element) {
    $element['#markup'] = text_summary($element['#markup'], $element['#format'], $element['#text_summary_trim_length']);
    return $element;
  }

  /**
   * {@inheritdoc}
   */
  public static function trustedCallbacks() {
    return ['preRenderSummary'];
  }

}


text:
<!--
  ~ Waltz - Enterprise Architecture
  ~ Copyright (C) 2016, 2017, 2018, 2019 Waltz open source project
  ~ See README.md for more information
  ~
  ~ 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
  ~
  -->

<span ng-if="$ctrl.subscriptionStatus != 'NOT_APPLICABLE'">
    <button ng-if="$ctrl.subscriptionStatus === 'UNSUBSCRIBED'"
            ng-click="$ctrl.onSubscribe()"
            class="btn btn-xs btn-success wsa-action">
        Subscribe
    </button>
    <button ng-if="$ctrl.subscriptionStatus === 'SUBSCRIBED'"
            ng-click="$ctrl.onUnsubscribe()"
            class="btn btn-xs btn-warning wsa-action">
        Unsubscribe
    </button>

</span>


text:
from __future__ import unicode_literals

from django.db import models, migrations

class Migration(migrations.Migration):

    dependencies = [
        ('shopping', '0002_auto_20150119_0836'),
    ]

    operations = [
        migrations.CreateModel(
            name='SaleError',
            fields=[
                ('id', models.AutoField(auto_created=True, verbose_name='ID', primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('location', models.CharField(choices=[('C', 'Card'), ('A', 'Cart'), ('S', 'Sale'), ('I', 'Items')], max_length='1')),
                ('message', models.CharField(max_length='100')),
                ('problem', models.CharField(max_length='200')),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model,),
        ),
    ]


text:
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.bigquery.model;

/**
 * Model definition for TableReference.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the BigQuery API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class TableReference extends com.google.api.client.json.GenericJson {

  /**
   * [Required] The ID of the dataset containing this table.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String datasetId;

  /**
   * [Required] The ID of the project containing this table.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String projectId;

  /**
   * [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or
   * underscores (_). The maximum length is 1,024 characters.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String tableId;

  /**
   * [Required] The ID of the dataset containing this table.
   * @return value or {@code null} for none
   */
  public java.lang.String getDatasetId() {
    return datasetId;
  }

  /**
   * [Required] The ID of the dataset containing this table.
   * @param datasetId datasetId or {@code null} for none
   */
  public TableReference setDatasetId(java.lang.String datasetId) {
    this.datasetId = datasetId;
    return this;
  }

  /**
   * [Required] The ID of the project containing this table.
   * @return value or {@code null} for none
   */
  public java.lang.String getProjectId() {
    return projectId;
  }

  /**
   * [Required] The ID of the project containing this table.
   * @param projectId projectId or {@code null} for none
   */
  public TableReference setProjectId(java.lang.String projectId) {
    this.projectId = projectId;
    return this;
  }

  /**
   * [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or
   * underscores (_). The maximum length is 1,024 characters.
   * @return value or {@code null} for none
   */
  public java.lang.String getTableId() {
    return tableId;
  }

  /**
   * [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or
   * underscores (_). The maximum length is 1,024 characters.
   * @param tableId tableId or {@code null} for none
   */
  public TableReference setTableId(java.lang.String tableId) {
    this.tableId = tableId;
    return this;
  }

  @Override
  public TableReference set(String fieldName, Object value) {
    return (TableReference) super.set(fieldName, value);
  }

  @Override
  public TableReference clone() {
    return (TableReference) super.clone();
  }

}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.loganalytics.implementation;

import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.loganalytics.fluent.AvailableServiceTiersClient;
import com.azure.resourcemanager.loganalytics.fluent.models.AvailableServiceTierInner;
import java.util.List;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in AvailableServiceTiersClient. */
public final class AvailableServiceTiersClientImpl implements AvailableServiceTiersClient {
    /** The proxy service used to perform REST calls. */
    private final AvailableServiceTiersService service;

    /** The service client containing this operation class. */
    private final OperationalInsightsManagementClientImpl client;

    /**
     * Initializes an instance of AvailableServiceTiersClientImpl.
     *
     * @param client the instance of the service client containing this operation class.
     */
    AvailableServiceTiersClientImpl(OperationalInsightsManagementClientImpl client) {
        this.service =
            RestProxy
                .create(AvailableServiceTiersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
        this.client = client;
    }

    /**
     * The interface defining all the services for OperationalInsightsManagementClientAvailableServiceTiers to be used
     * by the proxy service to perform REST calls.
     */
    @Host("{$host}")
    @ServiceInterface(name = "OperationalInsightsM")
    private interface AvailableServiceTiersService {
        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
                + "/workspaces/{workspaceName}/availableServiceTiers")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<List<AvailableServiceTierInner>>> listByWorkspace(
            @HostParam("$host") String endpoint,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("workspaceName") String workspaceName,
            @QueryParam("api-version") String apiVersion,
            @HeaderParam("Accept") String accept,
            Context context);
    }

    /**
     * Gets the available service tiers for the workspace.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the available service tiers for the workspace along with {@link Response} on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<List<AvailableServiceTierInner>>> listByWorkspaceWithResponseAsync(
        String resourceGroupName, String workspaceName) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (workspaceName == null) {
            return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
        }
        final String apiVersion = "2020-08-01";
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .listByWorkspace(
                            this.client.getEndpoint(),
                            this.client.getSubscriptionId(),
                            resourceGroupName,
                            workspaceName,
                            apiVersion,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Gets the available service tiers for the workspace.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the available service tiers for the workspace along with {@link Response} on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<List<AvailableServiceTierInner>>> listByWorkspaceWithResponseAsync(
        String resourceGroupName, String workspaceName, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (workspaceName == null) {
            return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
        }
        final String apiVersion = "2020-08-01";
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .listByWorkspace(
                this.client.getEndpoint(),
                this.client.getSubscriptionId(),
                resourceGroupName,
                workspaceName,
                apiVersion,
                accept,
                context);
    }

    /**
     * Gets the available service tiers for the workspace.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the available service tiers for the workspace on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<List<AvailableServiceTierInner>> listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
        return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Gets the available service tiers for the workspace.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the available service tiers for the workspace.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public List<AvailableServiceTierInner> listByWorkspace(String resourceGroupName, String workspaceName) {
        return listByWorkspaceAsync(resourceGroupName, workspaceName).block();
    }

    /**
     * Gets the available service tiers for the workspace.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the available service tiers for the workspace along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<List<AvailableServiceTierInner>> listByWorkspaceWithResponse(
        String resourceGroupName, String workspaceName, Context context) {
        return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block();
    }
}


text:
package org.apache.ctakes.necontexts;

import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.tcas.Annotation;

public class ContextHitConsumerAdapter implements ContextHitConsumer {

	public void consumeHit(JCas jcas, Annotation focusAnnot, int scope, ContextHit ctxHit)
			throws AnalysisEngineProcessException {

	}

}


text: sudo docker run -p 8000:8000 intrepion-server


text:
package edu.wustl.catissuecore.dbunit.test;

import edu.wustl.catissuecore.domain.User;
import java.io.FileInputStream;

import org.dbunit.dataset.IDataSet;
import org.dbunit.dataset.xml.FlatXmlDataSet;
import org.dbunit.operation.DatabaseOperation;

import edu.wustl.catissuecore.domain.Address;
import edu.wustl.catissuecore.domain.CancerResearchGroup;
import edu.wustl.catissuecore.domain.Department;
import edu.wustl.catissuecore.domain.Institution;

import edu.wustl.common.util.global.Constants;

public class DepartmentDBTestcases extends DefaultCatissueDBUnitTestCase {

	public DepartmentDBTestcases() throws Exception
	{
		super();

	}
	public void testDepartmentCreate()
	{

		try
		{
			insertObjectsOf(Department.class);
			System.out.println("Inside Department...after insert...");
			assertTrue("DepartmentCreated",true);
		}catch(Exception e)
		{
			e.printStackTrace();
			fail("failed to insert Department");

		}
	}
	public void testDepartmentUpdate()
	{
		try
		{

			UpdateObjects(Department.class);
			assertTrue("DepartmentUpdated", true);
		}catch(Exception e)
		{
			e.printStackTrace();
			fail("failed to insert department");
		}
	}

}


text:
<?php

namespace CodeHobby;

use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'username', 'email', 'password',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
}


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>Code Coverage for /Applications/MAMP/htdocs/timjonathan/system/helpers</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="../.css/bootstrap.min.css" rel="stylesheet">
  <link href="../.css/style.css" rel="stylesheet">

/Applications/MAMP/htdocs/timjonathan/system

helpers

(Dashboard)

Code Coverage

Lines

Functions and Methods

Classes and Traits

      Total

           0.00% covered (danger)

0.00%

0 / 2674

n/a

0 / 0

n/a

0 / 0

       array_helper.php

           0.00% covered (danger)

0.00%

0 / 25

n/a

0 / 0

n/a

0 / 0

       captcha_helper.php

           0.00% covered (danger)

0.00%

0 / 202

n/a

0 / 0

n/a

0 / 0

       cookie_helper.php

           0.00% covered (danger)

0.00%

0 / 21

n/a

0 / 0

n/a

0 / 0

       date_helper.php

           0.00% covered (danger)

0.00%

0 / 397

n/a

0 / 0

n/a

0 / 0

       directory_helper.php

           0.00% covered (danger)

0.00%

0 / 31

n/a

0 / 0

n/a

0 / 0

       download_helper.php

           0.00% covered (danger)

0.00%

0 / 68

n/a

0 / 0

n/a

0 / 0

       email_helper.php

           0.00% covered (danger)

0.00%

0 / 13

n/a

0 / 0

n/a

0 / 0

       file_helper.php

           0.00% covered (danger)

0.00%

0 / 233

n/a

0 / 0

n/a

0 / 0

       form_helper.php

           0.00% covered (danger)

0.00%

0 / 547

n/a

0 / 0

n/a

0 / 0

       html_helper.php

           0.00% covered (danger)

0.00%

0 / 191

n/a

0 / 0

n/a

0 / 0

       inflector_helper.php

           0.00% covered (danger)

0.00%

0 / 149

n/a

0 / 0

n/a

0 / 0

       language_helper.php

           0.00% covered (danger)

0.00%

0 / 12

n/a

0 / 0

n/a

0 / 0

       number_helper.php

           0.00% covered (danger)

0.00%

0 / 34

n/a

0 / 0

n/a

0 / 0

       path_helper.php

           0.00% covered (danger)

0.00%

0 / 19

n/a

0 / 0

n/a

0 / 0

       security_helper.php

           0.00% covered (danger)

0.00%

0 / 35

n/a

0 / 0

n/a

0 / 0

       smiley_helper.php

           0.00% covered (danger)

0.00%

0 / 122

n/a

0 / 0

n/a

0 / 0

       string_helper.php

           0.00% covered (danger)

0.00%

0 / 108

n/a

0 / 0

n/a

0 / 0

       text_helper.php

           0.00% covered (danger)

0.00%

0 / 296

n/a

0 / 0

n/a

0 / 0

       typography_helper.php

           0.00% covered (danger)

0.00%

0 / 23

n/a

0 / 0

n/a

0 / 0

       url_helper.php

           0.00% covered (danger)

0.00%

0 / 125

n/a

0 / 0

n/a

0 / 0

       xml_helper.php

           0.00% covered (danger)

0.00%

0 / 23

n/a

0 / 0

n/a

0 / 0

Legend

     Low: 0% to 35%
     Medium: 35% to 70%
     High: 70% to 100%

     Generated by php-code-coverage 5.2.2 using PHP 7.1.10 with Xdebug 2.5.3 and PHPUnit 6.4.3 at Sun Nov 5 23:01:03 CET 2017.


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>sininv</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="sinh.html" title="sinh" />
    <link rel="next" href="sinsyn.html" title="sinsyn" />

          sininv

          Prev
          Orchestra Opcodes and Operators
           Next

          sininv

sininv —
      Performs an arcsine function.

Description

      Returns the arcsine of x (x in radians).

Syntax

sininv(x) (no rate restriction)

Examples

      Here is an example of the sininv opcode. It uses the file sininv.csd.

            Example 854. Example of the sininv opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in
-odac           -iadc    ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o sininv.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1

; Instrument #1.
instr 1
  irad = 0.5
  i1 = sininv(irad)

  print i1
endin

</CsInstruments>
<CsScore>

; Play Instrument #1 for one second.
i 1 0 1
e

</CsScore>
</CsoundSynthesizer>

      Its output should include a line like this:

instr 1:  i1 = 0.524

See Also

      cos,
      cosh,
      cosinv,
      sin,
      sinh,
      tan,
      tanh,
      taninv

Credits

Author: John ffitch

New in version 3.48

Example written by Kevin Conder.

          Prev

            Up

           Next

          sinh

            Home

           sinsyn


text:
        <author>
            <personname>
                <firstname>Florian</firstname>
                <surname>Haas</surname>
            </personname>
            <email>florian@hastexo.com</email>
            <affiliation>
                <orgname>hastexo</orgname>
            </affiliation>
        </author>
        <copyright>
            <year>2012</year>
            <holder>OpenStack Contributors</holder>
        </copyright>
        <releaseinfo>trunk</releaseinfo>
        <productname>OpenStack</productname>
        <pubdate>2012-05-24</pubdate>
        <legalnotice role="apache2">
            <annotation>
                <remark>Copyright details are filled in by the template.</remark>
            </annotation>
        </legalnotice>
        <abstract>
            <para>OpenStack™ offers open source software for cloud administration and
                management for any organization. This manual provides guidance for installing,
                configuring, and managing OpenStack for high availability.</para>
        </abstract>
        <revhistory>
            <revision>
                <date>2012-05-24</date>
                <revdescription>
                    <itemizedlist spacing="compact">
                        <listitem>
                            <para>Begin trunk designation.</para>
                        </listitem>
                    </itemizedlist>
                </revdescription>
            </revision>
        </revhistory>


text:
"""
CAUTION! Keep everything here at at minimum. Do not import stuff.
This module is imported in setup.py, so you cannot for instance
import a dependency.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

from .utils import env
from .utils.version import get_version

# Setup the environment before loading anything else from the application
env.set_env()

#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
VERSION = (0, 11, 0, 'alpha', 1)

__author__ = 'Learning Equality'
__email__ = 'info@learningequality.org'
__version__ = str(get_version(VERSION))


text:
YUI.add('yql', function(Y) {

    /**
     * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/).
     * @module yql
     */
    /**
     * Utility Class used under the hood my the YQL class
     * @class YQLRequest
     * @constructor
     * @param {String} sql The SQL statement to execute
     * @param {Function/Object} callback The callback to execute after the query (Falls through to JSONP).
     * @param {Object} params An object literal of extra parameters to pass along (optional).
     * @param {Object} params An object literal of configuration options (optional): proto (http|https), base (url)
     */
    var YQLRequest = function (sql, callback, params, opts) {

        if (!params) {
            params = {};
        }
        params.q = sql;
        //Allow format override.. JSON-P-X
        if (!params.format) {
            params.format = Y.YQLRequest.FORMAT;
        }
        if (!params.env) {
            params.env = Y.YQLRequest.ENV;
        }

        this._params = params;
        this._opts = opts;
        this._callback = callback;

    };

    YQLRequest.prototype = {
        /**
        * @private
        * @property _opts
        * @description Holder for the opts argument
        */
        _opts: null,
        /**
        * @private
        * @property _callback
        * @description Holder for the callback argument
        */
        _callback: null,
        /**
        * @private
        * @property _params
        * @description Holder for the params argument
        */
        _params: null,
        /**
        * @method send
        * @description The method that executes the YQL Request.
        * @chainable
        * @returns {YQLRequest}
        */
        send: function() {
            var qs = '', url = ((this._opts && this._opts.proto) ? this._opts.proto : Y.YQLRequest.PROTO);

            Y.each(this._params, function(v, k) {
                qs += k + '=' + encodeURIComponent(v) + '&';
            });

            url += ((this._opts && this._opts.base) ? this._opts.base : Y.YQLRequest.BASE_URL) + qs;

            Y.jsonp(url, this._callback);
            return this;
        }
    };

    /**
    * @static
    * @property FORMAT
    * @description Default format to use: json
    */
    YQLRequest.FORMAT = 'json';
    /**
    * @static
    * @property PROTO
    * @description Default protocol to use: http
    */
    YQLRequest.PROTO = 'http';
    /**
    * @static
    * @property BASE_URL
    * @description The base URL to query: query.yahooapis.com/v1/public/yql?
    */
    YQLRequest.BASE_URL = ':/'+'/query.yahooapis.com/v1/public/yql?';
    /**
    * @static
    * @property ENV
    * @description The environment file to load: http://datatables.org/alltables.env
    */
    YQLRequest.ENV = 'http:/'+'/datatables.org/alltables.env';

    Y.YQLRequest = YQLRequest;

    /**
     * This class adds a sugar class to allow access to YQL (http://developer.yahoo.com/yql/).
     * @class YQL
     * @constructor
     * @param {String} sql The SQL statement to execute
     * @param {Function} callback The callback to execute after the query (optional).
     * @param {Object} params An object literal of extra parameters to pass along (optional).
     */
	Y.YQL = function(sql, callback, params) {
        return new Y.YQLRequest(sql, callback, params).send();
    };

}, '@VERSION@' ,{requires:['jsonp']});


text:
(function () {
    module('Integration.nodes', { teardown: Test.Integration.teardown });

    test("createNode binds pane to target element", function() {
        T.createNode('#qunit-fixture', { path: 'Utilities/parent' });
        equal($('#qunit-fixture .parent .child .message').text(), 'test message');
    });

    test("appendNode appends wrapped pane to target element", function() {
        T.appendNode('#qunit-fixture', { path: 'Utilities/parent' });
        equal($('#qunit-fixture div .parent .child .message').text(), 'test message');
    });

    test("createNode called from paneRendered model function renders", function() {
        T.createNode('#qunit-fixture', { path: 'Utilities/dynamicParent' });
        equal($('#qunit-fixture .dynamicParent .child .message').text(), 'test message');
    });

    test("createNode inherits context from parent element", function () {
        T.Events.spy = sinon.spy();
        T.options.events = ['loadResources', 'createModel', 'initialiseModel', 'renderPane', 'renderComplete', 'spy', 'active', 'dispose'];

        T.createNode('#qunit-fixture', { path: 'Utilities/dynamicParent' });
        ok(T.Events.spy.calledTwice);
        equal(T.Events.spy.firstCall.args[1], T.Events.spy.secondCall.args[1]);
    });

    test("createNode returns populated Node object", function() {
        var node = T.createNode('#qunit-fixture', { path: 'Utilities/parent' });
        equal(node.pane.path, '/Utilities/parent');
        equal(node.children.length, 1);
    });

    test("scope cascades to child nodes and panes", function () {
        var node = new T.Types.Node();
        node.scope = 'test';
        T.createNode('#qunit-fixture', { path: 'Utilities/parent' }, node);
        equal(node.children[0].children[0].scope, 'test');
        equal(node.children[0].children[0].pane.scope, 'test');
    });

    asyncTest("context.renderOperation resolves when render operation is complete", function () {
        expect(1);
        T.options.synchronous = false;
        var context = T.context();
        T.createNode('#qunit-fixture', { path: 'Utilities/parent' }, null, context);
        $.when(context.renderOperation.promise)
            .done(function() {
                equal($('#qunit-fixture .parent .child .message').text(), 'test message');
                start();
            });
    });

    asyncTest("context.renderOperation includes dynamically added nodes", function () {
        expect(1);
        T.options.synchronous = false;
        var context = T.context();
        T.createNode('#qunit-fixture', { path: 'Utilities/dynamicParent' }, null, context);
        $.when(context.renderOperation.promise)
            .done(function () {
                equal($('#qunit-fixture .dynamicParent .child .message').text(), 'test message');
                start();
            });
    });
})();


text:
from distutils.core import setup, Distribution
from distutils.command import install, install_lib, build_py
import sys, os

class NoodleDistribution(Distribution):
    def __init__(self, *args, **kwargs):
        Distribution.__init__(self, *args, **kwargs)
        self.cmdclass['install'] = NoodleInstall
        self.cmdclass['install_nu'] = NoodleInstallNu
        self.cmdclass['build_nu'] = NoodleBuild

class NoodleInstall(install.install):
    def run(self):
        install.install.run(self)
        self.run_command('install_nu')

class NoodleInstallNu(install_lib.install_lib):
    description = "byte-compile noodle modules"
    user_options = []
    boolean_options = []
    negative_opt = []

    def run(self):
        self.run_command('build_ext')
        self.run_command('build_nu')
        noodledir = os.path.join(self.install_dir, 'Noodle')
        sys.path.insert(0, self.install_dir)
        import Noodle
        from Noodle import nucfiles, NoodleMain
        for nuc in self.distribution.nuc_files:
            if nuc.endswith(Noodle.extension):
                infile = os.path.join(noodledir, nuc)
                print "byte-compiling %s" % infile
                outfile = nucfiles.nuc_filename(infile)
                NoodleMain.noodle_to_nuc(infile, outfile)

class NoodleBuild(build_py.build_py):
    description = "collect noodle module filenames"
    user_options = []
    boolean_options = []
    negative_opt = []

    def run(self):
        self.distribution.nuc_files = []
        for pkg, src_dir, build_dir, filenames in self.data_files:
            if pkg == 'Noodle':
                self.distribution.nuc_files.extend(filenames)

setup(
    name='Noodle',
    version='0.1.0a1',
    description='Noodle Compiler and Runtime',
    author='paul cannon',
    author_email='paul@nafpik.com',
    packages=['Noodle'],
    package_data={'Noodle': ['*.nu']},
    scripts=[
        'scripts/noodle',
        'scripts/disnoodle',
        'scripts/dispyc',
        'scripts/runnable_nuc',
        'scripts/readnoodle'
    ],
    distclass=NoodleDistribution
)


text:
<?php
$lang['email_must_be_array'] = '';
$lang['email_invalid_address'] = '';
$lang['email_attachment_missing'] = '';
$lang['email_attachment_unreadable'] = '';
$lang['email_no_recipients'] = '';
$lang['email_send_failure_phpmail'] = '';
$lang['email_send_failure_sendmail'] = '';
$lang['email_send_failure_smtp'] = '';
$lang['email_sent'] = '';
$lang['email_no_socket'] = '';
$lang['email_no_hostname'] = '';
$lang['email_smtp_error'] = '';
$lang['email_no_smtp_unpw'] = '';
$lang['email_failed_smtp_login'] = '';
$lang['email_smtp_auth_un'] = '';
$lang['email_smtp_auth_pw'] = '';
$lang['email_smtp_data_failure'] = '';
$lang['email_exit_status'] = '';


text:
<!DOCTYPE html>

	<title>three.js webgl - materials - compressed textures</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<link type="text/css" rel="stylesheet" href="main.css">

	three.js - webgl - compressed KTX textures

	Khronos Texture is a lightweight file format for OpenGL


text:
using System;
using NMocha;

namespace NMock2.Syntax {
    /// <summary>
    /// Syntax describing the initial characteristics of a new mock object.
    /// </summary>
    public interface IMockDefinitionSyntax : IMockDefinition {
        /// <summary>
        /// Specifies a type that this mock should implement. This may be a class or interface,
        /// but there can only be a maximum of one class implemented by a mock.
        /// </summary>
        /// <typeparam name="T">The type to implement.</typeparam>
        /// <returns>The mock object definition.</returns>
        IMockDefinitionSyntax Implementing<T>();

        /// <summary>
        /// Specifies the types that this mock should implement. These may be a class or interface,
        /// but there can only be a maximum of one class implemented by a mock.
        /// </summary>
        /// <param name="types">The types to implement.</param>
        /// <returns>The mock object definition.</returns>
        IMockDefinitionSyntax Implementing(params Type[] types);

        /// <summary>
        /// Specifies the arguments for the constructor of the class to be mocked.
        /// Only applicable when mocking a class with a non-default constructor.
        /// It is invalid to specify the constructor arguments of a mock more than once.
        /// </summary>
        /// <param name="args">The arguments for the class constructor.</param>
        /// <returns>The mock object definition.</returns>
        IMockDefinitionSyntax WithArgs(params object[] args);

        /// <summary>
        /// Specifies a name for the mock. This will be used in error messages,
        /// and as the return value of ToString() if not mocking a class.
        /// It is invalid to specify the name of a mock more than once.
        /// </summary>
        /// <param name="name">The name for the mock.</param>
        /// <returns>The mock object definition.</returns>
        IMockDefinitionSyntax Named(string name);
    }
}


text:
package org.sana.android.activity.settings;

import org.sana.R;
import org.sana.android.Constants;

import android.content.Intent;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
import android.text.TextUtils;
import android.text.method.PasswordTransformationMethod;

/**
 * Creates the settings window for specifying the Sana application. If a user
 * does not specify their own values, default values are used. Most of these are
 * stored in Constants. The default phone name is the phone's number. String
 * values are stored as preferences and can be retrieved as follows:
 * PreferenceManager.getDefaultSharedPreferences(c).getString("key name")
 *
 * @author Sana Dev Team
 */
public class Settings extends PreferenceActivity {

    public static final String TAG = Settings.class.getSimpleName();

    /**
     * {@inheritDoc}
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.settings);
        initPreferences();
    }

    /**
     * Sets the default values for the the preferences
     */
    private void initPreferences() {

        // Health worker username for OpenMRS
        EditTextPreference prefEmrUsername = (EditTextPreference) findPreference(Constants.PREFERENCE_EMR_USERNAME);
        if (TextUtils.isEmpty(prefEmrUsername.getText())) {
            prefEmrUsername.setText(Constants.DEFAULT_USERNAME);
        }

        // Health worker password for OpenMRS
        EditTextPreference prefEmrPassword = (EditTextPreference) findPreference(Constants.PREFERENCE_EMR_PASSWORD);
        prefEmrPassword.getEditText().setTransformationMethod(
                new PasswordTransformationMethod());
        if (TextUtils.isEmpty(prefEmrPassword.getText())) {
            prefEmrPassword.setText(Constants.DEFAULT_PASSWORD);
        }

        // Whether barcode reading is enabled on the phone
        /*
         * CheckBoxPreference barcodeEnabled = new CheckBoxPreference(this);
         * barcodeEnabled.setKey(Constants.PREFERENCE_BARCODE_ENABLED);
         * barcodeEnabled.setTitle("Enable barcode reading");
         * barcodeEnabled.setSummary
         * ("Enable barcode reading of patient and physician ids");
         * barcodeEnabled.setDefaultValue(false);
         * dialogBasedPrefCat.addPreference(barcodeEnabled);
         */

        // Launches network preferences
        PreferenceScreen prefNetwork = (PreferenceScreen) findPreference("s_network_settings");
        if (prefNetwork != null) {
            prefNetwork.setIntent(new Intent(this, NetworkSettings.class));
        }

        // Launches resource preferences
        PreferenceScreen prefResource = (PreferenceScreen) findPreference("s_resource_settings");
        if (prefResource != null) {
            prefResource.setIntent(new Intent(this, ResourceSettings.class));
        }
    }
}


text:
@implementation OnlineImagePickerCell

- (void)layoutSubviews {
    [super layoutSubviews];

    self.progressView.frame = [self progressFrame];
    self.imageView.frame = self.bounds;
}

-(CGRect) progressFrame {
    CGFloat progressWidth = self.bounds.size.width / 2;
    return CGRectMake((self.bounds.size.width - progressWidth) / 2, (self.bounds.size.height - progressWidth) / 2, progressWidth, progressWidth);
}

-(M13ProgressView *) progressView {
    if (!_progressView) {
        [self setProgressView:[[M13ProgressViewRing alloc] initWithFrame:[self progressFrame]]];
        _progressView.primaryColor = self.tintColor;
        [self addSubview:_progressView];
    }
    return _progressView;
}

-(UIImageView *) imageView {
    if (!_imageView) {
        [self setImageView:[[UIImageView alloc] initWithFrame:self.bounds]];
        _imageView.contentMode = UIViewContentModeScaleAspectFill;
        _imageView.clipsToBounds = YES;
        [self addSubview:_imageView];
    }
    return _imageView;
}

-(void) setImageInfo:(id<OnlineImageInfo>)imageInfo {
    BOOL same = _imageInfo == imageInfo;
    _imageInfo = imageInfo;
    if (!imageInfo)
        [self showIndeterminateProgress];
    else if (!same)
        [self loadImageAtScale:self.scale];
}

-(void) showIndeterminateProgress {
    self.progressView.hidden = NO;
    self.imageView.hidden = YES;
    self.progressView.indeterminate = YES;
}

-(void) setProgress:(CGFloat)progress {
    self.progressView.hidden = NO;
    self.imageView.hidden = YES;
    [self.progressView setProgress:progress animated:YES];
}

-(void) loadImageAtScale:(CGFloat) scale {
    [self.imageView sd_cancelCurrentImageLoad];
    [self setImage:nil];
    _startedLoad = [NSDate date];

    CGSize size = self.bounds.size;
    if (scale > 1)
        size = CGSizeMake(size.width * scale, size.height * scale);

    __weak OnlineImagePickerCell *wself = self;
    [self.imageInfo loadThumbnailForTargetSize:size progress:^(double progress) {
        if (!wself)
            return;
        dispatch_main_sync_safe(^{
            [wself setProgress:progress];
        });
    } completed:^(UIImage *image, NSError *error) {
        if (!wself)
            return;
        dispatch_main_sync_safe(^{
            _finishedLoad = [NSDate date];
            if (image)
                [wself setImage:image];
            else
                self.progressView.hidden = YES;
            if (error) {
// TODO: what?

                NSLog(@"Error loading image: %@", error);
            }
        });
    }];
}

-(void) setImage:(UIImage *)image {
    self.progressView.hidden = image != nil;
    self.imageView.hidden = image == nil;
    self.imageView.image = image;
    [self setNeedsLayout];
}

@end


text:
package org.apereo.cas;

import org.apereo.cas.adaptors.x509.authentication.ResourceCRLFetcherTests;
import org.apereo.cas.adaptors.x509.authentication.RevokedCertificateExceptionTests;
import org.apereo.cas.adaptors.x509.authentication.handler.support.CRLDistributionPointRevocationCheckerTests;
import org.apereo.cas.adaptors.x509.authentication.handler.support.ResourceCRLRevocationCheckerTests;
import org.apereo.cas.adaptors.x509.authentication.handler.support.ThresholdExpiredCRLRevocationPolicyTests;
import org.apereo.cas.adaptors.x509.authentication.handler.support.X509CredentialsAuthenticationHandlerTests;
import org.apereo.cas.adaptors.x509.authentication.principal.DefaultX509AttributeExtractorTests;
import org.apereo.cas.adaptors.x509.authentication.principal.EDIPIX509AttributeExtractorTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509CertificateCredentialTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509CommonNameEDIPIPrincipalResolverTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509SerialNumberAndIssuerDNPrincipalResolverTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509SerialNumberPrincipalResolverTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509SubjectAlternativeNameRFC822EmailPrincipalResolverTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509SubjectAlternativeNameUPNPrincipalResolverTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509SubjectDNPrincipalResolverTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509SubjectPrincipalResolverTests;
import org.apereo.cas.adaptors.x509.authentication.principal.X509UPNExtractorUtilsTests;
import org.apereo.cas.adaptors.x509.util.X509AuthenticationUtilsTests;
import org.apereo.cas.adaptors.x509.util.X509CertificateCredentialJsonSerializerTests;

import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

/**
 * The {@link AllTestsSuite} is responsible for
 * running all cas test cases.
 *
 * @author Misagh Moayyed
 * @since 5.0.0
 */
@SelectClasses({
    DefaultX509AttributeExtractorTests.class,
    EDIPIX509AttributeExtractorTests.class,
    X509SerialNumberAndIssuerDNPrincipalResolverTests.class,
    X509SerialNumberPrincipalResolverTests.class,
    X509SubjectDNPrincipalResolverTests.class,
    X509CommonNameEDIPIPrincipalResolverTests.class,
    X509SubjectAlternativeNameRFC822EmailPrincipalResolverTests.class,
    X509SubjectAlternativeNameUPNPrincipalResolverTests.class,
    X509SubjectPrincipalResolverTests.class,
    ResourceCRLRevocationCheckerTests.class,
    X509CertificateCredentialTests.class,
    ResourceCRLFetcherTests.class,
    X509AuthenticationUtilsTests.class,
    RevokedCertificateExceptionTests.class,
    X509UPNExtractorUtilsTests.class,
    X509CertificateCredentialJsonSerializerTests.class,
    ThresholdExpiredCRLRevocationPolicyTests.class,
    X509CredentialsAuthenticationHandlerTests.class,
    CRLDistributionPointRevocationCheckerTests.class
})
@Suite
public class AllTestsSuite {
}


text:
<?php
require_once './vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;

$response = new VoiceResponse();
$dial = $response->dial('');
$dial->sip('kate@example.com');

echo $response;


text:
<ion-header>
  <ion-navbar>
    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>Cadastro de Tarefas</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>

    <ion-list>

        <!-- SPINNER (falta implementar o ngFor no ion-option) -->
        <ion-item>
            <ion-label>Disciplinas</ion-label>
            <ion-select [(ngModel)]="os" submitText="Okay" cancelText="Nah">
                <ion-option>DOS</ion-option>
            </ion-select>
        </ion-item>

        <!-- NOME TAREFA -->
        <ion-item>
            <ion-label floating>Nome da Tarefa</ion-label>
            <ion-input type="text" [(ngModel)]="tarefasItem.nome"></ion-input>
        </ion-item>

        <!-- DataPicker -->
        <ion-item>
            <ion-label>Data da Tarefa</ion-label>
            <ion-datetime displayFormat="MMM DD YYYY" [(ngModel)]="tarefasItem.data"></ion-datetime>
        </ion-item>

        <!-- DESCRIÇÃO -->
        <ion-item>
            <ion-label floating>Descrição</ion-label>
            <ion-input type="text" [(ngModel)] = 'tarefasItem.descricao'></ion-input>
        </ion-item>

    </ion-list>

    <button ion-button full clear color="dark" (click)="callCadastro()">Cadastrar</button>

</ion-content>


text:
// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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.

/*!
 * @file MockAccessControlPlugin.h
 */

#ifndef _SECURITY_MOCKACCESSCONTROLPLUGIN_H_
#define _SECURITY_MOCKACCESSCONTROLPLUGIN_H_

#include <fastdds/rtps/builtin/data/ReaderProxyData.h>
#include <fastdds/rtps/builtin/data/WriterProxyData.h>
#include <fastdds/rtps/builtin/data/ParticipantProxyData.h>

#include <fastdds/rtps/security/accesscontrol/AccessControl.h>
#include <gmock/gmock.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {
namespace security {

class MockAccessControlPlugin : public AccessControl
{
public:

    using AccessPermissionsHandle = HandleImpl<AccessPermissions, MockAccessControlPlugin>;

    MOCK_METHOD(PermissionsHandle*, validate_local_permissions, (
                Authentication & auth_plugin,
                const IdentityHandle& identity,
                const uint32_t domain_id,
                const RTPSParticipantAttributes& participant_attr,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, get_permissions_token, (
                PermissionsToken * *permissions_token,
                const PermissionsHandle& handle,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, return_permissions_token, (
                PermissionsToken * token,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, get_permissions_credential_token, (
                PermissionsCredentialToken * *permissions_credential_token,
                const PermissionsHandle& handle,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, return_permissions_credential_token, (
                PermissionsCredentialToken * token,
                SecurityException & exception), (override));

    MOCK_METHOD(PermissionsHandle*, validate_remote_permissions, (
                Authentication & auth_plugin,
                const IdentityHandle& local_identity_handle,
                const PermissionsHandle& local_permissions_handle,
                const IdentityHandle& remote_identity_handle,
                const PermissionsToken& remote_permissions_token,
                const PermissionsCredentialToken& remote_credential_token,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, check_create_participant, (
                const PermissionsHandle& local_handle,
                const uint32_t domain_id,
                const RTPSParticipantAttributes& qos,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, check_remote_participant, (
                const PermissionsHandle& remote_handle,
                const uint32_t domain_id,
                const ParticipantProxyData&,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, check_create_datawriter, (
                const PermissionsHandle& local_handle,
                const uint32_t domain_id,
                const std::string& topic_name,
                const std::vector<std::string>& partitions,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, check_create_datareader, (
                const PermissionsHandle& local_handle,
                const uint32_t domain_id,
                const std::string& topic_name,
                const std::vector<std::string>& partitions,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, check_remote_datawriter, (
                const PermissionsHandle& remote_handle,
                const uint32_t domain_id,
                const WriterProxyData& publication_data,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, check_remote_datareader, (
                const PermissionsHandle& remote_handle,
                const uint32_t domain_id,
                const ReaderProxyData& subscription_data,
                bool& relay_only,
                SecurityException & exception), (override));
    MOCK_METHOD(bool, get_participant_sec_attributes, (
                const PermissionsHandle& local_handle,
                ParticipantSecurityAttributes & attributes,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, get_datawriter_sec_attributes, (
                const PermissionsHandle& permissions_handle,
                const std::string& topic_name,
                const std::vector<std::string>& partitions,
                EndpointSecurityAttributes & attributes,
                SecurityException & exception), (override));

    MOCK_METHOD(bool, get_datareader_sec_attributes, (
                const PermissionsHandle& permissions_handle,
                const std::string& topic_name,
                const std::vector<std::string>& partitions,
                EndpointSecurityAttributes & attributes,
                SecurityException & exception), (override));

    PermissionsHandle* get_permissions_handle(
            SecurityException&) override
    {
        return new (std::nothrow) AccessPermissionsHandle();
    }

    bool return_permissions_handle(
            PermissionsHandle* permissions_handle,
            SecurityException&) override
    {
        delete dynamic_cast<AccessPermissionsHandle*>(permissions_handle);
        return true;
    }

};

} //namespace security
} //namespace rtps
} //namespace fastrtps
} //namespace eprosima

#endif // _SECURITY_MOCKACCESSCONTROLPLUGIN_H_


text:
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
 * @                                                                             @ *
 *           #          # #                                 #    (c) 2017 CAB      *
 *          # #      # #                                  #  #                     *
 *         #  #    #  #           # #     # #           #     #              # #   *
 *        #   #  #   #             #       #          #        #              #    *
 *       #     #    #   # # #    # # #    #         #           #   # # #   # # #  *
 *      #          #         #   #       # # #     # # # # # # #  #    #    #      *
 *     #          #   # # # #   #       #      #  #           #  #         #       *
 *  # #          #   #     #   #    #  #      #  #           #  #         #    #   *
 *   #          #     # # # #   # #   #      #  # #         #    # # #     # #     *
 * @                                                                             @ *
\* *  http://github.com/alexcab  * * * * * * * * * * * * * * * * * * * * * * * * * */

package mathact.core.dummies

import akka.actor.SupervisorStrategy.Stop
import akka.actor._

import scala.concurrent.duration._
import scala.reflect._

/** Test infrastructure factory
  * Created by CAB on 17.08.2016.
  */

class TestActor(name: String, customReceive: (ActorRef, ActorContext)⇒PartialFunction[Any, Option[Any]], system: ActorSystem){
  //Parameters
  val expectMsgTimeout: FiniteDuration = 3.seconds
  val waitMsgTimeout: FiniteDuration = 500.millis
  //Messages
  private case class SendTo(to: ActorRef, msg: Any)
  private case class WatchFor(to: ActorRef)
  //Variables
  private object Mutex
  @volatile private var receivedMessages = List[Any]()
  @volatile private var processedMessages = List[Any]()
  //Actor
  val ref: ActorRef = system.actorOf(
    Props(new Actor{
      override val supervisorStrategy = OneForOneStrategy(){case _: Throwable ⇒ Stop}
      def receive = {
        case WatchFor(actor) ⇒
          context.watch(actor)
        case SendTo(to, msg) ⇒
          to ! msg
        case msg ⇒
          customReceive(self, context).lift(msg) match{
            case Some(res) ⇒
              println(s"[TestActor: $name] Processed message: $msg")
              processedMessages :+= msg
              res.foreach(m ⇒ sender ! m)
            case None ⇒
              println(s"[TestActor: $name] Received message: $msg")
              Mutex.synchronized{ receivedMessages :+= msg }}}}),
    name)
  //Classes
  class Response(data: Option[Any]){
    def expectResponseType[T : ClassTag]: T = {
      val clazz = classTag[T]
      assert(data.nonEmpty, s"timeout during request while waiting for type $clazz")
      val msg = data.get
      assert(data.get.getClass == clazz.runtimeClass, s"expected $clazz, found ${msg.getClass} ($msg)")
      msg.asInstanceOf[T]}
    def expectResponseMsg(msg: Any): Any = {
      assert(data.nonEmpty, s"timeout during request while waiting for $msg")
      assert(data.get == msg, s"expected $msg, found ${data.get}")
      data.get}}
  //Methods
  /** Clean old messages */
  def clean(): Unit = {
    receivedMessages = List()
    processedMessages = List()}
  /** Sending of any message to given actor
    * @param to - ActorRef, target actor
    * @param msg - Any, message */
  def send(to: ActorRef, msg: Any): Unit = {
    ref ! SendTo(to, msg)
    println(s"[TestActor: $name] Send message: $msg, to: $to")}
  /** Receive given number of messages and return
    * @param number - Int
    * @return - Seq[Any], received messages */
  def expectNMsg(number: Int)(implicit duration: FiniteDuration = expectMsgTimeout): List[Any] = {
    var counter = duration.toMillis / 10
    while (Mutex.synchronized{ receivedMessages.size } < number && counter > 0){
      Thread.sleep(10)
      counter -= 1}
    Mutex.synchronized{
      val received = receivedMessages.take(number)
      receivedMessages = receivedMessages.drop(received.size)
      received}}
  /** Receive given all of messages during duration and return
    * @return - Seq[Any], received messages */
  def expectAllMsg(implicit duration: FiniteDuration = expectMsgTimeout): List[Any] = {
    Thread.sleep(duration.toMillis)
    receivedMessages}
  /** Expectation of receiving of given message
    * @param msg - Any, to check
    * @param duration - FiniteDuration, wait timeout
    * @return - Any, received message of throw AssertionError */
  def expectMsg(msg: Any)(implicit duration: FiniteDuration = expectMsgTimeout): Any = {
    val opMsg = expectNMsg(1)(duration).headOption
    assert(opMsg.nonEmpty, s"timeout ($duration) during expectMsg while waiting for $msg")
    assert(opMsg.get == msg, s"expected $msg, found ${opMsg.get}")
    opMsg.get}
  /** Expectation of receiving of message with given type
    * @param duration - FiniteDuration, wait timeout
    * @tparam T - expected type
    * @return - message */
  def expectMsgType[T : ClassTag](implicit duration: FiniteDuration = expectMsgTimeout): T = {
    val opMsg = expectNMsg(1)(duration).headOption
    val clazz = classTag[T]
    assert(opMsg.nonEmpty, s"timeout ($duration) during expectMsg while waiting for type $clazz")
    val msg = opMsg.get
    assert(opMsg.get.getClass == clazz.runtimeClass, s"expected $clazz, found ${msg.getClass} ($msg)")
    msg.asInstanceOf[T]}
  /** Expectation no messages
    * @param duration - FiniteDuration, wait timeout */
  def expectNoMsg(implicit duration: FiniteDuration = expectMsgTimeout): Unit = {
    val allMsg = expectAllMsg(duration)
    assert(allMsg.isEmpty, s"timeout ($duration) during expectNMsg while receive: $allMsg")}
  /** Watch for given actor
    * @param actor - ActorRef */
  def watch(actor: ActorRef): Unit = ref ! WatchFor(actor)
  /** Return list of processed messages
    * @return - List[Any] */
  def getProcessedMessages: List[Any] = processedMessages

    //TODO Add more

}

object TestActor {
  def apply(name: String)(receive: (ActorRef, ActorContext)⇒PartialFunction[Any, Option[Any]])(implicit system: ActorSystem)
  :TestActor =
    new TestActor(name, receive, system)}


text:
package org.kie.workbench.common.screens.library.client.screens;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

import javax.annotation.PostConstruct;
import javax.enterprise.event.Event;
import javax.inject.Inject;

import org.guvnor.common.services.project.client.context.WorkspaceProjectContext;
import org.guvnor.common.services.project.client.security.ProjectController;
import org.guvnor.common.services.project.model.POM;
import org.guvnor.common.services.project.model.WorkspaceProject;
import org.jboss.errai.common.client.api.Caller;
import org.jboss.errai.common.client.api.RemoteCallback;
import org.jboss.errai.common.client.dom.HTMLElement;
import org.jboss.errai.ioc.client.api.ManagedInstance;
import org.kie.workbench.common.screens.library.api.LibraryInfo;
import org.kie.workbench.common.screens.library.api.LibraryService;
import org.kie.workbench.common.screens.library.client.events.ProjectDetailEvent;
import org.kie.workbench.common.screens.library.client.resources.i18n.LibraryConstants;
import org.kie.workbench.common.screens.library.client.util.LibraryPlaces;
import org.kie.workbench.common.screens.library.client.widgets.common.TileWidget;
import org.kie.workbench.common.screens.library.client.widgets.library.AddProjectButtonPresenter;
import org.uberfire.client.mvp.UberElement;
import org.uberfire.ext.widgets.common.client.common.HasBusyIndicator;
import org.uberfire.mvp.Command;

public class PopulatedLibraryScreen {

    public interface View extends UberElement<PopulatedLibraryScreen>,
                                  HasBusyIndicator {

        void clearProjects();

        void addProject(HTMLElement project);

        void addAction(HTMLElement action);

        void clearFilterText();

        String getNumberOfAssetsMessage(int numberOfAssets);

        String getLoadingAssetsMessage();
    }

    private View view;

    private LibraryPlaces libraryPlaces;

    private Event<ProjectDetailEvent> projectDetailEvent;

    private Caller<LibraryService> libraryService;

    private ProjectController projectController;
    private WorkspaceProjectContext projectContext;

    private ManagedInstance<TileWidget> tileWidgets;

    private AddProjectButtonPresenter addProjectButtonPresenter;

    List<WorkspaceProject> projects;

    @Inject
    public PopulatedLibraryScreen(final View view,
                                  final LibraryPlaces libraryPlaces,
                                  final Event<ProjectDetailEvent> projectDetailEvent,
                                  final Caller<LibraryService> libraryService,
                                  final ProjectController projectController,
                                  final WorkspaceProjectContext projectContext,
                                  final ManagedInstance<TileWidget> tileWidgets,
                                  final AddProjectButtonPresenter addProjectButtonPresenter) {
        this.view = view;
        this.libraryPlaces = libraryPlaces;
        this.projectDetailEvent = projectDetailEvent;
        this.libraryService = libraryService;
        this.projectController = projectController;
        this.projectContext = projectContext;
        this.projects = Collections.emptyList();
        this.tileWidgets = tileWidgets;
        this.addProjectButtonPresenter = addProjectButtonPresenter;
    }

    @PostConstruct
    public void setup() {
        view.init(this);
        if (userCanCreateProjects()) {
            view.addAction(addProjectButtonPresenter.getView().getElement());
        }

        libraryService.call((RemoteCallback<LibraryInfo>) this::updateLibrary)
                .getLibraryInfo(projectContext.getActiveOrganizationalUnit()
                                              .orElseThrow(() -> new IllegalStateException("Cannot get library info without an active organizational unit.")));
    }

    private void updateLibrary(final LibraryInfo libraryInfo) {
        projects = new ArrayList<>(libraryInfo.getProjects());
        view.clearFilterText();
        setupProjects();
    }

    private void setupProjects() {
        projects.sort((p1, p2) -> p1.getName().toUpperCase().compareTo(p2.getName().toUpperCase()));
        updateView(projects);
    }

    public List<WorkspaceProject> filterProjects(final String filter) {
        List<WorkspaceProject> filteredProjects = projects.stream()
                .filter(p -> p.getName().toUpperCase().contains(filter.toUpperCase()))
                .collect(Collectors.toList());

        updateView(filteredProjects);

        return filteredProjects;
    }

    private void updateView(final List<WorkspaceProject> projects) {
        view.clearProjects();
        projects.stream().forEach(project -> {

            final TileWidget tileWidget = createProjectWidget(project);
            view.addProject(tileWidget.getView().getElement());
        });
    }

    private TileWidget createProjectWidget(final WorkspaceProject project) {
        final TileWidget tileWidget = tileWidgets.get();

        if (project.getMainModule() != null) {
            final POM pom = project.getMainModule().getPom();
            tileWidget.init(project.getName(),
                            pom != null ? pom.getDescription() : "",
                            String.valueOf(project.getMainModule().getNumberOfAssets()),
                            view.getNumberOfAssetsMessage(project.getMainModule().getNumberOfAssets()),
                            selectCommand(project));
        } else {
            tileWidget.init(project.getName(),
                            "",
                            "0",
                            "0",
                            selectCommand(project));
        }
        return tileWidget;
    }

    public boolean userCanCreateProjects() {
        return projectController.canCreateProjects();
    }

    public int getProjectsCount() {
        return projects.size();
    }

    Command selectCommand(final WorkspaceProject project) {
        return () -> {
            view.showBusyIndicator(view.getLoadingAssetsMessage());
            libraryPlaces.goToProject(project);
        };
    }

    public View getView() {
        return view;
    }
}


text:
package com.modeln.build.web.application;

import java.io.*;
import java.net.URL;
import javax.servlet.*;
import javax.servlet.http.*;

import com.modeln.build.web.errors.*;
import com.modeln.build.web.errors.*;

/**
 * The CommandResult provides information about the results of the
 * command execution.
 *
 * @version            $Revision: 1.1.1.1 $
 * @author             Shawn Stafford
 */
public class CommandResult {

    /** If an error was encountered during processing, it will be recorded here. */
    private ApplicationError error;

    /** Destination page where control should ultimately be forwarded */
    private String destination;

    /** Determines whether the HTTP request should be redirected to the destination */
    private boolean redirect = false;

    /**
     * Construct the command result
     */
    public CommandResult() {
    }

    /**
     * Sets the destination page to be a URL and enables HTTP redirection.
     *
     * @param   url   URL to redirect to
     */
    public void setDestination(URL url) {
        if (url != null) {
            destination = url.toString();
            redirect = true;
        } else {
            destination = null;
            redirect = false;
        }
    }

    /**
     * Sets the destination page to be loaded upon completion.
     */
    public void setDestination(String page) {
        destination = page;
        redirect = false;
    }

    /**
     * Sets the error information if any is available.
     */
    public void setError(ApplicationError error) {
        this.error = error;
    }

    /**
     * Returns the error associated with the result
     */
    public ApplicationError getError() {
        return error;
    }

    /**
     * Determines whether the response contained an error object
     */
    public boolean containsError() {
        return ((error != null) && (error.getErrorCode() != ErrorMap.NO_ERROR));
    }

    /**
     * Returns the destination page.
     */
    public String getDestination() {
        return destination;
    }

    /**
     * Determine if the destination requres a request redirect to the URL.
     *
     * @return TRUE if the destination requires a request redirect
     */
    public boolean useRedirect() {
        return redirect;
    }
}


text:
Booleansetting.view.autoCancelSelected

Overview[ depends on jquery.ztree.core js ]

When click the selected node while pressing the Ctrl key, allow to cancel selected the node.

If you don't need this function, please set to false.

Default: true

Boolean Format

 true means: press the Ctrl key, can cancel selected node.

 false means: press the Ctrl key, can't cancel selected node.

Examples of setting

1. Press the Ctrl key, can't cancel selected node.

var setting = {
	view: {
		autoCancelSelected: false
	}
};
......