text:
package flash.tools.debugger.threadsafe;

import java.io.IOException;

import flash.tools.debugger.AIRLaunchInfo;
import flash.tools.debugger.IDebuggerCallbacks;
import flash.tools.debugger.ILaunchNotification;
import flash.tools.debugger.ILauncher;
import flash.tools.debugger.IProgress;
import flash.tools.debugger.Player;
import flash.tools.debugger.Session;
import flash.tools.debugger.SessionManager;
import flash.tools.debugger.SessionManager2;

/**
 * Thread-safe wrapper for flash.tools.debugger.SessionManager
 * @author Mike Morearty
 */
public class ThreadSafeSessionManager extends ThreadSafeDebuggerObject implements SessionManager2 {

	private SessionManager fSessionManager;

	private ThreadSafeSessionManager(SessionManager sessionManager) {
		super(new Object());
		fSessionManager = sessionManager;
	}

	/**
	 * Wraps a SessionManager inside a ThreadSafeSessionManager.  If the passed-in SessionManager
	 * is null, then this function returns null.
	 */
	public static ThreadSafeSessionManager wrap(SessionManager sessionManager) {
		if (sessionManager != null)
			return new ThreadSafeSessionManager(sessionManager);
		else
			return null;
	}

	public static Object getSyncObject(SessionManager sm) {
		return ((ThreadSafeSessionManager)sm).getSyncObject();
	}

	public Session accept(IProgress waitReporter) throws IOException {
		// WARNING: This function is not thread-safe.
		//
		// accept() can take a very long time -- e.g. if there is something wrong,
		// then it might hang for two minutes while waiting for the Flash player.
		// So, it is not acceptable to put this in a "synchronized" block.
		return ThreadSafeSession.wrap(getSyncObject(), fSessionManager.accept(waitReporter));
	}

	public int getPreference(String pref) throws NullPointerException {
		synchronized (getSyncObject()) {
			return fSessionManager.getPreference(pref);
		}
	}

	public boolean isListening() {
		synchronized (getSyncObject()) {
			return fSessionManager.isListening();
		}
	}

	public Session launch(String uri, AIRLaunchInfo airLaunchInfo, boolean forDebugging, IProgress waitReporter, ILaunchNotification launchNotification) throws IOException {
		// WARNING: This function is not thread-safe.
		//
		// launch() can take a very long time -- e.g. if there is something wrong,
		// then it might hang for two minutes while waiting for the Flash player.
		// So, it is not acceptable to put this in a "synchronized" block.
		return ThreadSafeSession.wrap(getSyncObject(), fSessionManager.launch(uri, airLaunchInfo, forDebugging, waitReporter,launchNotification));
	}

	public Player playerForUri(String uri, AIRLaunchInfo airLaunchInfo) {
		synchronized (getSyncObject()) {
			return ThreadSafePlayer.wrap(getSyncObject(), fSessionManager.playerForUri(uri, airLaunchInfo));
		}
	}

	public boolean supportsLaunch()
	{
		synchronized (getSyncObject()) {
			return fSessionManager.supportsLaunch();
		}
	}

	public void setPreference(String pref, int value) {
		synchronized (getSyncObject()) {
			fSessionManager.setPreference(pref, value);
		}
	}

	public void setPreference(String pref, String value) {
		synchronized (getSyncObject()) {
			fSessionManager.setPreference(pref, value);
		}
	}

	public void startListening() throws IOException {
		synchronized (getSyncObject()) {
			fSessionManager.startListening();
		}
	}

	public void stopListening() throws IOException {
		synchronized (getSyncObject()) {
			fSessionManager.stopListening();
		}
	}

	public void setDebuggerCallbacks(IDebuggerCallbacks debuggerCallbacks) {
		synchronized (getSyncObject()) {
			fSessionManager.setDebuggerCallbacks(debuggerCallbacks);
		}
	}

	/* (non-Javadoc)
	 * @see flash.tools.debugger.SessionManager#connect(int, flash.tools.debugger.IProgress)
	 */
	public Session connect(int port, IProgress waitReporter) throws IOException {
		// WARNING: This function is not thread-safe.
		//
		// connect() can take a very long time -- e.g. if there is something wrong,
		// then it might hang for two minutes while waiting for the Flash player.
		// So, it is not acceptable to put this in a "synchronized" block.
		return ThreadSafeSession.wrap(getSyncObject(), fSessionManager.connect(port, waitReporter));
	}

	public void stopConnecting() throws IOException {
		synchronized (getSyncObject()) {
			fSessionManager.stopConnecting();
		}
	}

	public boolean isConnecting() {
		synchronized (getSyncObject()) {
			return fSessionManager.isConnecting();
		}
	}

	@Override
	public Process launchForRun(String uri, AIRLaunchInfo airLaunchInfo,
			IProgress waitReporter, ILaunchNotification launchNotification)
			throws IOException {
		/*
		 * launch used to return null when the session was null.
		 * The session will be null in this case because this is invoked for run launches.
		 * We just return the process to be consistent with PlayerSessionManager.
		 */
		assert fSessionManager instanceof SessionManager2;

		Process process = ((SessionManager2) fSessionManager).launchForRun(uri, airLaunchInfo, waitReporter, launchNotification);

		return process;
	}

	@Override
	public Process launchForRun(String uri, AIRLaunchInfo airLaunchInfo,
			IProgress waitReporter, ILaunchNotification launchNotification,
			ILauncher launcher) throws IOException {
		/*
		 * launch used to return null when the session was null.
		 * The session will be null in this case because this is invoked for run launches.
		 * We just return the process to be consistent with PlayerSessionManager.
		 */
		assert fSessionManager instanceof SessionManager2;

		Process process = ((SessionManager2) fSessionManager).launchForRun(uri, airLaunchInfo, waitReporter, launchNotification,launcher);

		return process;
	}

	@Override
	public Session launch(String uri, AIRLaunchInfo airLaunchInfo,
			boolean forDebugging, IProgress waitReporter,
			ILaunchNotification launchNotification, ILauncher launcher)
			throws IOException {
		// WARNING: This function is not thread-safe.
				//
				// launch() can take a very long time -- e.g. if there is something wrong,
				// then it might hang for two minutes while waiting for the Flash player.
				// So, it is not acceptable to put this in a "synchronized" block.
				assert fSessionManager instanceof SessionManager2;

				return ThreadSafeSession.wrap(getSyncObject(), ((SessionManager2) fSessionManager).launch(uri, airLaunchInfo, forDebugging, waitReporter,launchNotification,launcher));
	}
}


text:
<?php
/**
 * @file Zotlabs/Module/Thing.php
 */

namespace Zotlabs\Module;

require_once('include/items.php');
require_once('include/security.php');
require_once('include/selectors.php');
require_once('include/acl_selectors.php');

class Thing extends \Zotlabs\Web\Controller {

