text:
namespace test {

namespace {

// Create the icon image for the app-item with |id|.
// TODO(mukai): consolidate the implementation with
// ash/app_list/model/app_list_test_model.cc.
gfx::ImageSkia CreateImageSkia(int id) {
  const int size =
      ash::SharedAppListConfig::instance().default_grid_icon_dimension();
  SkBitmap bitmap;
  bitmap.allocN32Pixels(size, size);
  bitmap.eraseARGB(255, 255 * ((id >> 2) % 2), 255 * ((id >> 1) % 2),
                   255 * (id % 2));
  return gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
}

}  // namespace

AppListModelUpdater* GetModelUpdater(AppListClientImpl* client) {
  return app_list::AppListSyncableServiceFactory::GetForProfile(
             client->GetCurrentAppListProfile())
      ->GetModelUpdater();
}

AppListClientImpl* GetAppListClient() {
  AppListClientImpl* client = AppListClientImpl::GetInstance();
  client->UpdateProfile();
  return client;
}

void PopulateDummyAppListItems(int n) {
  AppListClientImpl* client = GetAppListClient();
  Profile* profile = client->GetCurrentAppListProfile();
  AppListModelUpdater* model_updater = GetModelUpdater(client);

  // Calculate `last_position` among the existing app list items.
  std::vector<const ChromeAppListItem*> existing_items =
      model_updater->GetItems();
  syncer::StringOrdinal last_position =
      syncer::StringOrdinal::CreateInitialOrdinal();
  for (const auto* item : existing_items) {
    if (item->position().GreaterThan(last_position))
      last_position = item->position();
  }

  syncer::StringOrdinal new_item_position = last_position.CreateAfter();
  for (int i = 0; i < n; ++i) {
    const std::string app_name = base::StringPrintf("app %d", i);
    const std::string app_id = crx_file::id_util::GenerateId(app_name);
    auto item =
        std::make_unique<ChromeAppListItem>(profile, app_id, model_updater);
    auto metadata = std::make_unique<ash::AppListItemMetadata>();
    metadata->id = app_id;
    metadata->name = app_name;
    metadata->icon = CreateImageSkia(i);
    metadata->position = new_item_position;
    new_item_position = new_item_position.CreateAfter();
    item->SetMetadata(std::move(metadata));
    model_updater->AddItem(std::move(item));
  }
  // Wait for the AddItem mojo calls to be handled by Ash. Note that
  // FlushMojoForTesting() isn't working well here.
  // TODO(mukai): remove this once we eliminate the mojo for app-list.
  base::RunLoop().RunUntilIdle();
}

}  // namespace test


text:
var Instascan = {
  Scanner: require('./src/scanner'),
  Camera: require('./src/camera')
};

module.exports = Instascan;

redpajama_set_name: RedPajamaGithub


text:
function [ out ] = clean_cell_array( set )
%CLEAN_MATRIX removes all empty cell arrays

flag = true;
while flag == true
    if cellfun(@isempty, set(:,end))
        set(:,end) = [];
    else
        flag = false;
    end
end
 %there is a problem between matrix size and for loop index. the for loop limit should resize accordingly once an empty column is deleted from the 'set'
out = set;

end


text:
#include <aws/cognito-idp/model/UserPoolAddOnsType.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Utils::Json;
using namespace Aws::Utils;

namespace Aws
{
namespace CognitoIdentityProvider
{
namespace Model
{

UserPoolAddOnsType::UserPoolAddOnsType() :
    m_advancedSecurityMode(AdvancedSecurityModeType::NOT_SET),
    m_advancedSecurityModeHasBeenSet(false)
{
}

UserPoolAddOnsType::UserPoolAddOnsType(JsonView jsonValue) :
    m_advancedSecurityMode(AdvancedSecurityModeType::NOT_SET),
    m_advancedSecurityModeHasBeenSet(false)
{
  *this = jsonValue;
}

UserPoolAddOnsType& UserPoolAddOnsType::operator =(JsonView jsonValue)
{
  if(jsonValue.ValueExists("AdvancedSecurityMode"))
  {
    m_advancedSecurityMode = AdvancedSecurityModeTypeMapper::GetAdvancedSecurityModeTypeForName(jsonValue.GetString("AdvancedSecurityMode"));

    m_advancedSecurityModeHasBeenSet = true;
  }

  return *this;
}

JsonValue UserPoolAddOnsType::Jsonize() const
{
  JsonValue payload;

  if(m_advancedSecurityModeHasBeenSet)
  {
   payload.WithString("AdvancedSecurityMode", AdvancedSecurityModeTypeMapper::GetNameForAdvancedSecurityModeType(m_advancedSecurityMode));
  }

  return payload;
}

} // namespace Model
} // namespace CognitoIdentityProvider
} // namespace Aws


text:
Testing the different versions of `should.js` for behaviour change of the `.eql` method

Run:
 - `get-should-versions`
 - `npm install`
 - `mocha`


text:
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using InternalMessaging.Core.Models;

namespace Services
{
	public class OrderService
	{
		public IEnumerable<Order> GetOrders()
		{
			return null;
		}
	}
}


text:
/** @file
 *
 * @defgroup ble_sdk_adv_beacon Advertiser Module using the radio through the sd_radio_request SoftDevice API
 * @{
 * @ingroup ble_sdk_radio_time_slot_api
 * @brief Advertiser module. This module shows an example of using periodic timeslots on the radio when the SoftDevice is running
 *
 * @details This module implements an advertiser which can be run in parallel with the S110 (thus allowing, for example, to advertise while in a connection)
 *          This module shows an example of using periodic timeslots on the radio when the SoftDevice is running
 *
 * @note This module is experimental.
 *
 */
#ifndef ADVERTISER_BEACON_H__
#define ADVERTISER_BEACON_H__

#include <stdint.h>
#include <stdbool.h>
#include "ble_types.h"
#include "ble_gap.h"
#include "ble_srv_common.h"

typedef struct
{
    ble_uuid128_t           uuid;
    uint32_t                adv_interval;
    uint16_t                major;
    uint16_t                minor;
    uint16_t                manuf_id;
    uint8_t                 rssi;                               /** measured RSSI at 1 meter distance in dBm*/
    ble_gap_addr_t          beacon_addr;                        /** ble address to be used by the beacon*/
    ble_srv_error_handler_t error_handler;                      /**< Function to be called in case of an error. */
} ble_beacon_init_t;

/**@brief Function for handling system events.
 *
 * @details Handles all system events of interest to the Advertiser module.
 *
 * @param[in]   event     received event.
 */
void app_beacon_on_sys_evt(uint32_t event);

/**@brief Function for initializing the advertiser module.
 *
 * @param[in]   p_init     structure containing advertiser configuration information.
 */
void app_beacon_init(ble_beacon_init_t * p_init);

/**@brief Function for starting the advertisement.
 *
 */
void app_beacon_start(void);

/**@brief Function for stopping the advertisement.
 * @note This functions returns immediately, but the advertisement is actually stopped after the next radio slot.
 *
 */
void app_beacon_stop(void);

#endif // ADVERTISER_BEACON_H__


text:
<?php

if ( ! defined( 'IN_IPB' ) )
{
	print "
Incorrect access
You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
	exit();
}

class profiles_plugin
{
	/**
	 * Registry Object Shortcuts
	 *
	 * @var		$registry
	 * @var		$DB
	 * @var		$settings
	 * @var		$request
	 * @var		$lang
	 * @var		$member
	 * @var		$memberData
	 * @var		$cache
	 * @var		$caches
	 */
	protected $registry;
	protected $DB;
	protected $settings;
	protected $request;
	protected $lang;
	protected $member;
	protected $memberData;
	protected $cache;
	protected $caches;

	/**
	 * Holds extra data for the plugin
	 *
	 * @var		array			Data specific to the plugin
	 */
	public $_extra;

	/**
	 * Constructor
	 *
	 * @param	object		$registry		Registry object
	 * @return	@e void
	 */
	public function __construct( ipsRegistry $registry )
	{
		//-----------------------------------------
		// Make object
		//-----------------------------------------

		$this->registry = $registry;
		$this->DB	    = $this->registry->DB();
		$this->settings =& $this->registry->fetchSettings();
		$this->request  =& $this->registry->fetchRequest();
		$this->member   = $this->registry->member();
		$this->memberData =& $this->registry->member()->fetchMemberData();
		$this->cache	= $this->registry->cache();
		$this->caches   =& $this->registry->cache()->fetchCaches();
		$this->lang		= $this->registry->class_localization;
	}

	/**
	 * Display the form for extra data in the ACP
	 *
	 * @param	array 		Plugin data
	 * @param	object		HTML object
	 * @return	string		HTML to add to the form
	 */
	public function displayAdminForm( $plugin_data, &$html )
	{
		$return = '';

		return $return;
	}

	/**
	 * Process the plugin's form fields for saving
	 *
	 * @param	array 		Plugin data for save
	 * @return	string		Error message
	 */
	public function processAdminForm( &$save_data_array )
	{
		return '';
	}

	/**
	 * Update timestamp for report
	 *
	 * @param	array 		New reports
	 * @param 	array 		New members cache
	 * @return	boolean
	 */
	public function updateReportsTimestamp( $new_reports, &$new_members_cache )
	{
		return true;
	}