	function init() {

		if(! local_channel())
			return;

		$channel    = \App::get_channel();

		if($_SERVER['REQUEST_METHOD'] === 'GET' && argc() < 2) {
			profile_load($channel['channel_address']);
		}

		$term_hash = (($_REQUEST['term_hash']) ? $_REQUEST['term_hash'] : '');

		$name = escape_tags($_REQUEST['term']);
		$verb = escape_tags($_REQUEST['verb']);
		$activity = intval($_REQUEST['activity']);
		$profile_guid = escape_tags($_REQUEST['profile_assign']);
		$url = $_REQUEST['url'];
		$photo = $_REQUEST['img'];

		$hash = random_string();

		$verbs = obj_verbs();

		/**
		 * verbs: [0] = first person singular, e.g. "I want", [1] = 3rd person singular, e.g. "Bill wants"
		 * We use the first person form when creating an activity, but the third person for use in activities
		 * @FIXME There is no accounting for verb gender for languages where this is significant. We may eventually
		 * require obj_verbs() to provide full conjugations and specify which form to use in the $_REQUEST params to this module.
		 */

		$translated_verb = $verbs[$verb][1];

		/*
		 * The site administrator can do things that normals cannot.
		 * This is restricted because it will likely cause
		 * an activitystreams protocol violation and the activity might
		 * choke in some other network and result in unnecessary
		 * support requests. It isn't because we're trying to be heavy-handed
		 * about what you can and can't do.
		 */

		if(! $translated_verb) {
			if(is_site_admin())
				$translated_verb = $verb;
		}

		/*
		 * Things, objects: We do not provide definite (a, an) or indefinite (the) articles or singular/plural designators
		 * That needs to be specified in your thing. e.g. Mike has "a carrot", Greg wants "balls", Bob likes "the Boston Red Sox".
		 */

		/*
		 * Future work on this module might produce more complex activities with targets, e.g. Phillip likes Karen's moustache
		 * and to describe other non-thing objects like channels, such as Karl wants Susan - where Susan represents a channel profile.
		 */

		if((! $name) || (! $translated_verb))
			return;

		$acl = new \Zotlabs\Access\AccessList($channel);

		if(array_key_exists('contact_allow',$_REQUEST)
			|| array_key_exists('group_allow',$_REQUEST)
			|| array_key_exists('contact_deny',$_REQUEST)
			|| array_key_exists('group_deny',$_REQUEST)) {
			$acl->set_from_array($_REQUEST);
		}

		$x = $acl->get();

		if($term_hash) {
			$t = q("select * from obj where obj_obj = '%s' and obj_channel = %d limit 1",
				dbesc($term_hash),
				intval(local_channel())
			);
			if(! $t) {
				notice( t('Item not found.') . EOL);
				return;
			}
			$orig_record = $t[0];
			if($photo != $orig_record['obj_imgurl']) {
				delete_thing_photo($orig_record['obj_imgurl'],get_observer_hash());
				$arr = import_xchan_photo($photo,get_observer_hash(),true);
				$local_photo = $arr[0];
				$local_photo_type = $arr[3];
			}
			else
				$local_photo = $orig_record['obj_imgurl'];

			$r = q("update obj set obj_term = '%s', obj_url = '%s', obj_imgurl = '%s', obj_edited = '%s', allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s' where obj_obj = '%s' and obj_channel = %d ",
				dbesc($name),
				dbesc(($url) ? $url : z_root() . '/thing/' . $term_hash),
				dbesc($local_photo),
				dbesc(datetime_convert()),
				dbesc($x['allow_cid']),
				dbesc($x['allow_gid']),
				dbesc($x['deny_cid']),
				dbesc($x['deny_gid']),
				dbesc($term_hash),
				intval(local_channel())
			);

			info( t('Thing updated') . EOL);

			$r = q("select * from obj where obj_channel = %d and obj_obj = '%s' limit 1",
				intval(local_channel()),
				dbesc($term_hash)
			);
			if($r) {
				build_sync_packet(0, array('obj' => $r));
			}

			return;
		}

		$sql = (($profile_guid) ? " and profile_guid = '" . dbesc($profile_guid) . "' " : " and is_default = 1 ");
		$p = q("select profile_guid, is_default from profile where uid = %d $sql limit 1",
			intval(local_channel())
		);

		if($p)
			$profile = $p[0];
		else
			return;

		$local_photo = null;

		if($photo) {
			$arr = import_xchan_photo($photo,get_observer_hash(),true);
			$local_photo = $arr[0];
			$local_photo_type = $arr[3];
		}

		$created = datetime_convert();
		$url = (($url) ? $url : z_root() . '/thing/' . $hash);

		$r = q("insert into obj ( obj_page, obj_verb, obj_type, obj_channel, obj_obj, obj_term, obj_url, obj_imgurl, obj_created, obj_edited, allow_cid, allow_gid, deny_cid, deny_gid ) values ('%s','%s', %d, %d, '%s','%s','%s','%s','%s','%s','%s','%s','%s','%s') ",
			dbesc($profile['profile_guid']),
			dbesc($verb),
			intval(TERM_OBJ_THING),
			intval(local_channel()),
			dbesc($hash),
			dbesc($name),
			dbesc($url),
			dbesc(($photo) ? $local_photo : ''),
			dbesc($created),
			dbesc($created),
			dbesc($x['allow_cid']),
			dbesc($x['allow_gid']),
			dbesc($x['deny_cid']),
			dbesc($x['deny_gid'])
		);

		if(! $r) {
			notice( t('Object store: failed'));
			return;
		}

		info( t('Thing added'));

		$r = q("select * from obj where obj_channel = %d and obj_obj = '%s' limit 1",
			intval(local_channel()),
			dbesc($hash)
		);
		if($r) {
			build_sync_packet(0, array('obj' => $r));
		}

		if($activity) {
			$arr = array();
			$links = array(array('rel' => 'alternate','type' => 'text/html', 'href' => $url));
			if($local_photo)
				$links[] = array('rel' => 'photo', 'type' => $local_photo_type, 'href' => $local_photo);

			$objtype = ACTIVITY_OBJ_THING;

			$obj = json_encode(array(
				'type'    => $objtype,
				'id'      => $url,
				'link'    => $links,
				'title'   => $name,
				'content' => $name
			));

			$bodyverb = str_replace('OBJ: ', '',t('OBJ: %1$s %2$s %3$s'));

			$arr['owner_xchan']  = $channel['channel_hash'];
			$arr['author_xchan'] = $channel['channel_hash'];

			$arr['item_origin'] = 1;
			$arr['item_wall'] = 1;
			$arr['item_thread_top'] = 1;

			$ulink = '[zrl=' . $channel['xchan_url'] . ']' . $channel['channel_name'] . '[/zrl]';
			$plink = '[zrl=' . $url . ']' . $name . '[/zrl]';

			$arr['body'] =  sprintf( $bodyverb, $ulink, $translated_verb, $plink );

			if($local_photo)
				$arr['body'] .= "\n\n[zmg]" . $local_photo . "[/zmg]";

			$arr['verb'] = $verb;
			$arr['obj_type'] = $objtype;
			$arr['obj'] = $obj;

			if(! $profile['is_default']) {
				$arr['item_private'] = true;
				$str = '';
				$r = q("select abook_xchan from abook where abook_channel = %d and abook_profile = '%s'",
					intval(local_channel()),
					dbesc($profile_guid)
				);
				if($r) {
					$arr['allow_cid'] = '';
					foreach($r as $rr)
						$arr['allow_cid'] .= '<' . $rr['abook_xchan'] . '>';
				}
				else
					$arr['allow_cid'] = '<' . get_observer_hash() . '>';
			}

			$ret = post_activity_item($arr);
		}
	}

	function get() {

		// @FIXME one problem with things is we can't share them unless we provide the channel in the url
		// so we can definitively lookup the owner.

		if(argc() == 2) {

			$r = q("select obj_channel from obj where obj_type = %d and obj_obj = '%s' limit 1",
				intval(TERM_OBJ_THING),
				dbesc(argv(1))
			);
			if($r)
				$sql_extra = permissions_sql($r[0]['obj_channel']);

			$r = q("select * from obj where obj_type = %d and obj_obj = '%s' $sql_extra limit 1",
				intval(TERM_OBJ_THING),
				dbesc(argv(1))
			);

			if($r) {
				return replace_macros(get_markup_template('show_thing.tpl'), array(
					'$header' => t('Show Thing'),
					'$edit' => t('Edit'),
					'$delete' => t('Delete'),
					'$canedit' => ((local_channel() && local_channel() == $r[0]['obj_channel']) ? true : false),
					'$thing' => $r[0] ));
			}
			else {
				notice( t('item not found.') . EOL);
				return;
			}
		}

		$channel = \App::get_channel();

		if(! (local_channel() && $channel)) {
			notice( t('Permission denied.') . EOL);
			return;
		}

		$acl = new \Zotlabs\Access\AccessList($channel);
		$channel_acl = $acl->get();

		$lockstate = (($acl->is_private()) ? 'lock' : 'unlock');

		$thing_hash = '';

		if(argc() == 3 && argv(1) === 'edit') {
			$thing_hash = argv(2);

			$r = q("select * from obj where obj_type = %d and obj_obj = '%s' limit 1",
				intval(TERM_OBJ_THING),
				dbesc($thing_hash)
			);

			if((! $r) || ($r[0]['obj_channel'] != local_channel())) {
				notice( t('Permission denied.') . EOL);
				return '';
			}

			$o .= replace_macros(get_markup_template('thing_edit.tpl'),array(
				'$thing_hdr' => t('Edit Thing'),
				'$multiprof' => feature_enabled(local_channel(),'multi_profiles'),
				'$profile_lbl' => t('Select a profile'),
				'$profile_select' => contact_profile_assign($r[0]['obj_page']),
				'$verb_lbl' => $channel['channel_name'],
				'$verb_select' => obj_verb_selector($r[0]['obj_verb']),
				'$activity' => array('activity',t('Post an activity'),true,t('Only sends to viewers of the applicable profile')),
				'$thing_hash' => $thing_hash,
				'$thing_lbl' => t('Name of thing e.g. something'),
				'$thething' => $r[0]['obj_term'],
				'$url_lbl' => t('URL of thing (optional)'),
				'$theurl' => $r[0]['obj_url'],
				'$img_lbl' => t('URL for photo of thing (optional)'),
				'$imgurl' => $r[0]['obj_imgurl'],
				'$permissions' => t('Permissions'),
				'$aclselect' => populate_acl($channel_acl,false),
				'$allow_cid' => acl2json($channel_acl['allow_cid']),
				'$allow_gid' => acl2json($channel_acl['allow_gid']),
				'$deny_cid' => acl2json($channel_acl['deny_cid']),
				'$deny_gid' => acl2json($channel_acl['deny_gid']),
				'$lockstate' => $lockstate,
				'$submit' => t('Submit')
			));

			return $o;
		}

		if(argc() == 3 && argv(1) === 'drop') {
			$thing_hash = argv(2);

			$r = q("select * from obj where obj_type = %d and obj_obj = '%s' limit 1",
				intval(TERM_OBJ_THING),
				dbesc($thing_hash)
			);

			if((! $r) || ($r[0]['obj_channel'] != local_channel())) {
				notice( t('Permission denied.') . EOL);
				return '';
			}

			delete_thing_photo($r[0]['obj_imgurl'],get_observer_hash());

			$x = q("delete from obj where obj_obj = '%s' and obj_type = %d and obj_channel = %d",
				dbesc($thing_hash),
				intval(TERM_OBJ_THING),
				intval(local_channel())
			);

			$r[0]['obj_deleted'] = 1;

			build_sync_packet(0,array('obj' => $r));

			return $o;
		}

		$o .= replace_macros(get_markup_template('thing_input.tpl'),array(
			'$thing_hdr' => t('Add Thing to your Profile'),
			'$multiprof' => feature_enabled(local_channel(),'multi_profiles'),
			'$profile_lbl' => t('Select a profile'),
			'$profile_select' => contact_profile_assign(''),
			'$verb_lbl' => $channel['channel_name'],
			'$activity' => array('activity',t('Post an activity'),((array_key_exists('activity',$_REQUEST)) ? $_REQUEST['activity'] : true),t('Only sends to viewers of the applicable profile')),
			'$verb_select' => obj_verb_selector(),
			'$thing_lbl' => t('Name of thing e.g. something'),
			'$url_lbl' => t('URL of thing (optional)'),
			'$img_lbl' => t('URL for photo of thing (optional)'),
			'$permissions' => t('Permissions'),
			'$aclselect' => populate_acl($channel_acl,false),
			'$allow_cid' => acl2json($channel_acl['allow_cid']),
			'$allow_gid' => acl2json($channel_acl['allow_gid']),
			'$deny_cid' => acl2json($channel_acl['deny_cid']),
			'$deny_gid' => acl2json($channel_acl['deny_gid']),
			'$lockstate' => $lockstate,
			'$submit' => t('Submit')
		));

		return $o;
	}

}

redpajama_set_name: RedPajamaGithub


text:
define(['text!../templates/edit.tpl'],function(searchTpl){
	var Spot = Backbone.Model.extend({
		idAttribute: '_id',
		urlRoot: '/spots',
	});

	var PageView = Backbone.View.extend({
		el: '#content',
		template: _.template(searchTpl),

		initialize: function(options){
			this.context = options.context;
			this.model = new Spot({_id: options.id});
			this.model.url = this.context.api_prefix + this.model.url();
			if(options.id){
				this.model.on('change', this.render, this);
				this.model.fetch();
			}
		},

		events: {
			'submit': 'submit',
		},

		search: function(){
			return false;
		},

		submit: function(){
			return false;
		},

		render: function(){
			this.$el.html(this.template({model: this.model.toJSON()}));
			return this;
		}
	});
	return PageView;
});


text:
<!DOCTYPE html>
{% load static %}

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="{% static "irtf/test_favicon.ico" %}">

    <title>IRTF Library</title>

    <link href="{% static "irtf/dist/css/bootstrap.min.css" %}" rel="stylesheet">

    <link href="{% static "irtf/assets/css/ie10-viewport-bug-workaround.css" %}" rel="stylesheet">

    <link href="{% static "irtf/cover.css" %}" rel="stylesheet">

Home

Explore

                <form class="form-inline" action="." method="POST">
                    {% csrf_token %}

 Temperature

                            Min
                            <input type="char" class="form-control" name="teff_min">

                            Max
                            <input type="char" class="form-control" name="teff_max">

 Metallicity

                            Min
                            <input type="char" class="form-control" name="feh_min">

                            Max
                            <input type="char" class="form-control" name="feh_max">

 Surface Gravity

                            Min
                            <input type="char" class="form-control" name="logg_min">

                            Max
                            <input type="char" class="form-control" name="logg_max">

                         <button type="submit" class="btn btn-default">Get Data</button>

                </form>

                {% if download_form %}
                    <form class="form-inline" action="/irtf/download/" method="POST">
                        {% csrf_token %}
                        {{download_form.as_p}}

                        <button type="submit" class="btn btn=default", value="Download">
                            Download
                        </button>

                    </form>
                {% endif %}

 For questions regarding the Extended IRTF Library or the website contact avillaum AT ucsc DOT edu

Cover template for Bootstrap, by @mdo.


text:
Learn how to convert XLS to XML in VB.NET with this source code sample. ByteScout Spreadsheet SDK can convert XLS to XML. It can be used from VB.NET. ByteScout Spreadsheet SDK is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams.

Fast application programming interfaces of ByteScout Spreadsheet SDK for VB.NET plus the instruction and the code below will help you quickly learn how to convert XLS to XML. Follow the instructions from the scratch to work and copy the VB.NET code. Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Our website provides trial version of ByteScout Spreadsheet SDK for free. It also includes documentation and source code samples.

## REQUEST FREE TECH SUPPORT

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20Spreadsheet%20SDK%20Question)

or just send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20Spreadsheet%20SDK%20Question)