	/**
	 * Get report permissions (only supermods can moderate profiles)
	 *
	 * @param	string 		Type of perms to check
	 * @param 	array 		Permissions data
	 * @param 	array 		group ids
	 * @param 	string		Special permissions
	 * @return	boolean
	 */
	public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return )
	{
		if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 )
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	/**
	 * Show the report form for this module
	 *
	 * @param 	array 		Application data
	 * @return	string		HTML form information
	 */
	public function reportForm( $com_dat )
	{
		$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );

		$mem = intval($this->request['member_id']);

		if( ! $mem )
		{
			$this->registry->output->showError( 'reports_no_member', 10175 );
		}

		$member = IPSMember::load( $mem );

		$ex_form_data = array(
								'member_id'	=> $mem,
								'ctyp'		=> 'profile',
								'title'		=> $member['members_display_name'] ? $member['members_display_name'] : $this->lang->words['missing_name_report'],
							);

		$this->registry->output->setTitle( $this->lang->words['report_mem_page'] );

		if( $member['members_display_name'] )
		{
			$this->registry->output->addNavigation( $member['members_display_name'], "showuser=" . $member['member_id'] );
		}
		else
		{
			$this->registry->output->addNavigation( $this->lang->words['missing_name_report'], '' );
		}

		$this->registry->output->addNavigation( $this->lang->words['report_mem_page'], '' );

		$this->lang->words['report_basic_title']		= $this->lang->words['report_mem_page'];
		$this->lang->words['report_basic_url_title']	= $this->lang->words['report_mem_page'];
		$this->lang->words['report_basic_enter']		= $this->lang->words['report_mem_msg'];

		$url = $this->registry->getClass('output')->buildSEOUrl( "showuser=" . $ex_form_data['member_id'], 'public', $member['members_seo_name'], 'showuser' );

		return $this->registry->getClass('reportLibrary')->showReportForm( $member['members_display_name'] ? $member['members_display_name'] : $this->lang->words['missing_name_report'], $url, $ex_form_data );
	}

	/**
	 * Get section and link
	 *
	 * @param 	array 		Report data
	 * @return	array 		Section/link
	 */
	public function giveSectionLinkTitle( $report_row )
	{
		return array(
					'title'			=> $this->lang->words['report_section_title_mem'],
					'url'			=> "/index.php?showuser={$report_row['exdat1']}",
					'seo_template'	=> "showuser",
					'seo_title'		=> $report_row['seoname'],
					);
	}

	/**
	 * Process a report and save the data appropriate
	 *
	 * @param 	array 		Report data
	 * @return	array 		Data from saving the report
	 */
	public function processReport( $com_dat )
	{
		$mem		= $this->request['member_id'];
		$url		= 'showuser=' . $mem;

		if( $mem < 1 )
		{
			$this->registry->output->showError( 'reports_no_member', 10176 );
		}

		$return_data	= array();
		$a_url			= str_replace("&", "&", $url);
		$uid			= md5(  'mem_' . $mem . '_' . $com_dat['com_id'] );
		$status			= array();

		$this->DB->build( array( 'select' 	=> 'status, is_new, is_complete',
										 'from'		=> 'rc_status',
										 'where'	=> "is_new=1 OR is_complete=1",
								) 		);
		$this->DB->execute();

		while( $row = $this->DB->fetch() )
		{
			if( $row['is_new'] == 1 )
			{
				$status['new'] = $row['status'];
			}
			elseif( $row['is_complete'] == 1 )
			{
				$status['complete'] = $row['status'];
			}
		}

		$data = IPSMember::load( $this->request['member_id'] );

		$this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) );
		$this->DB->execute();

		if( $this->DB->getTotalRows() == 0 )
		{
			$built_report_main = array(
										'uid'			=> $uid,
										'title'			=> $this->request['title'],
										'status'		=> $status['new'],
										'url'			=> '/index.php?' . $a_url,
										'seoname'		=> $data['members_seo_name'],
										'seotemplate'	=> 'showuser',
										'rc_class'		=> $com_dat['com_id'],
										'updated_by'	=> $this->memberData['member_id'],
										'date_updated'	=> time(),
										'date_created'	=> time(),
										'exdat1'		=> $mem,
										'exdat2'		=> 0,
										'exdat3'		=> 0
									);

			$this->DB->insert( 'rc_reports_index', $built_report_main );
			$rid = $this->DB->getInsertId();
		}
		else
		{
			$the_report	= $this->DB->fetch();
			$rid		= $the_report['id'];
			$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'seoname' => $data['members_seo_name'], 'seotemplate' => 'showuser' ), "id='{$rid}'" );
		}

		/* Load editor stuff */
		$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
		$editor = new $classToLoad();

		$editor->setLegacyMode(false);

		$build_report = array(
							'rid'			=> $rid,
							'report'		=> $editor->process( $this->request['message'] ),
							'report_by'		=> $this->memberData['member_id'],
							'date_reported'	=> time(),
							);

		$this->DB->insert( 'rc_reports', $build_report );

		$reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) );

		$this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" );

		$return_data = array(
							'REDIRECT_URL'	=> $a_url,
							'REPORT_INDEX'	=> $rid,
							'SAVED_URL'		=> '/index.php?' . $url,
							'REPORT'		=> $build_report['report'],
							'TEMPLATE'		=> 'showuser',
							'SEOTITLE'		=> $data['members_seo_name'],
							);

		return $return_data;
	}

	/**
	 * Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
	 *
	 * @param 	array 		Report data
	 * @return	array 		Formatted report data
	 */
	public function formatReportData( $report_data )
	{
		return array(
					'REDIRECT_URL'	=> $report_data['url'],
					'REPORT_INDEX'	=> $report_data['id'],
					'SAVED_URL'		=> str_replace( '&', '&', $report_data['url'] ),
					'REPORT'		=> '',
					'SEOTITLE'		=> $report_data['seoname'],
					'TEMPLATE'		=> 'showuser',
					);
	}

	/**
	 * Where to send user after report is submitted
	 *
	 * @param 	array 		Report data
	 * @return	@e void
	 */
	public function reportRedirect( $report_data )
	{
		if( $report_data['SEOTITLE'] )
		{
			$name['members_seo_name']	= $report_data['SEOTITLE'];
		}
		else
		{
			$name	= $this->DB->buildAndFetch( array( 'select' => 'members_seo_name', 'from' => 'members', 'where' => 'member_id=' . intval($this->request['member_id']) ) );
		}

		$this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], $name['members_seo_name'], 'showuser' );
	}

	/**
	 * Retrieve list of users to send notifications to
	 *
	 * @param 	string 		Group ids
	 * @param 	array 		Report data
	 * @return	array 		Array of users to PM/Email
	 */
	public function getNotificationList( $group_ids, $report_data )
	{
		$notify = array();

		$this->DB->build( array(
								'select'	=> 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
								'from'		=> array( 'members' => 'mem' ),
								'where'		=> 'mem.member_group_id IN(' . $group_ids . ')',
								'add_join'	=> array(
													array(
														'select'	=> 'noti.*',
														'from'		=> array( 'rc_modpref' => 'noti' ),
														'where'		=> 'mem.member_id=noti.mem_id',
														)
													)
							)		);
		$this->DB->execute();

		if( $this->DB->getTotalRows() > 0 )
		{
			while( $row = $this->DB->fetch() )
			{
				$notify[] = $row;
			}
		}

		return $notify;
	}
}


text:
#import "NSDictionary.h"

@interface NSDictionary (FTRegAppleIDSetupUtilities)
- (id)__ftreg_candidateAliases;
- (_Bool)__ftreg_isValidSetupDictionary;
- (_Bool)__ftreg_responseIsUpgrade;
- (id)__ftreg_responseAuthToken;
- (id)__ftreg_responseProfileID;
- (id)__ftreg_responseAppleID;
@end