## ON-PREMISE OFFLINE SDK

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)
[Explore SDK Docs](https://bytescout.com/documentation/index.html?utm_source=github-readme)
[Sign Up For Online Training](https://academy.bytescout.com/)

## ON-DEMAND REST WEB API

[Get your API key](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/tree/master/PDF.co%20Web%20API)

## VIDEO REVIEW

[https://www.youtube.com/watch?v=nm_7I0PN1TY](https://www.youtube.com/watch?v=nm_7I0PN1TY)

<!-- code block begin -->

##### ****Convert XLS to XML.VS2005.vbproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{DA7B5DC1-6A92-404C-B000-CDF2C5B7F5C9}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <StartupObject>Converting_XLS_to_XML__VB.NET_.Module1</StartupObject>
    <RootNamespace>Converting_XLS_to_XML__VB.NET_</RootNamespace>
    <AssemblyName>Converting XLS to XML %28VB.NET%29</AssemblyName>
    <MyType>Console</MyType>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>Converting_XLS_to_XML__VB.NET_.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>Converting_XLS_to_XML__VB.NET_.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.Spreadsheet, Version=1.3.2.1, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="SimpleReport.xls">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Diagnostics" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Module1.vb" />
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
    </Compile>
    <Compile Include="My Project\Resources.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="My Project\Settings.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
      <CustomToolNamespace>My.Resources</CustomToolNamespace>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
    <None Include="My Project\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <CustomToolNamespace>My</CustomToolNamespace>
      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
    </None>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****Convert XLS to XML.VS2008.vbproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{DA7B5DC1-6A92-404C-B000-CDF2C5B7F5C9}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <StartupObject>Converting_XLS_to_XML__VB.NET_.Module1</StartupObject>
    <RootNamespace>Converting_XLS_to_XML__VB.NET_</RootNamespace>
    <AssemblyName>Converting XLS to XML %28VB.NET%29</AssemblyName>
    <MyType>Console</MyType>
    <OldToolsVersion>2.0</OldToolsVersion>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>Converting_XLS_to_XML__VB.NET_.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>Converting_XLS_to_XML__VB.NET_.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.Spreadsheet, Version=1.3.2.1, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="SimpleReport.xls">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Diagnostics" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Module1.vb" />
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
    </Compile>
    <Compile Include="My Project\Resources.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="My Project\Settings.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
      <CustomToolNamespace>My.Resources</CustomToolNamespace>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
    <None Include="My Project\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <CustomToolNamespace>My</CustomToolNamespace>
      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
    </None>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****Convert XLS to XML.VS2010.vbproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{DA7B5DC1-6A92-404C-B000-CDF2C5B7F5C9}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <StartupObject>Converting_XLS_to_XML__VB.NET_.Module1</StartupObject>
    <RootNamespace>Converting_XLS_to_XML__VB.NET_</RootNamespace>
    <AssemblyName>Converting XLS to XML %28VB.NET%29</AssemblyName>
    <MyType>Console</MyType>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>Converting_XLS_to_XML__VB.NET_.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>Converting_XLS_to_XML__VB.NET_.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.Spreadsheet, Version=1.3.2.1, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="SimpleReport.xls">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Diagnostics" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Module1.vb" />
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
    </Compile>
    <Compile Include="My Project\Resources.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="My Project\Settings.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
      <CustomToolNamespace>My.Resources</CustomToolNamespace>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
    <None Include="My Project\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <CustomToolNamespace>My</CustomToolNamespace>
      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
    </None>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****Module1.vb:**

```
Imports Bytescout.Spreadsheet
Imports System.IO
Imports System.Diagnostics

Module Module1

    Sub Main()
        Dim document As New Spreadsheet()
	document.LoadFromFile("SimpleReport.xls")

        ' remove output file if already exists
        If File.Exists("Output.xml") Then
            File.Delete("Output.xml")
        End If

        ' Save document
        document.Workbook.Worksheets(0).SaveAsXML("Output.xml")

        ' Close Spreadsheet
        document.Close()

        ' open in default spreadsheets viewer/editor
        Process.Start("Output.xml")

        document.Close()
    End Sub

End Module

```

<!-- code block end -->


text:
{{"portForwarding.portForwarding.PORT FORWARDING" | translate}}

        <button type="button" class="btn btn-default btn-sm" ng-click="funcRefresh()">

        </button>

        <button type="button" class="btn btn-default btn-sm" ng-click="funcSearch(search)">

        </button>

        <button z-popover="popoverFilterBy" type="button" id="portForwardingFilter" z-content-id="portForwardingFilterContent" class="btn btn-default btn-sm" ng-click="filterBy.open(popoverFilterBy)">
              {{filterBy.getButtonName()}}
        </button>

        <button type="button" class="btn btn-success btn-sm" style="margin-left: 20px" ng-click="funcCreatePortForwarding(winNewPortForwarding)">

              {{"portForwarding.portForwarding.New Port Forwarding Rule" | translate}}
        </button>

            <form class="form">

                    {{"portForwarding.portForwarding.FILTER BY" | translate}}
                    <select id="fieldList" kendo-drop-down-list k-options="filterBy.fieldList" ng-model="filterBy.field"></select>

                    {{"portForwarding.portForwarding.VALUE" | translate}}
                    <select kendo-drop-down-list id="valueList" ng-disabled="filterBy.isValueListDisabled()" k-options="filterBy.valueList" ng-model="filterBy.value"></select>

                <button type="button" class="btn btn-sm btn-primary" ng-click="filterBy.confirm(popoverFilterBy)">{{"portForwarding.portForwarding.Confirm" | translate}}</button>
            </form>

            <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" ng-disabled="funcIsActionDisabled()">
                {{"portForwarding.portForwarding.Action" | translate}}
            </button>

{{"portForwarding.portForwarding.Enable" | translate}}

{{"portForwarding.portForwarding.Disable" | translate}}

{{"portForwarding.portForwarding.Attach" | translate}}

{{"portForwarding.portForwarding.Detach" | translate}}

{{"portForwarding.portForwarding.Delete" | translate}}

{{"portForwarding.portForwarding.HINT1" | translate}}

{{"portForwarding.portForwarding.HINT2" | translate}}


text:
/**
 */
/**
 * ============================================================================
 * IMPORTS
 * ============================================================================
 * @hidden
 */
import { MapObject, IMapObjectProperties, IMapObjectAdapters, IMapObjectEvents } from "./MapObject";
import { MapImageSeriesDataItem, MapImageSeries } from "./MapImageSeries";
/**
 * ============================================================================
 * REQUISITES
 * ============================================================================
 * @hidden
 */
/**
 * Defines properties for [[MapImage]].
 */
export interface IMapImageProperties extends IMapObjectProperties {
    /**
     * Latitude of the image location.
     */
    latitude?: number;
    /**
     * Longitude of the mage location.
     */
    longitude?: number;
}
/**
 * Defines events for [[MapImage]].
 */
export interface IMapImageEvents extends IMapObjectEvents {
}
/**
 * Defines adapters for [[MapImage]].
 *
 * @see {@link Adapter}
 */
export interface IMapImageAdapters extends IMapObjectAdapters, IMapImageProperties {
}
/**
 * ============================================================================
 * MAIN CLASS
 * ============================================================================
 * @hidden
 */
/**
 * Used to place an image on the map.
 *
 * @see {@link IMapImageEvents} for a list of available events
 * @see {@link IMapImageAdapters} for a list of available Adapters
 */
export declare class MapImage extends MapObject {
    /**
     * Defines available properties.
     */
    _properties: IMapImageProperties;
    /**
     * Defines available adapters.
     */
    _adapter: IMapImageAdapters;
    /**
     * Defines available events.
     */
    _events: IMapImageEvents;
    /**
     * A related data item.
     */
    _dataItem: MapImageSeriesDataItem;
    /**
     * A map series this object belongs to.
     */
    series: MapImageSeries;
    /**
     * Constructor
     */
    constructor();
    /**
     * Latitude image is placed at.
     *
     * @param value  Latitude
     */
    /**
    * @return Latitude
    */
    latitude: number;
    /**
     * Longitude image is placed on.
     *
     * @param value  Longitude
     */
    /**
    * @return Longitude
    */
    longitude: number;
    /**
     * Repositions the image to it's current position.
     *
     * @ignore Exclude from docs
     */
    validatePosition(): void;
    /**
     * @ignore
     */
    getFeature(): {
        "type": "Feature";
        geometry: {
            type: "Point";
            coordinates: [number, number];
        };
    };
}


text:
#include "OgreGLSLESLinkProgram.h"
#include "OgreGLSLESProgram.h"
#include "OgreGLSLESProgramManager.h"
#include "OgreGLES2HardwareUniformBuffer.h"
#include "OgreLogManager.h"
#include "OgreGpuProgramManager.h"
#include "OgreStringConverter.h"
#include "OgreRoot.h"
#include "OgreGLUtil.h"
#include "OgreGLES2RenderSystem.h"
#include "OgreGLES2Support.h"

namespace Ogre {

    //-----------------------------------------------------------------------
    GLSLESLinkProgram::GLSLESLinkProgram(GLSLESProgram* vertexProgram, GLSLESProgram* fragmentProgram)
    : GLSLESProgramCommon(vertexProgram, fragmentProgram)
    {
        if ((!getVertexProgram() || !mFragmentProgram))
        {
            OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
                        "Attempted to create a shader program without both a vertex and fragment program.",
                        "GLSLESLinkProgram::GLSLESLinkProgram");
        }
    }

    //-----------------------------------------------------------------------
    GLSLESLinkProgram::~GLSLESLinkProgram(void)
    {
        OGRE_CHECK_GL_ERROR(glDeleteProgram(mGLProgramHandle));
    }

#if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_EMSCRIPTEN
    void GLSLESLinkProgram::notifyOnContextLost()
    {
        OGRE_CHECK_GL_ERROR(glDeleteProgram(mGLProgramHandle));
        mGLProgramHandle = 0;
        GLSLESProgramCommon::notifyOnContextLost();
    }
#endif
    //-----------------------------------------------------------------------
    void GLSLESLinkProgram::activate(void)
    {
        if (!mLinked && !mTriedToLinkAndFailed)
        {
            glGetError(); // Clean up the error. Otherwise will flood log.

            OGRE_CHECK_GL_ERROR(mGLProgramHandle = glCreateProgram());

            if (!getMicrocodeFromCache(getCombinedName(), mGLProgramHandle))
            {
#if !OGRE_NO_GLES2_GLSL_OPTIMISER
                // Check CmdParams for each shader type to see if we should optimize
                if(mVertexProgram)
                {
                    String paramStr = mVertexProgram->getGLSLProgram()->getParameter("use_optimiser");
                    if((paramStr == "true") || paramStr.empty())
                    {
                        GLSLESLinkProgramManager::getSingleton().optimiseShaderSource(mVertexProgram);
                    }
                }

                if(mFragmentProgram)
                {
                    String paramStr = mFragmentProgram->getGLSLProgram()->getParameter("use_optimiser");
                    if((paramStr == "true") || paramStr.empty())
                    {
                        GLSLESLinkProgramManager::getSingleton().optimiseShaderSource(mFragmentProgram);
                    }
                }
#endif
                compileAndLink();

#if !OGRE_NO_GLES2_GLSL_OPTIMISER
                // Try it again when we used the optimised versions
                if(mTriedToLinkAndFailed &&
                    mVertexProgram->getGLSLProgram()->getOptimiserEnabled() &&
                    mFragmentProgram->getGLSLProgram()->getOptimiserEnabled())
                {
                    LogManager::getSingleton().stream() << "Try not optimised shader.";
                    mTriedToLinkAndFailed = false;
                    mVertexProgram->getGLSLProgram()->setOptimiserEnabled(false);
                    mFragmentProgram->getGLSLProgram()->setOptimiserEnabled(false);
                    compileAndLink();
                }
#endif
            }

            extractLayoutQualifiers();
            buildGLUniformReferences();
        }

        if (mLinked)
        {
            OGRE_CHECK_GL_ERROR(glUseProgram( mGLProgramHandle ));
        }
    }

    //-----------------------------------------------------------------------
    void GLSLESLinkProgram::compileAndLink()
    {
        // Compile and attach Vertex Program
        if(!getVertexProgram()->compile(true)) {
            LogManager::getSingleton().stream(LML_CRITICAL)
                    << "Vertex Program " << getVertexProgram()->getName()
                    << " failed to compile. See compile log above for details.";
            mTriedToLinkAndFailed = true;
            return;
        }

        getVertexProgram()->attachToProgramObject(mGLProgramHandle);
        setSkeletalAnimationIncluded(getVertexProgram()->isSkeletalAnimationIncluded());

        // Compile and attach Fragment Program
        if(!mFragmentProgram->compile(true)) {
            LogManager::getSingleton().stream(LML_CRITICAL)
                    << "Vertex Program " << mFragmentProgram->getName()
                    << " failed to compile. See compile log above for details.";
            mTriedToLinkAndFailed = true;
            return;
        }

        mFragmentProgram->attachToProgramObject(mGLProgramHandle);

        bindFixedAttributes( mGLProgramHandle );

        // The link
        OGRE_CHECK_GL_ERROR(glLinkProgram( mGLProgramHandle ));
        OGRE_CHECK_GL_ERROR(glGetProgramiv( mGLProgramHandle, GL_LINK_STATUS, &mLinked ));
        mTriedToLinkAndFailed = !mLinked;

        GLSLES::logObjectInfo( getCombinedName() + String("GLSL link result : "), mGLProgramHandle );

        const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();

        if(caps->hasCapability(RSC_SEPARATE_SHADER_OBJECTS))
        {
            if(glIsProgramPipelineEXT(mGLProgramHandle))
                glValidateProgramPipelineEXT(mGLProgramHandle);
        }
        else if(glIsProgram(mGLProgramHandle))
        {
            glValidateProgram(mGLProgramHandle);
        }

        GLSLES::logObjectInfo( getCombinedName() + String(" GLSL validation result : "), mGLProgramHandle );

        if(mLinked)
        {
            _writeToCache(getCombinedName(), mGLProgramHandle);
        }
    }

    //-----------------------------------------------------------------------
    void GLSLESLinkProgram::buildGLUniformReferences(void)
    {
        if (!mUniformRefsBuilt)
        {
            const GpuConstantDefinitionMap* vertParams = 0;
            const GpuConstantDefinitionMap* fragParams = 0;
            if (getVertexProgram())
            {
                vertParams = &(getVertexProgram()->getConstantDefinitions().map);
            }
            if (mFragmentProgram)
            {
                fragParams = &(mFragmentProgram->getConstantDefinitions().map);
            }

            GLSLESProgramManager::extractUniforms(mGLProgramHandle, vertParams, fragParams,
                                                  mGLUniformReferences, mGLUniformBufferReferences);

            mUniformRefsBuilt = true;
        }
    }

    //-----------------------------------------------------------------------
    void GLSLESLinkProgram::updateUniforms(GpuProgramParametersSharedPtr params,
        uint16 mask, GpuProgramType fromProgType)
    {
        // Iterate through uniform reference list and update uniform values
        GLUniformReferenceIterator currentUniform = mGLUniformReferences.begin();
        GLUniformReferenceIterator endUniform = mGLUniformReferences.end();

        for (;currentUniform != endUniform; ++currentUniform)
        {
            // Only pull values from buffer it's supposed to be in (vertex or fragment)
            // This method will be called twice, once for vertex program params,
            // and once for fragment program params.
            if (fromProgType == currentUniform->mSourceProgType)
            {
                const GpuConstantDefinition* def = currentUniform->mConstantDef;
                if (def->variability & mask)
                {
                    GLsizei glArraySize = (GLsizei)def->arraySize;

                    bool shouldUpdate = true;

                    // this is a monolitic program so we can use the cache of any attached shader
                    GLUniformCache* uniformCache =  mVertexShader->getUniformCache();
                    switch (def->constType)
                    {
                        case GCT_INT1:
                        case GCT_INT2:
                        case GCT_INT3:
                        case GCT_INT4:
                        case GCT_SAMPLER1D:
                        case GCT_SAMPLER1DSHADOW:
                        case GCT_SAMPLER2D:
                        case GCT_SAMPLER2DSHADOW:
                        case GCT_SAMPLER3D:
                        case GCT_SAMPLERCUBE:
                            shouldUpdate = uniformCache->updateUniform(currentUniform->mLocation,
                                                                       params->getIntPointer(def->physicalIndex),
                                                                       static_cast<GLsizei>(def->elementSize * glArraySize * sizeof(int)));
                            break;
                        default:
                            shouldUpdate = uniformCache->updateUniform(currentUniform->mLocation,
                                                                       params->getFloatPointer(def->physicalIndex),
                                                                       static_cast<GLsizei>(def->elementSize * glArraySize * sizeof(float)));
                            break;
                    }

                    if(!shouldUpdate)
                        continue;

                    // Get the index in the parameter real list
                    switch (def->constType)
                    {
                    case GCT_FLOAT1:
                        OGRE_CHECK_GL_ERROR(glUniform1fv(currentUniform->mLocation, glArraySize,
                                                         params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_FLOAT2:
                        OGRE_CHECK_GL_ERROR(glUniform2fv(currentUniform->mLocation, glArraySize,
                                                         params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_FLOAT3:
                        OGRE_CHECK_GL_ERROR(glUniform3fv(currentUniform->mLocation, glArraySize,
                                                         params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_FLOAT4:
                        OGRE_CHECK_GL_ERROR(glUniform4fv(currentUniform->mLocation, glArraySize,
                                                         params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_2X2:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix2fv(currentUniform->mLocation, glArraySize,
                                                               GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_3X3:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix3fv(currentUniform->mLocation, glArraySize,
                                                               GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_4X4:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix4fv(currentUniform->mLocation, glArraySize,
                                                               GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
#if OGRE_NO_GLES3_SUPPORT == 0
                    case GCT_MATRIX_2X3:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix2x3fv(currentUniform->mLocation, glArraySize,
                                                                 GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_2X4:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix2x4fv(currentUniform->mLocation, glArraySize,
                                                                 GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_3X2:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix3x2fv(currentUniform->mLocation, glArraySize,
                                                                 GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_3X4:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix3x4fv(currentUniform->mLocation, glArraySize,
                                                                 GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_4X2:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix4x2fv(currentUniform->mLocation, glArraySize,
                                                                 GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
                    case GCT_MATRIX_4X3:
                        OGRE_CHECK_GL_ERROR(glUniformMatrix4x3fv(currentUniform->mLocation, glArraySize,
                                                                 GL_FALSE, params->getFloatPointer(def->physicalIndex)));
                        break;
#else
                    case GCT_MATRIX_2X3:
                    case GCT_MATRIX_2X4:
                    case GCT_MATRIX_3X2:
                    case GCT_MATRIX_3X4:
                    case GCT_MATRIX_4X2:
                    case GCT_MATRIX_4X3:
                        break;
#endif
                    case GCT_INT1:
                        OGRE_CHECK_GL_ERROR(glUniform1iv(currentUniform->mLocation, glArraySize,
                                                         (GLint*)params->getIntPointer(def->physicalIndex)));
                        break;
                    case GCT_INT2:
                        OGRE_CHECK_GL_ERROR(glUniform2iv(currentUniform->mLocation, glArraySize,
                                                         (GLint*)params->getIntPointer(def->physicalIndex)));
                        break;
                    case GCT_INT3:
                        OGRE_CHECK_GL_ERROR(glUniform3iv(currentUniform->mLocation, glArraySize,
                                                         (GLint*)params->getIntPointer(def->physicalIndex)));
                        break;
                    case GCT_INT4:
                        OGRE_CHECK_GL_ERROR(glUniform4iv(currentUniform->mLocation, glArraySize,
                                                         (GLint*)params->getIntPointer(def->physicalIndex)));
                        break;
                    case GCT_SAMPLER1D:
                    case GCT_SAMPLER1DSHADOW:
                    case GCT_SAMPLER2D:
                    case GCT_SAMPLER2DSHADOW:
                    case GCT_SAMPLER3D:
                    case GCT_SAMPLERCUBE:
                        // Samplers handled like 1-element ints
                        OGRE_CHECK_GL_ERROR(glUniform1iv(currentUniform->mLocation, 1,
                                                         (GLint*)params->getIntPointer(def->physicalIndex)));
                        break;
                    case GCT_SAMPLER2DARRAY:
                    case GCT_UNKNOWN:
                    case GCT_SUBROUTINE:
                    case GCT_DOUBLE1:
                    case GCT_DOUBLE2:
                    case GCT_DOUBLE3:
                    case GCT_DOUBLE4:
                    case GCT_SAMPLERRECT:
                    case GCT_MATRIX_DOUBLE_2X2:
                    case GCT_MATRIX_DOUBLE_2X3:
                    case GCT_MATRIX_DOUBLE_2X4:
                    case GCT_MATRIX_DOUBLE_3X2:
                    case GCT_MATRIX_DOUBLE_3X3:
                    case GCT_MATRIX_DOUBLE_3X4:
                    case GCT_MATRIX_DOUBLE_4X2:
                    case GCT_MATRIX_DOUBLE_4X3:
                    case GCT_MATRIX_DOUBLE_4X4:
                    default:
                        break;

                    } // End switch
                } // Variability & mask
            } // fromProgType == currentUniform->mSourceProgType

        } // End for
    }
    //-----------------------------------------------------------------------
    void GLSLESLinkProgram::updateUniformBlocks(GpuProgramParametersSharedPtr params,
                                              uint16 mask, GpuProgramType fromProgType)
    {
#if OGRE_NO_GLES3_SUPPORT == 0
        // Iterate through the list of uniform buffers and update them as needed
        GLUniformBufferIterator currentBuffer = mGLUniformBufferReferences.begin();
        GLUniformBufferIterator endBuffer = mGLUniformBufferReferences.end();

        const GpuProgramParameters::GpuSharedParamUsageList& sharedParams = params->getSharedParameters();

        GpuProgramParameters::GpuSharedParamUsageList::const_iterator it, end = sharedParams.end();
        for (it = sharedParams.begin(); it != end; ++it)
        {
            for (;currentBuffer != endBuffer; ++currentBuffer)
            {
                GLES2HardwareUniformBuffer* hwGlBuffer = static_cast<GLES2HardwareUniformBuffer*>(currentBuffer->get());
                GpuSharedParametersPtr paramsPtr = it->getSharedParams();

                // Block name is stored in mSharedParams->mName of GpuSharedParamUsageList items
                GLint UniformTransform;
                OGRE_CHECK_GL_ERROR(UniformTransform = glGetUniformBlockIndex(mGLProgramHandle, it->getName().c_str()));
                OGRE_CHECK_GL_ERROR(glUniformBlockBinding(mGLProgramHandle, UniformTransform, hwGlBuffer->getGLBufferBinding()));

                hwGlBuffer->writeData(0, hwGlBuffer->getSizeInBytes(), &paramsPtr->getFloatConstantList().front());
            }
        }
#endif
    }
    //-----------------------------------------------------------------------
    void GLSLESLinkProgram::updatePassIterationUniforms(GpuProgramParametersSharedPtr params)
    {
        if (params->hasPassIterationNumber())
        {
            size_t index = params->getPassIterationNumberIndex();

            GLUniformReferenceIterator currentUniform = mGLUniformReferences.begin();
            GLUniformReferenceIterator endUniform = mGLUniformReferences.end();

            // Need to find the uniform that matches the multi pass entry
            for (;currentUniform != endUniform; ++currentUniform)
            {
                // Get the index in the parameter real list
                if (index == currentUniform->mConstantDef->physicalIndex)
                {
                    OGRE_CHECK_GL_ERROR(glUniform1fv(currentUniform->mLocation, 1, params->getFloatPointer(index)));
                    // There will only be one multipass entry
                    return;
                }
            }
        }
    }
} // namespace Ogre


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <base data-ice="baseUrl" href="">
  <title data-ice="title">Test | Gisplay API Documentation API Document</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">

  Home

  Reference
  Source
  Test

    <input class="search-input">

Gisplay
CAesthetic

CFeature

CGisplay

CGisplayOptions

CLegend

Gisplay/Helpers
CColorBrewer

CWebGLUtils

Gisplay/Maps
CChangeMap

CChoropleth

CDotMap

CMap

CProportionalSymbolsMap

Gisplay/Maps/Background Maps
CBGMapBingMaps

CBGMapGoogleMaps

CBGMapHereMaps

CBGMapMapBox

CBGMapWrapper

Test

      Description
      Identifier
      Count

Test GisplayOptions. User options are empty so all defaults should be used.

  GisplayOptions
  29

Attr value is undefined

  GisplayOptions#attr

Color Shceme is undefined

  GisplayOptions#colorScheme

numberOfClasses is undefined

  GisplayOptions#numberOfClasses

classBreaksMethod is quantile

  GisplayOptions#classBreaksMethod

classBreaks are undefined

  GisplayOptions#classBreaks

interactive is true

  GisplayOptions#interactive

showPropertiesOnClick is null

  GisplayOptions#showPropertiesOnClick

showLegend is true

  GisplayOptions#showLegend

minuend is undefined

  GisplayOptions#minuend

subtrahend is undefined

  GisplayOptions#subtrahend

legendTitle is undefined - undefined

  GisplayOptions#legendTitle

showLoader is true

  GisplayOptions#showLoader

useCustomMapService is false

  GisplayOptions#useCustomMapService

minPointSize is 1.0

  GisplayOptions#minPointSize

maxPointSize is 10.0

  GisplayOptions#maxPointSize

sizeByClass is false

  GisplayOptions#sizeByClass

memorySaver is true

  GisplayOptions#memorySaver

colorSchemeId is 1

  GisplayOptions#colorSchemeId

legendOnClickFunction is undefined

  GisplayOptions#legendOnClickFunction

mapOnClickFunction  is undefined

  GisplayOptions#mapOnClickFunction

alpha is 0.8

  GisplayOptions#alpha

maxFeatures is equal to Number.MAX_VALUE

  GisplayOptions#maxFeatures

numberOfLegendItems is 2

  GisplayOptions#numberOfLegendItems

isDynamic is !memorySaver(true)

  GisplayOptions#isDynamic

legendToggle is true

  GisplayOptions#legendToggle

intensity(deprecated) is 1.0

  GisplayOptions#intensity

legendPosition(deprecated) is equal to br

  GisplayOptions#

legendNumberFormat(deprecated) is 0

  GisplayOptions#legendNumberFormat

profiling is true

  GisplayOptions#

Test GisplayOptions. Some user options are defined. TODO: More testing

  GisplayOptions
  25

Attr value is undefined

  GisplayOptions#attr

Color Shceme is undefined

  GisplayOptions#colorScheme

numberOfClasses is undefined

  GisplayOptions#numberOfClasses

classBreaksMethod is quantile

  GisplayOptions#classBreaksMethod

classBreaks are undefined

  GisplayOptions#classBreaks

interactive is true

  GisplayOptions#interactive

showPropertiesOnClick is null

  GisplayOptions#showPropertiesOnClick

showLegend is true

  GisplayOptions#showLegend

minuend is undefined

  GisplayOptions#minuend

subtrahend is undefined

  GisplayOptions#subtrahend

legendTitle is undefined - undefined

  GisplayOptions#legendTitle

showLoader is true

  GisplayOptions#showLoader

useCustomMapService is false

  GisplayOptions#useCustomMapService

minPointSize is 1.0

  GisplayOptions#minPointSize

maxPointSize is 10.0

  GisplayOptions#maxPointSize

sizeByClass is false

  GisplayOptions#sizeByClass

memorySaver is true

  GisplayOptions#memorySaver

colorSchemeId is 1

  GisplayOptions#colorSchemeId

legendOnClickFunction is undefined

  GisplayOptions#legendOnClickFunction

mapOnClickFunction  is undefined

  GisplayOptions#mapOnClickFunction

alpha is 0.8

  GisplayOptions#alpha

maxFeatures is equal to Number.MAX_VALUE

  GisplayOptions#maxFeatures

numberOfLegendItems is 2

  GisplayOptions#numberOfLegendItems

isDynamic is !memorySaver(true)

  GisplayOptions#isDynamic

legendToggle is true

  GisplayOptions#legendToggle

  Generated by ESDoc(0.5.2)


text:
Menu::Menu ( void ) : m_saxguy(false)
{
   m_screen.reset(new sf::RenderWindow ( sf::VideoMode ( 640, 480 ), "Menu" ));
   m_screen->setVerticalSyncEnabled(true);

   m_bgTexture.reset(new sf::Texture);
   m_playTexture.reset(new sf::Texture);
   m_optionTexture.reset(new sf::Texture);
   m_activePlayTexture.reset(new sf::Texture);
   m_activeOptionTexture.reset(new sf::Texture);
   m_saxTexture.reset(new sf::Texture);
   m_saxDanceTexture.reset(new sf::Texture);

   if ( !m_bgTexture->loadFromFile ( "img/menu_background.png" )
         || !m_playTexture->loadFromFile ( "img/lancer_partie.png" )
         || !m_optionTexture->loadFromFile ( "img/options.png" )
         || !m_activePlayTexture->loadFromFile ( "img/lancer_partie_actif.png" )
         || !m_activeOptionTexture->loadFromFile ( "img/options_actif.png" )
         || !m_saxTexture->loadFromFile ( "img/menu_sax.jpg" )
         || !m_saxDanceTexture->loadFromFile ( "img/menu_sax1.jpg" ) )
   {
      exit ( EXIT_FAILURE );
   }

   m_bgSprite.reset(new sf::Sprite ( *m_bgTexture ));

   m_playSprite.reset(new sf::Sprite ( *m_playTexture ));
   m_playSprite->move ( 30, 180 );

   m_optionSprite.reset(new sf::Sprite ( *m_optionTexture ));
   m_optionSprite->move ( 37, m_playSprite->getPosition().y + m_playSprite->getLocalBounds().height + 30 );

   m_music.reset(new sf::Music);
   if(!m_music->openFromFile("music/menu.ogg")) {
      exit(EXIT_FAILURE);
   }
   m_music->setPlayingOffset(sf::seconds(5.5));
   m_music->setVolume(50);
   m_music->play();

   m_soundBuffer.reset(new sf::SoundBuffer);
   m_soundBuffer->loadFromFile("sound/button.ogg");

   m_sound.reset(new sf::Sound);
   m_sound->setBuffer(*m_soundBuffer);
   m_sound->setVolume(15);

   m_played = false;
   m_onButton = false;
}

Menu::~Menu ( void )
{
   std::cout << "DESTRUCT MENU" << std::endl;
}

void Menu::action() {
   if(!m_screen->isOpen())
      m_screen->create(sf::VideoMode ( 640, 480 ), "Menu");
   m_music->setPlayingOffset(sf::seconds(5.5));
   m_music->play();

   m_sound->setBuffer(*m_soundBuffer);
   m_sound->setVolume(15);

   double anim(0.0);
   m_saxguy = false;
   m_bgSprite->setTexture(*m_bgTexture);

   sf::Event event;
   sf::Vector2i mousePos(sf::Mouse::getPosition(*m_screen));
   while (m_screen->isOpen()) {
      while(m_screen->pollEvent(event))
      {
         if(event.type == sf::Event::Closed)
         {
            m_music->stop();
            m_screen->close();
         }
      }

      mousePos = sf::Mouse::getPosition(*m_screen);

      if(m_playSprite->getGlobalBounds().contains(mousePos.x, mousePos.y))
      {
         if(m_sound->getStatus() == sf::SoundSource::Stopped && !m_played) {
            m_sound->play();
            m_played = true;
         }
         m_playSprite->setTexture(*m_activePlayTexture);
         if (sf::Mouse::isButtonPressed(sf::Mouse::Button::Left)) {
            m_music->stop();
            m_screen->close();
            GameManager& gameManager = GameManager::getInstance();
            gameManager.action();
         }
      }
      else {
         m_played = false;
         m_playSprite->setTexture(*m_playTexture);
      }

      if(m_optionSprite->getGlobalBounds().contains(mousePos.x, mousePos.y))
      {
         if(m_sound->getStatus() == sf::SoundSource::Stopped && m_onButton) {
            m_sound->play();
            m_onButton = false;
         }
         m_optionSprite->setTexture(*m_activeOptionTexture);
      }
      else {
         m_optionSprite->setTexture(*m_optionTexture);
         m_onButton = true;
      }

      // easter eggs EPIC SAX GUY
      if(sf::Keyboard::isKeyPressed(sf::Keyboard::S))
      {
         if(sf::Keyboard::isKeyPressed(sf::Keyboard::A)) {
            if(sf::Keyboard::isKeyPressed(sf::Keyboard::X)) {
               if(!m_music->openFromFile("music/saxguy.ogg")) {
                  exit(EXIT_FAILURE);
               }
               m_music->stop();
               m_music->play();
               m_saxguy = true;
            }
         }
      }

      if(sf::Keyboard::isKeyPressed(sf::Keyboard::M))
      {
         m_music->stop();
      }

      // anim menu
      if(m_saxguy) {

         anim += 0.06;

         if(anim > 6.0)
            anim = 0.0;

         if((int)anim % 2 == 0) {
            m_bgSprite->setTexture(*m_saxTexture);
         }
         else if ((int)anim % 2 == 1) {
            m_bgSprite->setTexture(*m_saxDanceTexture);
         }

      }

      m_screen->clear();
      m_screen->draw(*m_bgSprite);
      m_screen->draw(*m_playSprite);
      m_screen->draw(*m_optionSprite);
      m_screen->display();
   }
}


text:
import sys

def bump_version(version):
    try:
        parts = map(int, version.split('.'))
    except ValueError:
        fail('Current version is not numeric')
    parts[-1] += 1
    return '.'.join(map(str, parts))

def fail(message):
    print(message)
    sys.exit(1)

# To get the FP result reported in ODASA-6418,
#bump_version must be called (directly or transitively) from the module scope
bump_version()


text:
module Mongoload
  module RelationsEnumerableWithAutoInclude
    # methods which trigger Mongoload only when :fully_load is true
    # other methods delegated to #target will be processed by #unloaded_documents
    %w(first last size empty?).each do |method|
      define_method method do
        if !_loaded? && relation_metadata.fully_load? && Mongoload::RelationLoader.load(base, relation_metadata)
          base.ivar(relation_metadata.name).public_send(method)
        else
          super()
        end
      end
    end

    private

    # perform eager loading when loading unloaded documents
    def unloaded_documents
      if !_loaded? && Mongoload::RelationLoader.load(base, relation_metadata)
        base.ivar(relation_metadata.name)
      else
        super
      end
    end
  end
end

Mongoid::Relations::Targets::Enumerable.prepend Mongoload::RelationsEnumerableWithAutoInclude


text:
/* global THREE, VertexIndices, computeCentroid */

const relativeLerpBoxVertices = (() => {
  'use strict';

  const centroidA = new THREE.Vector3();
  const centroidB = new THREE.Vector3();
  const delta = new THREE.Vector3();

  return function relativeLerp( geometryA, keyA, geometryB, keyB, t ) {
    const indicesA = VertexIndices[ keyA.toUpperCase() ];
    const indicesB = VertexIndices[ keyB.toUpperCase() ];

    computeCentroid( geometryA, indicesA, centroidA );
    computeCentroid( geometryB, indicesB, centroidB );

    delta.subVectors( centroidB, centroidA ).multiplyScalar( t );

    if ( Array.isArray( indicesA ) ) {
      indicesA.forEach( index =>
        geometryA.vertices[ index ].add( delta )
      );
    }

    return geometryA;
  };
})();

window.relativeLerpBoxVertices = relativeLerpBoxVertices;


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Sphaeria ogilviensis Berk. & Broome, 1852

### Remarks
null


text:
"""Image downloader

Write a program that goes to a photo-sharing site like Flickr or Imgur,
searches for a category of photos, and then downloads all the resulting images.
You could write a program that works with any photo site that has a search feature.

Note:
    Many photo-sharing sites do not want direct download links easily accessible.
    Therefore, it is likely this script will not work in the future.

"""

def main():
    import requests, os, bs4
    from selenium import webdriver, common

    # Open Browser to photo-sharing site
    url = "https://www.flickr.com/search/?text="        # starting url
    os.makedirs("images", exist_ok=True)                # store images in ./images

    browser = webdriver.Firefox()
    browser.implicitly_wait(10)  # seconds

    # Search for category of photos
    browser.get(url + "Cats")

    # Download all images
    try:
        imageElems = browser.find_elements_by_css_selector("a.overlay")
        for element in imageElems:
            downloadUrl = element.get_attribute("href") + "sizes/o/"
            res = requests.get(downloadUrl)
            res.raise_for_status()

            soup = bs4.BeautifulSoup(res.text, "lxml")

            imageElem = soup.select("img")  # FIXME: Last few images are not of the category

            if not imageElem:
                print("Could not find image.")
            else:
                imageUrl = imageElem[2].get("src")

                # Save image to ./images
                res = requests.get(imageUrl)
                res.raise_for_status()

                imageFile = open(os.path.join("images", os.path.basename(imageUrl)), "wb")
                for chunk in res.iter_content(100000):
                    imageFile.write(chunk)
                imageFile.close()

    except common.exceptions.NoSuchElementException as err:
        print("Unable to locate element: %s" % err)

    browser.close()

if __name__ == '__main__':
    main()


text:
package main

import (
	"fmt"

	"github.com/docopt/docopt-go"
)

type CommandLine struct {
}

func (cli *CommandLine) Usage() error {

	usage := `	Doit Client - DevOps Inventory Technician

	Usage:
		doit-client --version
		doit-client add host <name>
		doit-client remove host <name>
		doit-client add group <name>
		doit-client remove group <name>
		doit-client add var <name> <value>
		doit-client remove var <name>
		doit-client add domain
		doit-client remove domain

	Options:
		-h --help     			Show usage.
		--port=<port> 			Set port for server [default: 8123].
		--config=<config_file>  Load config file for server.
		-s --server      		Enable server mode.`

	arguments, err := docopt.Parse(usage, nil, true, "DOIT Client 0.1", false)
	if err != nil {
		return err
	}
	fmt.Printf("%#v", arguments)
	return nil
}


text:
using Windows.UI.Xaml.Controls;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace Notifications.ScenarioPages.LiveTiles.AdaptiveTemplates.Branding.Logo
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class ScenarioElement : UserControl
    {
        public ScenarioElement()
        {
            this.InitializeComponent();

            // Because different densities might be able to display more, we just set tons of text wrapped to make sure it overflows at some point
            string fillerText = "<text hint-wrap='true'>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</text>";

            updateFourTilesControl.SetTilePayload($@"
                <tile version='3'>
                    <visual>

                        <binding template='TileSmall' branding='logo'>
                            <text>logo</text>
                            {fillerText}
                        </binding>

                        <binding template='TileMedium' branding='logo'>
                            <text hint-wrap='true'>branding: logo</text>
                            {fillerText}
                        </binding>

                        <binding template='TileWide' branding='logo'>
                            <text hint-wrap='true'>branding: logo</text>
                            {fillerText}
                        </binding>

                        <binding template='TileLarge' branding='logo'>
                            <text hint-wrap='true'>branding: logo</text>
                            {fillerText}
                        </binding>

                    </visual>
                </tile>");
        }
    }
}


text:
package jp.ac.titech.cs.se.fwit.core.model.composite.visitor;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Stack;

import jp.ac.titech.cs.se.fwit.core.model.Transition;
import jp.ac.titech.cs.se.fwit.core.model.composite.CLTS;
import jp.ac.titech.cs.se.fwit.core.model.composite.CState;
import jp.ac.titech.cs.se.fwit.core.model.composite.CTransition;
import jp.ac.titech.cs.se.fwit.core.model.req.RTransition;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Detect usages from a CLTS by separating branches with tau transitions.
 * @author zenmyo
 *
 */
public class DetectUsagesVisitor extends CLTSElementsVisitorSupport<List<CLTS>> {

    public static Log logger = LogFactory.getLog(DetectUsagesVisitor.class);

    private final CopyCLTSVisitor copyVisitor = new CopyCLTSVisitor();

    private final FindSameStateVisitor findVisitor = new FindSameStateVisitor();

    private final Stack<Set<CState>> stateStack = new Stack<Set<CState>>();

    @Override
    protected void init() {
        result = new ArrayList<CLTS>();
        stateStack.clear();
    }

    @Override
    protected Boolean visitCState(CState state) {
        if (result.isEmpty()) {
            final CLTS clts = new CLTS();
            final CState initial = new CState(state);
            clts.setInitialState(initial);
            result.add(clts);
            final Set<CState> initialSet = new HashSet<CState>();
            initialSet.add(initial);
            stateStack.push(initialSet);
        }
        return true;
    }

    @Override
    protected Boolean visitCTransition(CTransition transition) {
        Set<CState> sources = this.stateStack.peek();
        final Set<CTransition> otherChoices = getOtherChoices(transition);

        if (!otherChoices.isEmpty()) {
            final Set<CState> alternateSources = new HashSet<CState>();
            for (final CState source : sources) {
                copyVisitor.parse(source.getInitialState());
                final CLTS clts = copyVisitor.getResult();
                result.add(clts);

                findVisitor.setGoal(source);
                final CState alternateSource = findVisitor.parse(clts
                        .getInitialState());
                clts.addUnadoptedTransitions(otherChoices);

                // if null the copy is inconsistent of this choice
                if (alternateSource != null) {
                    alternateSources.add(alternateSource);
                }
            }
            sources = alternateSources;
        }
        final Set<CState> targets = new HashSet<CState>();
        for (final CState source : sources) {
            if (source.isSame(transition.getSource())) {
                final CState target = new CState((CState) transition.getTarget());
                final CLTS lts = (CLTS) source.getLts();
                if (lts.canAdapt(source, target)) {
                    final CTransition newTransition = transition.getUnconnectedCopy();
                    newTransition.setSource(source);
                    newTransition.setTarget(target);
                    targets.add(target);
                }
            }
        }
        this.stateStack.push(targets);
        return true;
    }

    @Override
    public void endVisit(Transition transition) {
        final CTransition ct = (CTransition) transition;
        if (!getOtherChoices(ct).isEmpty()) {
            final Set<CState> alternateTargets = this.stateStack.pop();
            final Set<CState> alternateSources = new HashSet<CState>();
            for (final CState target : alternateTargets) {
                alternateSources.add((CState) target.getIncoming().getSource());
            }
            alternateSources.addAll(this.stateStack.pop());
            this.stateStack.push(alternateSources);
        } else {
            this.stateStack.pop();
        }
    }

    private Set<CTransition> getOtherChoices(CTransition transition) {
        final RTransition rt = transition.getReqTransition();
        final List<Transition> brothers = transition.getSource().getOutgoings();
        final Set<CTransition> otherChoices = new HashSet<CTransition>();
        for (final Transition brother : brothers) {
            if (brother.equals(transition)) {
                continue;
            }
            final CTransition ct = (CTransition) brother;
            if (rt.equals(ct.getReqTransition())) {
                otherChoices.add(ct);
            }
        }
        return otherChoices;
    }
}


text:
namespace Bungie.Responses
{
    using Newtonsoft.Json;
    using Models;

    public class GetAccountSummaryResponse : DefinitionsResponse
    {
        [JsonProperty("data")]
        public AccountSummary AccountSummary { get; set; }
    }
}


text:
This is a simple demo app that shows how you can use the OpenTok Java SDK to archive (or record)
Sessions, list archives that have been created, download the recordings, and delete the recordings.

## Running the App

First, download the dependencies using [Composer](http://getcomposer.org) in this directory.

```
$ composer install
```

Next, input your own API Key and API Secret into the `run-demo` script file:

```
  export API_KEY=0000000
  export API_SECRET=abcdef1234567890abcdef01234567890abcdef
```

Finally, start the PHP CLI development server (requires PHP >= 5.4) using the `run-demo` script

```
$ ./run-demo
```

Visit <http://localhost:8080> in your browser.  You can now create new archives (either as a host or
as a participant) and also play archives that have already been created.

Hint: If you get an error message that says "The sessionId must belong to the apiKey", you might
need to remove the `cache` directory in the sample app directory. This can happen if you try running
the app with a different API Key than you used the last time it ran.

## Walkthrough

This demo application uses the same frameworks and libraries as the HelloWorld sample. If you have
not already gotten familiar with the code in that project, consider doing so before continuing.

The explanations below are separated by page. Each section will focus on a route handler within the
main application (web/index.php).

### Creating Archives – Host View

Start by visiting the host page at <http://localhost:8080/host> and using the application to record
an archive. Your browser will first ask you to approve permission to use the camera and microphone.
Once you've accepted, your image will appear inside the section titled 'Host'. To start recording
the video stream, press the 'Start Archiving' button. Once archiving has begun the button will turn
green and change to 'Stop Archiving'. You should also see a red blinking indicator that you are
being recorded. Wave and say hello! Stop archiving when you are done.

Next we will see how the host view is implemented on the server. The route handler for this page is
shown below:

```php
$app->get('/host', function () use ($app, $sessionId) {

    $token = $app->opentok->generateToken($sessionId, array(
        'role' => Role::MODERATOR
    ));

    $app->render('host.html', array(
        'apiKey' => $app->apiKey,
        'sessionId' => $sessionId,
        'token' => $token
    ));
});
```

If you've completed the HelloWorld walkthrough, this should look familiar. This handler simply
generates the three strings that the client (JavaScript) needs to connect to the session: `apiKey`,
`sessionId` and `token`. After the user has connected to the session, they press the
'Start Archiving' button, which sends an XHR (or Ajax) request to the <http://localhost:8080/start>
URL. The route handler for this URL is shown below:

```php
$app->get('/start', function () use ($app, $sessionId) {

    $archive = $app->opentok->startArchive($sessionId, "PHP Archiving Sample App");

    $app->response->headers->set('Content-Type', 'application/json');
    echo json_encode($archive);
});
```

In this handler, the `startArchive()` method of the `opentok` instance is called with the `sessionId`
for the session that needs to be archived. The optional second argument is `name`, which is stored with
the archive and can be read later. In this case, as in the HelloWorld sample app, there is
only one session created and it is used here and for the participant view. This will trigger the
recording to begin. The response sent back to the client's XHR request will be the JSON
representation of the archive, which is serialized by the `json_encode()` builtin. The client is also
listening for the `archiveStarted` event, and uses that event to change the 'Start Archiving' button
to show 'Stop Archiving' instead. When the user presses the button this time, another XHR request
is sent to the <http://localhost:8080/stop/:archiveId> URL where `:archiveId` represents the ID the
client receives in the 'archiveStarted' event. The route handler for this request is shown below:

```php
$app->get('/stop/:archiveId', function($archiveId) use ($app) {
    $archive = $app->opentok->stopArchive($archiveId);
    $app->response->headers->set('Content-Type', 'application/json');
    echo json_encode($archive);
});
```

This handler is very similar to the previous one. Instead of calling the `startArchive()` method,
the `stopArchive()` method is called. This method takes an `archiveId` as its parameter, which
is different for each time a session starts recording. But the client has sent this to the server
as part of the URL, so the `$archiveId` argument from the route is used to retrieve it.

Now you have understood the three main routes that are used to create the Host experience of
creating an archive. Much of the functionality is done in the client with JavaScript. That code can
be found in the `web/js/host.js` file. Read about the
[OpenTok.js JavaScript](http://tokbox.com/opentok/libraries/client/js/) library to learn more.

### Creating Archives - Participant View

With the host view still open and publishing, open an additional window or tab and navigate to
<http://localhost:8080/participant> and allow the browser to use your camera and microphone. Once
again, start archiving in the host view. Back in the participant view, notice that the red blinking
indicator has been shown so that the participant knows his video is being recorded. Now stop the
archiving in the host view. Notice that the indicator has gone away in the participant view too.

Creating this view on the server is as simple as the HelloWorld sample application. See the code
for the route handler below:

```php
$app->get('/participant', function () use ($app, $sessionId) {

    $token = $app->opentok->generateToken($sessionId, array(
        'role' => Role::MODERATOR
    ));

    $app->render('participant.html', array(
        'apiKey' => $app->apiKey,
        'sessionId' => $sessionId,
        'token' => $token
    ));
});
```

Since this view has no further interactivity with buttons, this is all that is needed for a client
that is participating in an archived session. Once again, much of the functionality is implemented
in the client, in code that can be found in the `web/js/participant.js` file.

### Past Archives

Start by visiting the history page at <http://localhost:8080/history>. You will see a table that
displays all the archives created with your API Key. If there are more than five, the older ones
can be seen by clicking the "Older →" link. If you click on the name of an archive, your browser
will start downloading the archive file. If you click the "Delete" link in the end of the row
for any archive, that archive will be deleted and no longer available. Some basic information like
when the archive was created, how long it is, and its status is also shown. You should see the
archives you created in the previous sections here.

We begin to see how this page is created by looking at the route handler for this URL:

```php
$app->get('/history', function () use ($app) {
    $page = intval($app->request->get('page'));
    if (empty($page)) {
        $page = 1;
    }

    $offset = ($page - 1) * 5;

    $archives = $app->opentok->listArchives($offset, 5);

    $toJson = function($archive) {
      return $archive->toJson();
    };

    $app->render('history.html', array(
        'archives' => array_map($toJson, $archives->getItems()),
        'showPrevious' => $page > 1 ? '/history?page='.($page-1) : null,
        'showNext' => $archives->totalCount() > $offset + 5 ? '/history?page='.($page+1) : null
    ));
});
```

This view is paginated so that we don't potentially show hundreds of rows on the table, which would
be difficult for the user to navigate. So this code starts by figuring out which page needs to be
shown, where each page is a set of 5 archives. The `page` number is read from the request's query
string parameters as a string and then coerced into an `int`. If the value was missing, its assigned
to the default value of one. The `offset`, which represents how many archives are being skipped, is
always calculated as five times as many pages that are less than the current page, which is
`($page - 1) * 5`. Now there is enough information to ask for a list of archives from OpenTok,
which we do by calling the `listArchives()` method of the `opentok` instance. The first parameter is
the offset, and the second is the count (which is always 5 in this view). If we are not
at the first page, we can pass the view a string that contains the relative URL for the previous
page. Similarly, we can also include one for the next page. Now the application renders the view
using that information and the partial list of archives.

At this point the template file `templates/history.html` handles looping over the array of archives
and outputting the proper information for each column in the table. It also places a link to the
download and delete routes around the archive's name and its delete button, respectively.

The code for the download route handler is shown below:

```php
$app->get('/download/:archiveId', function ($archiveId) use ($app) {
    $archive = $app->opentok->getArchive($archiveId);
    $app->redirect($archive->url);
});
```

The download URL for an archive is available as a property of an `Archive` instance. In order to get
an instance to this archive, the `getArchive()` method of the `opentok` instance is used. The only
parameter it needs is the `archiveId`. We use the same technique as above to read that `archiveId`
from the URL. Lastly, we send a redirect response back to the browser so the download begins.

The code for the delete route handler is shown below:

```php
$app->get('/delete/:archiveId', function($archiveId) use ($app) {
    $app->opentok->deleteArchive($archiveId);
    $app->redirect('/history');
});
```

Once again the `archiveId` is retrieved from the URL of the request. This value is then passed to the
`deleteArchive()` method of the `opentok` instance. Now that the archive has been deleted, a
redirect response back to the first page of the history is sent back to the browser.

That completes the walkthrough for this Archiving sample application. Feel free to continue to use
this application to browse the archives created for your API Key.


text:
"""Keras built-in regularizers."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# Regularizer functions / callable classes.
from tensorflow.python.keras._impl.keras.regularizers import L1L2
from tensorflow.python.keras._impl.keras.regularizers import Regularizer

# Functional interface.
# pylint: disable=g-bad-import-order
from tensorflow.python.keras._impl.keras.regularizers import l1
from tensorflow.python.keras._impl.keras.regularizers import l2
from tensorflow.python.keras._impl.keras.regularizers import l1_l2

# Auxiliary utils.
from tensorflow.python.keras._impl.keras.regularizers import deserialize
from tensorflow.python.keras._impl.keras.regularizers import serialize
from tensorflow.python.keras._impl.keras.regularizers import get

del absolute_import
del division
del print_function


text:
require 'test_helper'

class Upload::NiconicoHelperTest < ActionView::TestCase
end


text:
import {Creator} from '../src/index';
import {expect} from 'chai';
import {IComplexPart, ISimplePart} from "../src/interfaces";

/**
 * When your app grow your state became big and deep
 * For better manage deep state you can use "complex_part" property
 * In this property you can use SimplePart or ComplexPart
 * For example: you have counterPart
 * And you wanna create three independent counter
 */

const counter_part: ISimplePart = {
    initial_state: {
        value: 0,
    },
    reducer: {
        add(state, { payload }) {
            return {
                ...state,
                value: state.value + payload,
            }
        }
    }
};

const complex_part: IComplexPart = {
    complex_parts: {
        counter_1: counter_part,
        counter_2: counter_part,
        counter_3: counter_part,
    }
};

describe("EXAMPLES: deep state. ", function() {
    let actions, reducer;

    beforeEach(() => {
        const store = Creator(complex_part);
        actions = store.actions;
        reducer = store.reducer;
    });

    it("actions", function() {
        const add1Action = actions.counter_1.add(1);
        const add2Action = actions.counter_2.add(2);
        const add3Action = actions.counter_3.add(3);

        expect(add1Action).to.deep.equal({ type: 'counter_1.add', payload: 1 });
        expect(add2Action).to.deep.equal({ type: 'counter_2.add', payload: 2 });
        expect(add3Action).to.deep.equal({ type: 'counter_3.add', payload: 3 });
    });

    it("reducer", function() {
        const add1Action = actions.counter_1.add(1);
        const add2Action = actions.counter_2.add(2);
        const add3Action = actions.counter_3.add(3);
        let state;

        state = reducer(state, add1Action);
        state = reducer(state, add2Action);
        state = reducer(state, add3Action);

        expect(state).to.deep.equal({
            counter_1 : {
                value: 1,
            },
            counter_2 : {
                value: 2,
            },
            counter_3 : {
                value: 3,
            },
        });
    });
});


text:
package chapter4.recipe1;

import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.http.*;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;

import javax.net.ssl.SSLException;
import java.net.URI;
import java.net.URISyntaxException;

public final class TweetStreamingClient implements Runnable {

    static final String URL = System.getProperty("url", "https://stream.twitter.com/1.1/statuses/sample.json");

    @Override
    public void run() {
        URI uri = null;
        try {
            uri = new URI(URL);
        } catch (URISyntaxException e) {
            e.printStackTrace();
            return;
        }
        String scheme = uri.getScheme() == null? "http" : uri.getScheme();
        String host = uri.getHost() == null? "127.0.0.1" : uri.getHost();
        int port = uri.getPort();
        if (port == -1) {
            if ("http".equalsIgnoreCase(scheme)) {
                port = 80;
            } else if ("https".equalsIgnoreCase(scheme)) {
                port = 443;
            }
        }

        if (!"http".equalsIgnoreCase(scheme) && !"https".equalsIgnoreCase(scheme)) {
            System.err.println("Only HTTP(S) is supported.");
            return;
        }

        // Configure SSL context if necessary.
        final boolean ssl = "https".equalsIgnoreCase(scheme);
        final SslContext sslCtx;
        if (ssl) {
            try {
                sslCtx = SslContextBuilder.forClient()
                        .trustManager(InsecureTrustManagerFactory.INSTANCE).build();
            } catch (SSLException e) {
                e.printStackTrace();
                return;
            }
        } else {
            sslCtx = null;
        }

        // Configure the client.
        EventLoopGroup group = new NioEventLoopGroup();
        try {
            Bootstrap b = new Bootstrap();
            b.group(group)
                    .channel(NioSocketChannel.class)
                    .handler(new TweetStreamingClientInitializer(sslCtx));

            // Make the connection attempt.
            Channel ch = b.connect(host, port).sync().channel();

            // Prepare the HTTP request.
            HttpRequest request = new DefaultFullHttpRequest(
                    HttpVersion.HTTP_1_1, HttpMethod.GET, uri.getRawPath());
            request.headers().set(HttpHeaders.Names.HOST, host);

            // Set Twitter OAuth headers
            request.headers().set(
                HttpHeaders.Names.AUTHORIZATION,
                "OAuth " +
                        "oauth_consumer_key=\"u0BoMLbYEAZOuzIlRWiEcYck3\", " +
                        "oauth_nonce=\"f8f713a05f3fc40f096e681795dc1d77\", " +
                        "oauth_signature=\"GkgqEGO%2BKuUMN0X8Xd%2BDTGrQOkk%3D\", " +
                        "oauth_signature_method=\"HMAC-SHA1\", " +
                        "oauth_timestamp=\"1438575131\", " +
                        "oauth_token=\"62294436-LF41CJ9Q954ZpVha8mWmtKR6NiVvnASNhLG94oKAo\", " +
                        "oauth_version=\"1.0\""
            );

            // Send the HTTP request.
            ch.writeAndFlush(request);

            // Wait for the server to close the connection.
            ch.closeFuture().sync();
        } catch (InterruptedException e) {
            e.printStackTrace();
            return;
        } finally {
            // Shut down executor threads to exit.
            group.shutdownGracefully();
        }
    }
}