text:
;(function(Form, Fieldset) {

var same = deepEqual;

module('Fieldset#initialize', {
  setup: function() {
    this.sinon = sinon.sandbox.create();
  },

  teardown: function() {
    this.sinon.restore();
  }
});

test('creates the schema', function() {
  this.sinon.spy(Fieldset.prototype, 'createSchema');

  var fields = {
    title: new Form.Field({ key: 'title' }),
    author: new Form.Field({ key: 'author' })
  };

  var options = {
    fields: fields,
    schema: { legend: 'Test', fields: ['title', 'author'] }
  };

  var fs = new Fieldset(options);

  same(fs.createSchema.callCount, 1);
  same(fs.createSchema.args[0][0], options.schema);
  same(fs.schema, options.schema);
});

test('stores fields defined in the schema', function() {
  var fields = {
    title: new Form.Field({ key: 'title' }),
    author: new Form.Field({ key: 'author' })
  };

  var options = {
    fields: fields,
    schema: ['title', 'author']
  };

  var fs = new Fieldset(options);

  same(_.keys(fs.fields), ['title', 'author']);
});

test('overrides defaults', function() {
  var options = {
    fields: { title: new Form.Field({ key: 'title' }) },
    schema: ['title'],
    template: _.template('')
  };

  var fs = new Fieldset(options);

  same(fs.template, options.template);
});

test('first, uses template defined in options', function() {
  var optionsTemplate = _.template('

'),
      schemaTemplate = _.template('

'),
      protoTemplate = _.template('

'),
      constructorTemplate = _.template('

');

  var CustomFieldset = Fieldset.extend({
    template: protoTemplate
  }, {
    template: constructorTemplate
  });

  var fieldset = new CustomFieldset({
    template: optionsTemplate,
    schema: { fields: [], template: schemaTemplate }
  });

  same(fieldset.template, optionsTemplate);
});

test('second, uses template defined in schema', function() {
  var schemaTemplate = _.template('

'),
      protoTemplate = _.template('

'),
      constructorTemplate = _.template('

');

  var CustomFieldset = Fieldset.extend({
    template: protoTemplate
  }, {
    template: constructorTemplate
  });

  var fieldset = new CustomFieldset({
    schema: { fields: [], template: schemaTemplate }
  });

  same(fieldset.template, schemaTemplate);
});

test('third, uses template defined on prototype', function() {
  var protoTemplate = _.template('

'),
      constructorTemplate = _.template('

');

  var CustomFieldset = Fieldset.extend({
    template: protoTemplate
  }, {
    template: constructorTemplate
  });

  var fieldset = new CustomFieldset({
    schema: { fields: [] }
  });

  same(fieldset.template, protoTemplate);
});

test('fourth, uses template defined on constructor', function() {
  var constructorTemplate = _.template('

');

  var CustomFieldset = Fieldset.extend({
  }, {
    template: constructorTemplate
  });

  var fieldset = new CustomFieldset({
    schema: { fields: [] },
  });

  same(fieldset.template, constructorTemplate);
});

test('Uses Backbone.$ not global', function() {
  var old$ = window.$,
    exceptionCaught = false;

  window.$ = null;

  try {
     var fields = {
        title: new Form.Field({ key: 'title' }),
        author: new Form.Field({ key: 'author' })
      };

      var options = {
        fields: fields,
        schema: { legend: 'Test', fields: ['title', 'author'] }
      };

      var fs = new Fieldset(options).render();
  } catch(e) {
    exceptionCaught = true;
  }

  window.$ = old$;

  ok(!exceptionCaught, ' using global \'$\' to render');
});

module('Fieldset#createSchema', {
  setup: function() {
    this.sinon = sinon.sandbox.create();
  },

  teardown: function() {
    this.sinon.restore();
  }
});

test('converts an array schema into an object with legend', function() {
  var options = {
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: ['title', 'author']
  };

  var fs = new Fieldset(options);

  var schema = fs.createSchema(options.schema);

  same(schema, { legend:null, fields: ['title', 'author'] });
});

test('returns fully formed schema as is', function() {
  var options = {
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: { legend: 'Main', fields: ['title', 'author'] }
  }

  var fs = new Fieldset(options);

  var schema = fs.createSchema(options.schema);

  same(schema, options.schema);
});

module('Fieldset#getFieldAt');

test('returns field at a given index', function() {
  var fs = new Fieldset({
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: { legend: 'Main', fields: ['title', 'author'] }
  });

  same(fs.getFieldAt(0), fs.fields.title);
  same(fs.getFieldAt(1), fs.fields.author);
});

module('Fieldset#templateData');

test('returns schema', function() {
  var fs = new Fieldset({
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: { legend: 'Main', fields: ['title', 'author'] }
  });

  same(fs.templateData(), fs.schema);
});

module('Fieldset#render', {
  setup: function() {
    this.sinon = sinon.sandbox.create();

    this.sinon.stub(Form.Field.prototype, 'render', function() {
      this.setElement($('<field class="'+this.key+'" />'));
      return this;
    });
  },

  teardown: function() {
    this.sinon.restore();
  }
});

test('returns self', function() {
  var fs = new Fieldset({
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: { legend: 'Main', fields: ['title', 'author'] }
  });

  var returnedValue = fs.render();

  same(returnedValue, fs);
});

test('with data-fields placeholder, on inner element', function() {
  var fs = new Fieldset({
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: { legend: 'Main', fields: ['title', 'author'] },
    template: _.template('
<%= legend %>
')
  });

  fs.render();

  same(fs.$el.html(), 'Main<field class="title"></field><field class="author"></field>');
});

test('with data-fields placeholder, on outermost element', function() {
  var fs = new Fieldset({
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: { legend: 'Main', fields: ['title', 'author'] },
    template: _.template('<%= legend %>')
  });

  fs.render();

  same(fs.$el.html(), 'Main<field class="title"></field><field class="author"></field>');
});

module('Form#remove', {
  setup: function() {
    this.sinon = sinon.sandbox.create();

    this.sinon.spy(Form.Field.prototype, 'remove');
  },

  teardown: function() {
    this.sinon.restore();
  }
});

test('removes fieldsets, fields and self', function() {
  var fs = new Fieldset({
    fields: {
      title: new Form.Field({ key: 'title' }),
      author: new Form.Field({ key: 'author' })
    },
    schema: { legend: 'Main', fields: ['title', 'author'] }
  });

  fs.remove();

  same(Form.Field.prototype.remove.callCount, 2);
});

})(Backbone.Form, Backbone.Form.Fieldset);


text:
using System.Reflection;
using Abp.Localization.Sources;
using Abp.Localization.Sources.Xml;
using Abp.Modules;
using Abp.Zero.Configuration;

namespace Abp.Zero
{
    /// <summary>
    /// ABP zero core module.
    /// </summary>
    public class AbpZeroCoreModule : AbpModule
    {
        /// <summary>
        /// Current version of the zero module.
        /// </summary>
        public const string CurrentVersion = "0.6.5.0";

        public override void PreInitialize()
        {
            IocManager.Register<IRoleManagementConfig, RoleManagementConfig>();
            IocManager.Register<IUserManagementConfig, UserManagementConfig>();
            IocManager.Register<IAbpZeroConfig, AbpZeroConfig>();

            Configuration.Settings.Providers.Add<AbpZeroSettingProvider>();

            Configuration.Localization.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    AbpZeroConsts.LocalizationSourceName,
                    new XmlEmbeddedFileLocalizationDictionaryProvider(
                        Assembly.GetExecutingAssembly(), "Abp.Zero.Localization.Source"
                        )));
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }
}


text:
<?php
function print_tree($map, $id_page, $shift = 0)
{
    if(!empty($map))
    {
        foreach($map as $section): ?>
            <option value="<?= $section['id'] ?>" <? if($id_page == $section['id']) echo 'selected'; ?>>
            <? for($i = 0; $i < $shift; $i++)echo ' ';?>
            <?= $section['title'] ?></option>
            <? print_tree($section['children'], $id_page, $shift + 4);
        endforeach;
    }
}
?>

<? if($errors): ?>
<? foreach ($errors as $error): ?>

<?= $error ?>

<? endforeach; ?>

<? endif; ?>

<?=Form::open(NULL, array('class' => 'form-horizontal'))?>

    Родительский раздел:

            <select name="parent_id" class="input-xlarge">
                <option value="0">Без раздела</option>
                <? print_tree($map, $category['parent_id']) ?>
            </select>

    <?=Form::label('title', 'Заголовок:', array('class' => 'control-label',))?>

        <?=Form::input('title', $category['title'], array('type' => 'text', 'id' => 'title'))?>

    <?=Form::label('url', 'Адрес страницы:', array('class' => 'control-label',))?>

        <?=Form::input('url', $category['url'], array('type' => 'text', 'id' => 'url'))?>

    <?=Form::label('priority', 'Приоритет (сортировка):', array('class' => 'control-label',))?>

        <?=Form::input('priority', $category['priority'], array('type' => 'text', 'id' => 'priority'))?>

    <?=Form::label('title_menu', 'Заголовок в меню:', array('class' => 'control-label',))?>

        <?=Form::input('title_menu', $category['title_menu'], array('type' => 'text', 'id' => 'title_menu'))?>

    <?=Form::label('description', 'Description:', array('class' => 'control-label',))?>

        <?=Form::input('description', $category['description'], array('type' => 'text', 'id' => 'description'))?>

    <?=Form::label('keywords', 'Keywords:', array('class' => 'control-label',))?>

        <?=Form::input('keywords', $category['keywords'], array('type' => 'text', 'id' => 'keywords'))?>

    <?=Form::label('content', 'Текст (контент):', array('class' => 'control-label',))?>

        <?=Form::textarea('content', $category['content'], array('id' => 'content'))?>

            <input name="status" type="checkbox" <?= $category['status'] ? 'checked' : null ?>> Показать?

        <button name="submit" type="submit" class="btn btn-success">Сохранить</button>
        <a href="<?= URL::site('admin/categories') ?>" class="btn btn-inverse">Отмена

<?=Form::close()?>


text:
import {
  ControllerConstructor as BeffControllerConstructor,
  ControllerInstance as BeffControllerInstance,
} from '../Controller';

export interface ControllerInstance extends BeffControllerInstance {
  setContext($context: JQuery): void;
  render($context: JQuery): Promise<JQuery>;
  toggle($context: JQuery): void;
}

export interface ControllerConstructor<I extends ControllerInstance> extends BeffControllerConstructor<I> {
}

declare const _default: ControllerConstructor<ControllerInstance>;
export default _default;


text:
package io.github.hhromic.uimr.concurrent;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.Condition;

/**
 * This class provides a skeletal implementation of the {@link UIMRRunnable} interface
 * to minimize the effort required to implement the interface.
 *
 *
Example usage:

 *

 * import io.github.hhromic.uimr.concurrent.AbstractUIMRRunnable;
 *
 * public class MySmartRunnable extends AbstractUIMRRunnable {
 *    {@literal @}Override
 *     public void run() {
 *         System.out.println("I'm smart, my name is " + getName());
 *         try {
 *             // You can call skipCurrentSuspend() to continue without an exception
 *             suspendRunnable(10500.5);  // Nanosecond precision (if available)
 *         } catch (InterruptedException e) {
 *             System.out.println("Oops, I got interrupted.");
 *         }
 *     }
 * }
 *

 *
 *
For a complete use case, see the {@link UIMRExecutor} class example usage.

 *
 * @author Hugo Hromic
 * @since 1.0
 * @see UIMRExecutor
 */
public abstract class AbstractUIMRRunnable implements UIMRRunnable {
    /** Name of this runnable. */
    protected final String name;

    /** Internal lock used for runnable suspending. */
    private final Lock suspendLock = new ReentrantLock();

    /** Internal condition used for runnable suspending. */
    private final Condition suspendStopWaiting = suspendLock.newCondition();

    /** Internal flag to keep waiting while suspending. */
    private boolean suspendKeepWaiting = false;

    /** {@inheritDoc} */
    @Override
    public String getName() {
        return name;
    }

    /** {@inheritDoc} */
    @Override
    public void skipCurrentSuspend() {
        suspendLock.lock();
        try {
            suspendKeepWaiting = false;
            suspendStopWaiting.signalAll();
        } finally {
            suspendLock.unlock();
        }
    }

    /**
      * Creates a new {@code UIMRRunnable} with the given name.
      *
      * @param name the name to assign to this runnable
      */
    public AbstractUIMRRunnable(final String name) {
        this.name = name;
    }

    /**
      * Suspend current execution of this runnable.
      *
      *
If available, this method has nanosecond precision for suspending.

      *
      * @param millisecs the amount of time (in milliseconds) to suspend
      * @throws InterruptedException if the thread is interrupted during suspension
      */
    protected void suspendRunnable(final double millisecs) throws InterruptedException {
        suspendLock.lock();
        try {
            suspendKeepWaiting = true;
            while (suspendKeepWaiting)
                if (suspendStopWaiting.awaitNanos((long)(millisecs * 1000000)) <= 0)
                    suspendKeepWaiting = false;
        } finally {
            suspendLock.unlock();
        }
    }
}


text:
#include "drm/scheme_init_data.h"

#include <string>

#include "gtest/gtest.h"
#include "mpd/content_protection.h"
#include "mpd/mpd_unittest_helper.h"
#include "util/uuid.h"

namespace ndash {
namespace drm {

TEST(ContentProtectionTests, ContentProtectionTest) {
  std::string mime_type = "widevine";
  util::Uuid uuid("09514A5C-F8EB-4B5F-B0C3-97F52B47AE8A");
  size_t length = 10;
  std::unique_ptr<char[]> data = mpd::CreateTestSchemeInitData(length);

  std::unique_ptr<drm::SchemeInitData> scheme_init =
      std::unique_ptr<drm::SchemeInitData>(
          new drm::SchemeInitData(mime_type, std::move(data), length));

  std::string scheme = "https://gvsb.e2e.gfsvc.com/cenc";
  mpd::ContentProtection content_protection(scheme, uuid,
                                            std::move(scheme_init));

  // Constructor
  EXPECT_NE(nullptr, content_protection.GetSchemeInitData());
  EXPECT_EQ(uuid, content_protection.GetUuid());
  EXPECT_EQ(scheme, content_protection.GetSchemeUriId());

  // Equality
  size_t length2 = 10;
  std::unique_ptr<char[]> data2 = mpd::CreateTestSchemeInitData(length2);
  std::unique_ptr<drm::SchemeInitData> scheme_init2 =
      std::unique_ptr<drm::SchemeInitData>(
          new drm::SchemeInitData(mime_type, std::move(data2), length2));
  mpd::ContentProtection content_protection2(scheme, uuid,
                                             std::move(scheme_init2));
  EXPECT_TRUE(content_protection == content_protection2);

  // Different data same length not equal
  size_t length3 = 10;
  std::unique_ptr<char[]> data3 = mpd::CreateTestSchemeInitData(length3);
  data3[0] = -1;
  std::unique_ptr<drm::SchemeInitData> scheme_init3 =
      std::unique_ptr<drm::SchemeInitData>(
          new drm::SchemeInitData(mime_type, std::move(data3), length3));
  mpd::ContentProtection content_protection3(scheme, uuid,
                                             std::move(scheme_init3));
  EXPECT_FALSE(content_protection == content_protection3);

  // Different length not equal
  size_t length4 = 5;
  std::unique_ptr<char[]> data4 = mpd::CreateTestSchemeInitData(length4);
  std::unique_ptr<drm::SchemeInitData> scheme_init4 =
      std::unique_ptr<drm::SchemeInitData>(
          new drm::SchemeInitData(mime_type, std::move(data4), length4));
  mpd::ContentProtection content_protection4(scheme, uuid,
                                             std::move(scheme_init4));
  EXPECT_FALSE(content_protection == content_protection4);

  // Null data, not equal
  mpd::ContentProtection content_protection5(scheme, uuid, nullptr);
  EXPECT_FALSE(content_protection == content_protection5);
}

}  // namespace drm
}  // namespace ndash


text:
/**
 * Creates an empty Set.
 * @class A set is a data structure with non-duplicating member values
 * @constructor
 */

var eSet = function(array) {

  var set = {};
  var values = [];

  /**
   * Function to get type of eStructure object
   * @return {String}
   */
  set.getType = function () {
    return 'eSet';
  };

  /**
   * Function to get size of eSet
   * @return {Integer} Number integer if the element was added or -1 if error occurs
   */
  set.size = function () {
    return values.length;
  };

  /**
   * Function to add single value to set
   * @param {Object} value to add to eSet
   * @return {Boolean} true if value is added successfully, false if error occurs
   */
  set.add = function (value) {
    if (value && !set.exists(value)) {
      values.push(value);
      return true;
    }
    return false;
  };

  /**
   * Get element from specified index
   * @param {Number} index - index i  which element is to be retrieved
   * @return {Object} Element from index
   */
  set.get = function (index) {

    if (!index || index > values.length - 1) {
      return undefined;
    }

    return values[index];
  };

  /**
   * Function to add all array elements into eSet (repeating array elements will be ignored)
   * @param {Array} array to join to eSet
   * @return {Boolean} true if array is added successfully, false if error occurs
   */
  set.addAll = function (array) {
    if (array && array instanceof Array) {

      for (var i = 0; i < array.length; i++) {
        this.add(array[i]);
      }
    }
    return false;
  };

  /**
   * Function to check if value is present in set
   * @param {Object} value to check if in set or not
   * @return {Boolean} true if present, false if not present
   */
  set.exists = function (value) {
    if (!value) {
      return false;
    }

    for (var i = 0; i < values.length; i++) {
      if (eCompare(values[i], value)) {
        return true;
      }
    }
    return false;
  };

  /**
   * Function to remove the last added element from set
   * @return {Object} Last element, undefined if set is empty
   */
  set.pop = function () {
    if (this.length === 0) {
      return undefined;
    }
    var last = values.splice(values.length - 1, 1);
    return last[0];
  };

  /**
   * Function to remove the first element from set
   * @return {Object} First element, undefined if set is empty
   */
  set.shift = function () {
    if (this.length === 0) {
      return undefined;
    }
    var last = values.splice(0, 1);
    return last[0];
  };

  /**
   * Join all unique elements in two sets or a set and collection
   * @param {Object} set or collection to be unified with calling set
   * @return {Object} new set from the union
   */
  set.union = function (set) {
    if (set && (set instanceof Array || set.getType() === this.getType())) {
      var newSet;
      if (set instanceof Array) {
        newSet = new eSet(set);
        newSet.addAll(set);
        return newSet;
      } else {
        newSet = new eSet(this.toArray());
        newSet.addAll(set.toArray());
        return newSet;
      }
    } else {
      return -1
    }
  };

  /**
   * Get intersection of set (returns all similar elements in set)
   * @param {Object} set or collection to be intersected with calling set
   * @return {Object} new set from the intersection
   */
  set.intersection = function (set) {
    var self = this;
    if (set && (set instanceof Array || set.getType() === this.getType())) {
      var newSet;
      if (set instanceof Array) {
        newSet = new eSet();
        eForEach(set, function (element) {
          if (self.exists(element)) {
            newSet.add(element);
          }
        });
        return newSet;
      } else {
        newSet = new eSet();
        eForEach(set.toArray(), function (element) {
          if (self.exists(element)) {
            newSet.add(element);
          }
        });
        return newSet;
      }
    } else {
      return -1
    }
  };

  /**
   * Get difference of set - should return the set of values that are in this set, excluding the values that are also in the other set
   * @param {Object} set or collection to be differentiated with calling set
   * @return {Object} new set from the difference operation
   */
  set.difference = function (set) {
    var self = this;
    if (set && (set instanceof Array || set.getType() === this.getType())) {
      var newSet;
      var paramSet;
      if (set instanceof Array) {
        newSet = new eSet();
        paramSet = new eSet(set);
        eForEach(self.toArray(), function (element) {
          if (!paramSet.exists(element)) {
            newSet.add(element);
          }
        });
        return newSet;
      } else {
        newSet = new eSet();
        eForEach(self.toArray(), function (element) {
          if (!set.exists(element)) {
            newSet.add(element);
          }
        });
        return newSet;
      }
    } else {
      return -1
    }
  };

  /**
   * Remove element from specified index
   * @param {Number} index - index in which element is to be removed from
   * @return {Object} Element popped out of set
   */
  set.removeFromIndex = function (index) {

    if (!index || index > values.length - 1) {
      return undefined;
    }

    var removed = values.splice(index, 1);
    return removed[0];
  };

  /**
   * Remove element from set if exists
   * @param {Object} element - index in which element is to be removed from
   * @return {Boolean} true if removal is successful, false if otherwise
   */
  set.remove = function (element) {
    if (!element) {
      return false;
    }
    set.forEach(function (currentElement, index) {
      if (eCompare(element, currentElement)) {
        values.splice(index, 1);
        return true;
      }
    });
    return false;
  };

  /**
   * Remove element from set if exists, add if not
   * @param {Object} element - index in which element is to be removed from
   * @return {Boolean} true if removal is successful, false if otherwise
   */
  set.toggle = function (element) {
    if (!element) {
      return false;
    }
    if (this.exists(element)) {
      this.remove(element);
    } else {
      this.add(element);
    }
  };

  /**
   * Iterate over set elements
   * @param {Function} callBack - call back function to be invoked on each iteration
   */
  set.forEach = function (callBack) {
    if (typeof callBack !== 'function') {
      throw new TypeError(callBack + ' is not a function');
    } else {
      for (var x = 0; x < values.length; x++) {
        callBack(values[x], x, values);
      }
    }
  };

  /**
   * Check if set is composed of numbers only or not
   */
  set.isMaths = function () {
    var status = true;
    this.forEach(function (currentElement) {
      if (typeof currentElement !== 'number') {
        status = false;
      }
    });
    return status;
  };

  /**
   * Get biggest element in set (If it is a mathematical set)
   * @return {Object} Number
   */
  set.max = function () {
    if (this.isMaths()) {
      return Math.max.apply(null, this.toArray());
    }
    return undefined;
  };

  /**
   * Get smallest element in set (If it is a mathematical set)
   * @return {Object} Number
   */
  set.min = function () {
    if (this.isMaths()) {
      return Math.min.apply(null, this.toArray());
    }
    return undefined;
  };

  /**
   * Get mean of set (If it is a mathematical set)
   * @return {Object} Number
   */
  set.mean = function () {
    if (this.isMaths()) {
      var sum = 0;
      var collection = [];
      this.forEach(function (element, index, wholeCollection) {
        sum += element;
        collection = wholeCollection;
      });
      return sum / collection.length;
    }
    return undefined;
  };

  /**
   * Get variance of set (If it is a mathematical set)
   * @param {Number} decimalPlace - optional decimal place to format the result
   * @return {Object} Number
   */
  set.variance = function (decimalPlace) {
    if (this.isMaths() && this.size() > 0) {
      var place = (typeof decimalPlace === 'number' && (decimalPlace % 1) === 0) ? decimalPlace : 2;
      var mean = this.mean();
      var subMeanSquared = [];
      var subMeanSquaredSum = 0;
      this.forEach(function (currentElement) {
        subMeanSquared.push(Math.pow(currentElement - mean, 2));
      });
      for (var x = 0; x < subMeanSquared.length; x++) {
        subMeanSquaredSum += subMeanSquared[x];
      }
      return parseFloat((subMeanSquaredSum / (this.size() - 1)).toFixed(place));
    }
    return undefined;
  };

  /**
   * Get standard deviation of set (If it is a mathematical set)
   * @param {Number} decimalPlace - optional decimal place to format the result
   * @return {Object} Number
   */
  set.standardDeviation = function (decimalPlace) {
    var variance = this.variance();
    if (variance) {
      var place = (typeof decimalPlace === 'number' && (decimalPlace % 1) === 0) ? decimalPlace : 2;
      return parseFloat(Math.sqrt(variance).toFixed(place));
    }
    return undefined;
  };

  /**
   * Reset set to clean state
   */
  set.clear = function () {
    values = [];
  };

  /**
   * Get array representation of set
   * @return {Object} Array
   */
  set.toArray = function () {
    return values;
  };

  // initializing logic
  if (array) {
    if (array instanceof Array) {
      set.addAll(array);
    }
  }

  return set;
};

eGlobal.eSet = eSet;


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycotaxon 6(1): 183 (1977)

#### Original name
Clitocybe lazulina H.E. Bigelow

### Remarks
null


text:
package com.github.nbgl.geom;

public abstract class Point2D extends java.awt.geom.Point2D{
}


text:
'use strict';

var webpack = require('webpack');

var plugins = [
    new webpack.optimize.OccurenceOrderPlugin(),
    new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
    })
];

if (process.env.NODE_ENV === 'production') {
    plugins.push(
        new webpack.optimize.UglifyJsPlugin({
            compressor: {
                screw_ie8: true,
                warnings: false
            }
        })
    );
}

module.exports = {
    externals: {
        react: {
            root: 'React',
            commonjs2: 'react',
            commonjs: 'react',
            amd: 'react'
        }
    },
    module: {
        loaders: [{
            test: /\.js$/,
            loaders: ['babel-loader'],
            exclude: /node_modules/
        }]
    },
    output: {
        library: 'ReactCustomScrollbars',
        libraryTarget: 'umd'
    },
    plugins: plugins,
    resolve: {
        extensions: ['', '.js']
    }
};


text:
//-----------------------------------------------------------------------
// <copyright file="WorldAssemblyData.cs" company="Auralia">
//     Copyright (C) 2013 Auralia
// </copyright>
//-----------------------------------------------------------------------

namespace Auralia.NationStates.Api
{
    using System;

    /// <summary>
    /// Represents the data returned from a NationStates World Assembly API request.
    /// </summary>
    [Serializable]
    public class WorldAssemblyData
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="WorldAssemblyData"/> class.
        /// </summary>
        public WorldAssemblyData()
        {
            this.NumberOfMembers = null;
            this.NumberOfDelegates = null;
            this.Delegates = null;
            this.Members = null;
            this.Happenings = null;
            this.MembershipHappenings = null;
            this.ResolutionAtVote = null;
            this.LastResolution = null;
        }

        /// <summary>
        /// Gets the number of World Assembly member nations. Corresponds to the <c>numnations</c> World Assembly API shard.
        /// </summary>
        /// <value>The number of World Assembly member nations.</value>
        public int? NumberOfMembers
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets the number of World Assembly regional delegates. Corresponds to the <c>numdelegates</c> World Assembly API shard.
        /// </summary>
        /// <value>The number of World Assembly regional delegates.</value>
        public int? NumberOfDelegates
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets the World Assembly's member nations. Corresponds to the <c>members</c> World Assembly API shard.
        /// </summary>
        /// <value>The World Assembly's member nations.</value>
        public string[] Members
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets the World Assembly's regional delegates. Corresponds to the <c>delegates</c> World Assembly API shard.
        /// </summary>
        /// <value>The World Assembly's regional delegates.</value>
        public string[] Delegates
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets the World Assembly's happenings. Corresponds to the <c>happenings</c> World Assembly API shard.
        /// </summary>
        /// <value>The World Assembly's happenings.</value>
        public Happening[] Happenings
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets the World Assembly's membership happenings. Corresponds to the <c>memberlog</c> World Assembly API shard.
        /// </summary>
        /// <value>The World Assembly's membership happenings.</value>
        public Happening[] MembershipHappenings
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets the General Assembly or Security Council resolution at vote, depending on the council specified in the request. Corresponds to the <c>resolution</c> World Assembly API shard.
        /// </summary>
        /// <value>Gets the General Assembly or Security Council resolution at vote, depending on the council specified in the request.</value>
        public Resolution ResolutionAtVote
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets a description of the last General Assembly or Security Council resolution at vote, depending on the council specified in the request. Corresponds to the <c>lastresolution</c> World Assembly API shard.
        /// </summary>
        /// <value>A description of the last General Assembly or Security Council resolution at vote, depending on the council specified in the request.</value>
        public string LastResolution
        {
            get;
            internal set;
        }

        /// <summary>
        /// Represents an entry in the World Assembly's happenings.
        /// </summary>
        public class Happening
        {
            /// <summary>
            /// Initializes a new instance of the <see cref="Happening"/> class.
            /// </summary>
            public Happening()
            {
                this.Timestamp = null;
                this.Text = null;
            }

            /// <summary>
            /// Gets the entry's timestamp.
            /// </summary>
            /// <value>The entry's timestamp.</value>
            public DateTime? Timestamp
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the entry's text.
            /// </summary>
            /// <value>The entry's text.</value>
            public string Text
            {
                get;
                internal set;
            }
        }

        /// <summary>
        /// Represents the General Assembly or Security Council resolution at vote, depending on the council specified in the request.
        /// </summary>
        public class Resolution
        {
            /// <summary>
            /// Initializes a new instance of the <see cref="Resolution"/> class.
            /// </summary>
            public Resolution()
            {
                this.Category = null;
                this.Created = null;
                this.Text = null;
                this.Title = null;
                this.Subcategory = null;
                this.Author = null;
                this.VotesFor = null;
                this.VotesAgainst = null;
                this.VotesForHistory = null;
                this.VotesAgainstHistory = null;
                this.DelegateVotesHistory = null;
                this.DelegateVotesFor = null;
                this.DelegateVotesAgainst = null;
            }

            /// <summary>
            /// Gets the resolution's category.
            /// </summary>
            /// <value>The resolution's category.</value>
            public string Category
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the date and time when the resolution went to vote.
            /// </summary>
            /// <value>The date and time when the resolution went to vote.</value>
            public DateTime? Created
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the resolution's text.
            /// </summary>
            /// <value>The resolution's test.</value>
            public string Text
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the resolution's title.
            /// </summary>
            /// <value>The resolution's title.</value>
            public string Title
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the resolution's subcategory.
            /// </summary>
            /// <value>The resolution's subcategory.</value>
            public string Subcategory
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the resolution's author.
            /// </summary>
            /// <value>The resolution's author.</value>
            public string Author
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the number of votes in favor of the resolution.
            /// </summary>
            /// <value>The number of votes in favor of the resolution.</value>
            public int? VotesFor
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the number of votes against the resolution.
            /// </summary>
            /// <value>The number of votes against the resolution.</value>
            public int? VotesAgainst
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the number of votes in favor of the resolution at each hour since the resolution went to vote. Corresponds to the <c>votetrack</c> World Assembly resolution API shard.
            /// </summary>
            /// <value>A log of the number of votes in favor of the resolution at each hour since the resolution went to vote.</value>
            public int[] VotesForHistory
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the number of votes against the resolution at each hour since the resolution went to vote. Corresponds to the <c>votetrack</c> World Assembly resolution API shard.
            /// </summary>
            /// <value>A log of the number of votes against the resolution at each hour since the resolution went to vote.</value>
            public int[] VotesAgainstHistory
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets a record of delegate vote actions with respect to the resolution since it went to vote. Corresponds to the <c>dellog</c> World Assembly resolution API shard.
            /// </summary>
            /// <value>A record of delegate vote actions with respect to the resolution since it went to vote.</value>
            public DelegateVoteAction[] DelegateVotesHistory
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the delegates that have voted in favor of the resolution. Corresponds to the <c>delvotes</c> World Assembly resolution API shard.
            /// </summary>
            /// <value>The delegates that have voted in favor of the resolution.</value>
            public DelegateVote[] DelegateVotesFor
            {
                get;
                internal set;
            }

            /// <summary>
            /// Gets the delegates that have voted against the resolution. Corresponds to the <c>delvotes</c> World Assembly resolution API shard.
            /// </summary>
            /// <value>The delegates that have voted against the resolution.</value>
            public DelegateVote[] DelegateVotesAgainst
            {
                get;
                internal set;
            }

            /// <summary>
            /// Represents a delegate's vote action with respect to the resolution.
            /// </summary>
            public class DelegateVoteAction
            {
                /// <summary>
                /// Initializes a new instance of the <see cref="DelegateVoteAction"/> class.
                /// </summary>
                public DelegateVoteAction()
                {
                    this.Timestamp = null;
                    this.Name = null;
                    this.Action = null;
                    this.Votes = null;
                }

                /// <summary>
                /// Gets the date and time when the vote was made.
                /// </summary>
                /// <value>The date and time when the vote was made.</value>
                public DateTime? Timestamp
                {
                    get;
                    internal set;
                }

                /// <summary>
                /// Gets the delegate's name.
                /// </summary>
                /// <value>The delegate's name.</value>
                public string Name
                {
                    get;
                    internal set;
                }

                /// <summary>
                /// Gets the delegate's vote action.
                /// </summary>
                /// <value>The delegate's vote action.</value>
                public string Action
                {
                    get;
                    internal set;
                }

                /// <summary>
                /// Gets the delegate's number of votes.
                /// </summary>
                /// <value>The delegate's number of votes.</value>
                public int? Votes
                {
                    get;
                    internal set;
                }
            }

            /// <summary>
            /// Represents a delegate's vote on the resolution.
            /// </summary>
            public class DelegateVote
            {
                /// <summary>
                /// Initializes a new instance of the <see cref="DelegateVote"/> class.
                /// </summary>
                public DelegateVote()
                {
                    this.Timestamp = null;
                    this.Name = null;
                    this.Votes = null;
                }

                /// <summary>
                /// Gets the date and time when the vote was made.
                /// </summary>
                /// <value>The date and time when the vote was made.</value>
                public DateTime? Timestamp
                {
                    get;
                    internal set;
                }

                /// <summary>
                /// Gets the delegate's name.
                /// </summary>
                /// <value>The delegate's name.</value>
                public string Name
                {
                    get;
                    internal set;
                }

                /// <summary>
                /// Gets the delegate's number of votes.
                /// </summary>
                /// <value>The delegate's number of votes.</value>
                public int? Votes
                {
                    get;
                    internal set;
                }
            }
        }
    }
}


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

var assert = require('assert');

// Test includes
var testutil = require('../../../util/util');
var blobtestutil = require('../../../framework/blob-test-utils');

// Lib includes
var common = require('azure-common');
var storage = require('azure-storage-legacy');

var Constants = common.Constants;
var HttpConstants = Constants.HttpConstants;

var containerNames = [];
var containerNamesPrefix = 'cont';

var testPrefix = 'sharedkeylite-tests';

var blobService;
var suiteUtil;

suite('sharedkeylite-tests', function () {
  suiteSetup(function (done) {
    blobService = storage.createBlobService();
    suiteUtil = blobtestutil.createBlobTestUtils(blobService, testPrefix);
    suiteUtil.setupSuite(done);
  });

  suiteTeardown(function (done) {
    suiteUtil.teardownSuite(done);
  });

  setup(function (done) {
    suiteUtil.setupTest(done);
  });

  teardown(function (done) {
    suiteUtil.teardownTest(done);
  });

  test('CreateContainer', function (done) {
    blobService.authenticationProvider = new storage.SharedKeyLite(blobService.storageAccount, blobService.storageAccessKey);

    var containerName = testutil.generateId(containerNamesPrefix, containerNames, suiteUtil.isMocked);

    blobService.createContainer(containerName, function (createError, container1, createContainerResponse) {
      assert.equal(createError, null);
      assert.notEqual(container1, null);
      if (container1) {
        assert.notEqual(container1.name, null);
        assert.notEqual(container1.etag, null);
        assert.notEqual(container1.lastModified, null);
      }

      assert.equal(createContainerResponse.statusCode, HttpConstants.HttpResponseCodes.Created);

      // creating again will result in a duplicate error
      blobService.createContainer(containerName, function (createError2, container2) {
        assert.equal(createError2.code, Constants.BlobErrorCodeStrings.CONTAINER_ALREADY_EXISTS);
        assert.equal(container2, null);

        done();
      });
    });
  });
});


text:
<?php
$niveles = array(12 => 'primarias',13 => 'secundarias',22 => 'bachilleratos')
?>

			<?php $this->include_template("top5","home/single"); ?>

			<?=file_get_contents($this->config->blog_address."notas")?>

				<a class="button-frame static" href="<?=$this->config->blog_address?>">

						Consulta más información en nuestro blog

	<?php $this->include_template('sidebar','home');?>


text:
package org.kuali.rice.location.impl.campus;

import org.apache.commons.lang.StringUtils;
import org.kuali.rice.core.api.criteria.CriteriaLookupService;
import org.kuali.rice.core.api.criteria.GenericQueryResults;
import org.kuali.rice.core.api.criteria.QueryByCriteria;
import org.kuali.rice.core.api.criteria.QueryResults;
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
import org.kuali.rice.krad.data.DataObjectService;
import org.kuali.rice.krad.service.BusinessObjectService;
import org.kuali.rice.krad.service.KRADServiceLocator;
import org.kuali.rice.location.api.campus.Campus;
import org.kuali.rice.location.api.campus.CampusQueryResults;
import org.kuali.rice.location.api.campus.CampusService;
import org.kuali.rice.location.api.campus.CampusType;
import org.kuali.rice.location.api.campus.CampusTypeQueryResults;
import org.springframework.beans.factory.annotation.Required;

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

import static java.util.Collections.singletonMap;

public class CampusServiceImpl implements CampusService {
    private DataObjectService dataObjectService;

	/**
     * @see org.kuali.rice.location.api.campus.CampusService#getCampus(String code)
     */
	@Override
	public Campus getCampus(String code) {
		if (StringUtils.isBlank(code)) {
            throw new RiceIllegalArgumentException("code is blank");
        }
        CampusBo campusBo = getDataObjectService().find(CampusBo.class, code);
        return CampusBo.to(campusBo);
	}

	/**
     * @see org.kuali.rice.location.api.campus.CampusService#findAllCampuses
     */
	@Override
	public List<Campus> findAllCampuses() {
        QueryByCriteria qbc = QueryByCriteria.Builder.forAttribute("active", true).build();
        QueryResults<CampusBo> campusBos = getDataObjectService().findMatching(CampusBo.class,qbc);
        return this.convertListOfCampusBosToImmutables(campusBos.getResults());
	}

	/**
     * @see org.kuali.rice.location.api.campus.CampusService#getCampusType(String code)
     */
	@Override
	public CampusType getCampusType(String code) {
		if (StringUtils.isBlank(code)) {
            throw new RiceIllegalArgumentException("code is blank");
        }
        CampusTypeBo campusTypeBo = dataObjectService.find(CampusTypeBo.class, code);
        return CampusTypeBo.to(campusTypeBo);
	}

	/**
     * @see org.kuali.rice.location.api.campus.CampusService#findAllCampusTypes
     */
	@Override
	public List<CampusType> findAllCampusTypes() {
        QueryByCriteria qbc = QueryByCriteria.Builder.forAttribute("active", true).build();
        QueryResults<CampusTypeBo> campusTypeBos = dataObjectService.findMatching(CampusTypeBo.class,qbc);
		return this.convertListOfCampusTypesBosToImmutables(campusTypeBos.getResults());
	}

    @Override
    public CampusQueryResults findCampuses(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException {
        incomingParamCheck(queryByCriteria, "queryByCriteria");

        QueryResults<CampusBo> results = dataObjectService.findMatching(CampusBo.class, queryByCriteria);

        CampusQueryResults.Builder builder = CampusQueryResults.Builder.create();
        builder.setMoreResultsAvailable(results.isMoreResultsAvailable());
        builder.setTotalRowCount(results.getTotalRowCount());

        final List<Campus.Builder> ims = new ArrayList<Campus.Builder>();
        for (CampusBo bo : results.getResults()) {
            ims.add(Campus.Builder.create(bo));
        }

        builder.setResults(ims);
        return builder.build();
    }

    @Override
    public CampusTypeQueryResults findCampusTypes(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException {
        incomingParamCheck(queryByCriteria, "query");

        QueryResults<CampusTypeBo> results = dataObjectService.findMatching(CampusTypeBo.class, queryByCriteria);

        CampusTypeQueryResults.Builder builder = CampusTypeQueryResults.Builder.create();
        builder.setMoreResultsAvailable(results.isMoreResultsAvailable());
        builder.setTotalRowCount(results.getTotalRowCount());

        final List<CampusType.Builder> ims = new ArrayList<CampusType.Builder>();
        for (CampusTypeBo bo : results.getResults()) {
            ims.add(CampusType.Builder.create(bo));
        }

        builder.setResults(ims);
        return builder.build();
    }

    private List<Campus> convertListOfCampusBosToImmutables(List<CampusBo> campusBos) {
        ArrayList<Campus> campuses = new ArrayList<Campus>();
        for (CampusBo bo : campusBos) {
            Campus campus = CampusBo.to(bo);
            campuses.add(campus) ;
        }
        return Collections.unmodifiableList(campuses);
    }

    private List<CampusType> convertListOfCampusTypesBosToImmutables(List<CampusTypeBo> campusTypeBos) {
        ArrayList<CampusType> campusTypes = new ArrayList<CampusType>();
        for (CampusTypeBo bo : campusTypeBos) {
            CampusType campusType = CampusTypeBo.to(bo);
            campusTypes.add(campusType) ;
        }
        return Collections.unmodifiableList(campusTypes);
    }

    private void incomingParamCheck(Object object, String name) {
        if (object == null) {
            throw new RiceIllegalArgumentException(name + " was null");
        } else if (object instanceof String
                && StringUtils.isBlank((String) object)) {
            throw new RiceIllegalArgumentException(name + " was blank");
        }
    }

    public DataObjectService getDataObjectService() {
        return dataObjectService;
    }

    @Required
    public void setDataObjectService(DataObjectService dataObjectService) {
        this.dataObjectService = dataObjectService;
    }
}


text:
namespace chrono {
namespace modal {

/// Generic A*x callback.
/// Inherit from this class to define how to compute A*x
class ChApiModal callback_Ax {
public:
    // Inherit this. It must compute A*x. How A is stored (full, sparse, factorised, etc. ) is up to you.
    virtual void compute(ChVectorDynamic<std::complex<double>>& A_x,    ///< output: result of A*x. Assume already sized.
        const ChVectorDynamic<std::complex<double>>& x          ///< input:  x in A*x
    ) {};

    virtual ~callback_Ax() {};
};

//
// Ready-to-use callbacks for the most relevant cases: sparse matrices, generalized, shift&invert:
//

/// The callback to be used for "A*x"  where for shift&invert is: A = (As - sigma Bs)\Bs ,
/// so A*x = (As - sigma Bs)\(Bs*x), just like a linear system with coefficient matrix (As - sigma Bs) and known rhs  Bs*x
///
class ChApiModal callback_Ax_sparse_shiftinvert : public callback_Ax {
    public:
    callback_Ax_sparse_shiftinvert(
            const chrono::ChSparseMatrix& mA,
            const chrono::ChSparseMatrix& mB,
            double shift,
            ChDirectSolverLS* mlinear_solver = 0   ///< optional direct solver/factorization. Default is ChSolverSparseQR
        );

	~callback_Ax_sparse_shiftinvert();

	void compute(chrono::ChVectorDynamic<std::complex<double>>& A_x,     ///< output: result of A*x
		const chrono::ChVectorDynamic<std::complex<double>>& x  ///< input:  x in A*x
	) override;

	ChDirectSolverLS* linear_solver;
	chrono::ChSparseMatrix Bd;
	float default_solver;

    double sigma;
};

/// The callback to be used for "A*x"  where for shift&invert is: A = (As - sigma Bs)\Bs , with COMPLEX sigma shift,
/// so A*x = (As - sigma Bs)\(Bs*x), just like a linear system with coefficient matrix (As - sigma Bs) and known rhs  Bs*x
///
class ChApiModal callback_Ax_sparse_complexshiftinvert : public callback_Ax {
    public:
    callback_Ax_sparse_complexshiftinvert(
            const chrono::ChSparseMatrix& mA,
            const chrono::ChSparseMatrix& mB,
            std::complex<double> shift,
            ChDirectSolverLScomplex* mlinear_solver = 0  ///< optional direct solver/factorization. Default is ChSolverSparseComplexQR
        );

    ~callback_Ax_sparse_complexshiftinvert();

    void compute(   chrono::ChVectorDynamic<std::complex<double>>& A_x,     ///< output: result of A*x
                    const chrono::ChVectorDynamic<std::complex<double>>& x  ///< input:  x in A*x
    ) override;

	ChDirectSolverLScomplex* linear_solver;
    Eigen::SparseMatrix<std::complex<double>, Eigen::ColMajor> Bd;
	float default_solver;
    std::complex<double> sigma;
};

/// Compute (complex) eigenvalues and eigenvectors
/// using the Krylov-Schur algorithm.
/// Adapted from Matlab code at  https://github.com/dingxiong/KrylovSchur
/// Use one of the chrono::modal::callback_Ax provided above depending on the type
/// of problem that you must solve.

class  ChApiModal ChKrylovSchurEig  {
public:

    // Construct and compute results, returned in v and eig.
    ChKrylovSchurEig(
        ChMatrixDynamic<std::complex<double>>& v,   ///< output matrix with eigenvectors as columns, will be resized
        ChVectorDynamic<std::complex<double>>& eig, ///< output vector with eigenvalues (real part not zero if some damping), will be resized
        bool& isC,									///< 0 = k-th eigenvalue is real, 1= k-th and k-th+1 are complex conjugate pairs
        bool& flag,									///< 0 = has converged, 1 = hasn't converged
        int& nc,									///< number of converged eigenvalues
        int& ni,									///< number of used iterations
        callback_Ax* Ax_function,					///< compute the A*x operation, assuming standard eigenvalue problem A*v=lambda*v.
        ChVectorDynamic<std::complex<double>>& v1,  ///< initial approx of eigenvector, or random
        const int n,								///< size of A
        const int k,								///< number of needed eigenvalues
        const int m,								///< Krylov restart threshold (largest dimension of krylov subspace)
        const int maxIt,							///< max iteration number
        const double tol							///< tolerance
    );
};

}  // end namespace modal

}  // end namespace chrono

#endif


text:
<button type="button" class="btn btn-default btn-lg"><svg class="cyclops-icon" aria-hidden="true"><use xlink:href='#icon-plus-circle' /></svg> add item</button>

<button type="button" class="btn btn-primary"><svg class="cyclops-icon" aria-hidden="true"><use xlink:href='#icon-plus-circle' /></svg> add item</button>

<button type="button" class="btn btn-success"><svg class="cyclops-icon" aria-hidden="true"><use xlink:href='#icon-plus-circle' /></svg> add item</button>

<button type="button" class="btn btn-warning"><svg class="cyclops-icon" aria-hidden="true"><use xlink:href='#icon-plus-circle' /></svg> add item</button>

<button type="button" class="btn btn-danger btn-sm"><svg class="cyclops-icon" aria-hidden="true"><use xlink:href='#icon-plus-circle' /></svg> add item</button>

<button type="button" class="btn btn-inverse btn-mini"><svg class="cyclops-icon" aria-hidden="true"><use xlink:href='#icon-plus-circle' /></svg> add item</button>

<button type="button" class="btn btn-outline"><svg class="cyclops-icon" aria-hidden="true"><use xlink:href='#icon-plus-circle' /></svg> add item</button>


text:
import * as React from 'react';
import {
  FormControl,
  FormControlProps,
  FormGroup,
  InputGroup,
} from 'react-bootstrap';
import { findDOMNode } from 'react-dom';
import { Icon } from 'react-fa';
import { Observable } from 'rxjs';

import { Command } from '../../../WebRx';
import { BindableInput } from '../../Common/BindableInput/BindableInput';
import { CommandButton } from '../../Common/CommandButton/CommandButton';
import { ItemListPanelView } from '../../Common/ItemListPanel/ItemListPanelView';
import { ListGroupView } from '../../Common/ListItems/ListGroupView';
import { BaseView, BaseViewProps } from '../../React';
import { TodoItemViewModel, TodoListViewModel } from './TodoListViewModel';

import './TodoList.less';

export interface TodoListProps {
  shadow?: boolean;
}

export interface TodoListViewProps
  extends BaseViewProps<TodoListViewModel>,
    TodoListProps {}

export class TodoListView extends BaseView<
  TodoListViewProps,
  TodoListViewModel
> {
  private inputRef = React.createRef<FormControl>();

  constructor(props: any) {
    super(props);

    this.renderItem = this.renderItem.bind(this);
    this.focusInput = this.focusInput.bind(this);
  }

  componentDidMount() {
    this.focusInput();
  }

  render() {
    const { className, props, rest } = this.restProps(x => {
      const { shadow } = x;
      return { shadow };
    });

    return (

        <ItemListPanelView
          viewModel={this.viewModel.list}
          collapsible
          pager
          search
          compact
          emptyContent={this.renderEmptyContent()}
          shadow={this.props.shadow}
          itemTemplate={this.renderItem}
          headerContent="Canonical Todo List"
          teaserContent={this.renderTeaser()}
          footerContent={this.renderFooter()}
        >
          <ListGroupView />
        </ItemListPanelView>

    );
  }

  protected renderItem(item: TodoItemViewModel) {
    return <TodoItemView viewModel={item} remove={this.viewModel.removeItem} />;
  }

  protected renderEmptyContent() {
    if (this.viewModel.list.count.value > 0) {
      return 'No todo items to show.';
    }

    return 'No todo items have been created yet.';
  }

  protected renderTeaser() {
    return (
      <FormGroup className="TodoList-teaser">
        <InputGroup>
          <BindableInput boundProperty={this.viewModel.newItemContent}>
            <FormControl
              ref={this.inputRef}
              id="newItemContent"
              type="text"
              placeholder="Type in a todo item here..."
              onKeyDown={this.bindEventToCommand(
                x => x.addItem,
                undefined,
                (_, e: React.KeyboardEvent<any>) => e.keyCode === 13,
                () => this.focusInput(),
              )}
            />
          </BindableInput>
          <InputGroup.Button>
            <CommandButton
              bsStyle="success"
              command={this.viewModel.addItem}
              onClick={this.focusInput}
            >
              <Icon name="plus" />
              {' Add New Todo Item'}
            </CommandButton>
          </InputGroup.Button>
        </InputGroup>
      </FormGroup>
    );
  }

  protected renderFooter() {
    return null;
  }

  private focusInput() {
    this.wxr.focusElement(this.inputRef.current);
  }
}

export interface TodoItemProps {
  remove: Command<TodoItemViewModel>;
}

export interface TodoItemViewProps
  extends BaseViewProps<TodoItemViewModel>,
    TodoItemProps {}

export class TodoItemView extends BaseView<
  TodoItemViewProps,
  TodoItemViewModel
> {
  constructor(props: any) {
    super(props);

    this.getRemoveCommand = this.getRemoveCommand.bind(this);
  }

  updateOn(viewModel: Readonly<TodoItemViewModel>) {
    return [viewModel.completed.changed];
  }

  render() {
    const { className, props, rest } = this.restProps(x => {
      const { remove } = x;
      return { remove };
    });

    return (

          <CommandButton
            plain
            onClick={this.bindEventToCommand(x => x.toggleCompleted)}
            stopPropagation
            preventDefault
          >
            <Icon
              name={
                this.viewModel.completed.value ? 'check-circle' : 'circle-o'
              }
              size="lg"
              fixedWidth
            />
          </CommandButton>
          {`[ ${this.viewModel.id} ] `}
          {this.viewModel.content}

          <CommandButton
            bsStyle="danger"
            bsSize="xs"
            componentClass="a"
            command={this.getRemoveCommand}
            commandParameter={this.viewModel}
          >
            <Icon name="times" fixedWidth />
          </CommandButton>

    );
  }

  protected getRemoveCommand() {
    return this.props.remove;
  }
}


text:
package eu.faredge.edgeInfrastructure.registry.models.dcm;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class DCM
{

	@JsonIgnore
	private Integer dcm_id;
	private String uri;
	private String id;
	private String macAddress;
	private DataSourceDefinitionReferenceIDs dataSourceDefinitionReferenceIDs;
	//private List<String> dataSourceDefinitionReferenceID;

	public String getUri()
	{
		return uri;
	}

	public void setUri(String uri)
	{
		this.uri = uri;
	}
	public String getId()
	{
		return id;
	}

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

	public String getMacAddress()
	{
		return macAddress;
	}

	public void setMacAddress(String macAddress)
	{
		this.macAddress = macAddress;
	}

	public DataSourceDefinitionReferenceIDs getDataSourceDefinitionReferenceIDs() {
		return dataSourceDefinitionReferenceIDs;
	}

	public void setDataSourceDefinitionReferenceIDs(DataSourceDefinitionReferenceIDs dataSourceDefinitionReferenceIDs) {
		this.dataSourceDefinitionReferenceIDs = dataSourceDefinitionReferenceIDs;
	}

	@JsonIgnore
	public Integer getDcm_id() {
		return dcm_id;
	}

	@JsonIgnore
	public void setDcm_id(Integer dcm_id) {
		this.dcm_id = dcm_id;
	}

}


text:
A first stab at a fuzzer.

## Installation
Use bundler to install the dependencies

    bundle install

## Usage
To use woollybear on any given web application, create a script in the `bin` directory. `require` the woollybear application and call the fuzz method on it.

    require './woollybear'

    WoollyBear.fuzz('http://localhost/dvwa')

Optionally, you can pass a configuration block to the fuzz method.

    require './woollybear'

    WoollyBear.fuzz('http://localhost/dvwa') do |config|
      config.wait = 5
    end

Possible configuration options are

- **authenticate**=true/false Supplied URL requires authentication. If authenticate is set to true, woollybear expects you to supply login_action, username_field, password_field, username, and password configuration options.
- **sensitive_data**=filename Specify a filename (located in the data folder) of sensitive words/phrases you want to test the output of the application for, separated by newlines.
- **wait**=integer Wait the specified number of seconds between requests. Default is 0.
- **login_action**=page Where the login form submits to. Required when specifying authenticate = true.
- **username_field**=value The username field name (name="value") on the login form. Required when specifying authenticate = true.
- **password_field**=value The password field name (name="value") on the login form. Required when specifying authenticate = true.
- **username**=username Specify the username to login to the application with. Required when specifying authenticate = true.
- **password**=password Specify the password to login to the application with. Required when specifying authenticate = true.

## Credits
The mechanize gem was used extensively for crawling web applications and submitting forms within the application. Mechanize can be found [here](http://mechanize.rubyforge.org/).


text:
package app.circumstances

import app.FunctionalTestCommon
import utils.WithJsBrowser
import utils.pageobjects.{Page, XmlPage, TestData, PageObjects}
import utils.pageobjects.circumstances.start_of_process.GReportChangesPage
import utils.pageobjects.xml_validation.{XMLCircumstancesBusinessValidation, XMLBusinessValidation}

/**
 * Created by neddakaltcheva on 4/14/14.
 */
class FunctionalTestCase27Spec extends FunctionalTestCommon {
  isolated

  section("functional")
  "The application Circumstances" should {
    "Successfully run absolute Circumstances Test Case 27 for change of address" in new WithJsBrowser with PageObjects {
      val page = GReportChangesPage(context)
      val circs = TestData.readTestDataFromFile("/functional_scenarios/circumstances/TestCase27.csv")
      page goToThePage()

      val lastPage = page runClaimWith(circs)

      lastPage match {
        case p: XmlPage => {
          val validator: XMLBusinessValidation = new XMLCircumstancesBusinessValidation
          validateAndPrintErrors(p, circs, validator) should beTrue
        }
        case p: Page => println(p.source)
      }
    }
  }
  section("functional")
}


text:
Install Material-UI, the world's most popular React UI framework.

Material-UI is available as an [npm package](https://www.npmjs.com/package/@material-ui/core).

## npm

To install and save in your `package.json` dependencies, run:

```sh
// with npm
npm install @material-ui/core@next @emotion/react @emotion/styled

// with yarn
yarn add @material-ui/core@next @emotion/react @emotion/styled
```

Please note that [react](https://www.npmjs.com/package/react) >= 17.0.0 and [react-dom](https://www.npmjs.com/package/react-dom) >= 17.0.0 are peer dependencies.

## Roboto Font

Material-UI was designed with the [Roboto](https://fonts.google.com/specimen/Roboto)
font in mind. So be sure to follow [these instructions](/components/typography/#general).
For instance, via Google Web Fonts:

```html
<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
```

## Font Icons

To use the font `Icon` component, you must first add the [Material icons](https://fonts.google.com/icons) font.
Here are [some instructions](/components/icons/#font-icons)
on how to do so.
For instance, via Google Web Fonts:

```html
<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
```

## SVG Icons

In order to use prebuilt SVG Material icons, such as those found in the [icons demos](/components/icons/)
you must first install the [@material-ui/icons](https://www.npmjs.com/package/@material-ui/icons) package:

```sh
// with npm
npm install @material-ui/icons

// with yarn
yarn add @material-ui/icons
```

## CDN

You can start using Material-UI with minimal Front-end infrastructure,
which is great for prototyping.

Two Universal Module Definition (**UMD**) files are provided:

- one for development: https://unpkg.com/@material-ui/core@latest/umd/material-ui.development.js
- one for production: https://unpkg.com/@material-ui/core@latest/umd/material-ui.production.min.js

You can follow [this CDN example](https://github.com/mui-org/material-ui/tree/master/examples/cdn) to quickly get started.

⚠ Using this approach in **production** is **discouraged** though -
the client has to download the entire library, regardless of which components are actually used,
affecting performance and bandwidth utilization.

⚠ The UMD links are using the `latest` tag to point to the latest version of the library.
This pointer is **unstable**, it shifts as we release new versions.
You should consider pointing to a specific version, such as [v4.4.0](https://unpkg.com/@material-ui/core@4.4.0/umd/material-ui.development.js).

## Design resources

A set of reusable components for design tools is available, designed to match the React components and to help you craft great products:

- [Figma](https://material-ui.com/store/items/figma-react/?utm_source=docs&utm_medium=referral&utm_campaign=installation-figma): A large UI kit with over 600 handcrafted Material-UI components.
- [Adobe XD](https://material-ui.com/store/items/adobe-xd-react/?utm_source=docs&utm_medium=referral&utm_campaign=installation-adobe-xd): A large UI kit with over 600 handcrafted Material-UI components.
- [Sketch](https://material-ui.com/store/items/sketch-react/?utm_source=docs&utm_medium=referral&utm_campaign=installation-sketch): A large UI kit with over 600 handcrafted Material-UI symbols.
- [Framer](https://packages.framer.com/package/material-ui/material-ui): A small free UI kit of Material-UI components.


text:
package com.fsck.k9.notification;

class RemoveNotificationResult {
    private final NotificationHolder notificationHolder;
    private final int notificationId;
    private final boolean unknownNotification;

    private RemoveNotificationResult(NotificationHolder notificationHolder, int notificationId,
            boolean unknownNotification) {
        this.notificationHolder = notificationHolder;
        this.notificationId = notificationId;
        this.unknownNotification = unknownNotification;
    }

    public static RemoveNotificationResult createNotification(NotificationHolder notificationHolder) {
        return new RemoveNotificationResult(notificationHolder, notificationHolder.notificationId, false);
    }

    public static RemoveNotificationResult cancelNotification(int notificationId) {
        return new RemoveNotificationResult(null, notificationId, false);
    }

    public static RemoveNotificationResult unknownNotification() {
        return new RemoveNotificationResult(null, 0, true);
    }

    public boolean shouldCreateNotification() {
        return notificationHolder != null;
    }

    public int getNotificationId() {
        if (isUnknownNotification()) {
            throw new IllegalStateException("getNotificationId() can only be called when " +
                    "isUnknownNotification() returns false");
        }

        return notificationId;
    }

    public boolean isUnknownNotification() {
        return unknownNotification;
    }

    public NotificationHolder getNotificationHolder() {
        if (!shouldCreateNotification()) {
            throw new IllegalStateException("getNotificationHolder() can only be called when " +
                    "shouldCreateNotification() returns true");
        }

        return notificationHolder;
    }
}


text:
/**
 *
 */
package com.xplenty.api.request;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.ClientResponse.Status;
import com.sun.jersey.core.header.InBoundHeaders;
import com.xplenty.api.Xplenty;
import com.xplenty.api.exceptions.XplentyAPIException;
import com.xplenty.api.model.Job;
import com.xplenty.api.model.JobTest;
import com.xplenty.api.util.Http;
import junit.framework.TestCase;
import org.junit.Test;

import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
import java.util.Date;

/**
 * @author Yuriy Kovalek
 *
 */
public class StopJobTest extends TestCase {
	@Test
	public void testIntegrity() {
		StopJob sj = new StopJob(1L);

		assertEquals(Xplenty.Resource.StopJob.format(Long.toString(1)), sj.getEndpoint());
		assertEquals(Xplenty.Resource.StopJob.name, sj.getName());
		assertEquals(Http.Method.DELETE, sj.getHttpMethod());
		assertEquals(Http.MediaType.JSON, sj.getResponseType());
		assertFalse(sj.hasBody());
		assertNull(sj.getBody());
	}

	@Test
	public void testValidResponseHandling() throws JsonProcessingException, UnsupportedEncodingException {
		StopJob sj = new StopJob(1L);
		Job j = JobTest.createMockJob(new Date());

		String json = new ObjectMapper().writeValueAsString(j);
		j = sj.getResponse(new ClientResponse(Status.OK.getStatusCode(),
								new InBoundHeaders(),
								new ByteArrayInputStream(json.getBytes("UTF-8")),
								Client.create().getMessageBodyWorkers()));
		assertNotNull(j);
	}

	@Test
	public void testInvalidResponseHandling() throws JsonProcessingException, UnsupportedEncodingException {
		StopJob sj = new StopJob(1L);
		Job j = JobTest.createMockJob(new Date());

		String json = new ObjectMapper().writeValueAsString(j).replace("7", "seven");
		try {
			j = sj.getResponse(new ClientResponse(Status.OK.getStatusCode(),
									new InBoundHeaders(),
									new ByteArrayInputStream(json.getBytes("UTF-8")),
									Client.create().getMessageBodyWorkers()));
			assertTrue(false);
		} catch (XplentyAPIException e) {
			assertEquals(Xplenty.Resource.StopJob.name + ": error parsing response object", e.getMessage());
		}
	}
}


text:
// scalastyle:off println
package org.apache.spark.examples

import org.apache.spark.rdd.RDD
import org.apache.spark.sql.SparkSession

/**
  * Usage: MultiBroadcastTest [slices] [numElem]
  */
object MultiBroadcastTest {
    def main(args: Array[String]) {

        val spark = SparkSession
            .builder
            .appName("Multi-Broadcast Test")
            .getOrCreate()

        val slices = if (args.length > 0) args(0).toInt else 2
        val num = if (args.length > 1) args(1).toInt else 1000000

        val arr1 = new Array[Int](num)
        for (i <- 0 until arr1.length) {
            arr1(i) = i
        }

        val arr2 = new Array[Int](num)
        for (i <- 0 until arr2.length) {
            arr2(i) = i
        }

        val barr1 = spark.sparkContext.broadcast(arr1)
        val barr2 = spark.sparkContext.broadcast(arr2)
        val observedSizes: RDD[(Int, Int)] = spark.sparkContext.parallelize(1 to 10, slices).map { _ =>
            (barr1.value.length, barr2.value.length)
        }
        // Collect the small RDD so we can print the observed sizes locally.
        observedSizes.collect().foreach(i => println(i))

        spark.stop()
    }
}

// scalastyle:on println