text:
<?php

if ( ! class_exists( 'FooGallery_Admin_Settings' ) ) {

	/**
	 * Class FooGallery_Admin_Settings
	 */
	class FooGallery_Admin_Settings {

		function __construct() {
			add_filter( 'foogallery_admin_settings', array( $this, 'create_settings' ), 10, 2 );
			add_action( 'foogallery_admin_settings_custom_type_render_setting', array( $this, 'render_custom_setting_types' ) );
			add_action( 'foogallery_admin_settings_after_render_setting', array( $this, 'after_render_setting' ) );

			// Ajax calls
			add_action( 'wp_ajax_foogallery_clear_css_optimizations', array( $this, 'ajax_clear_css_optimizations' ) );
			add_action( 'wp_ajax_foogallery_thumb_generation_test', array( $this, 'ajax_thumb_generation_test' ) );
			add_action( 'wp_ajax_foogallery_apply_retina_defaults', array( $this, 'ajax_apply_retina_defaults' ) );
			add_action( 'wp_ajax_foogallery_uninstall', array( $this, 'ajax_uninstall' ) );
		}

		/**
		 * Create the settings for FooGallery
		 * @return array
		 */
		function create_settings() {

			//region General Tab
			$tabs['general'] = __( 'General', 'foogallery' );

			$settings[] = array(
				'id'      => 'clear_css_optimizations',
				'title'   => __( 'Clear CSS Cache', 'foogallery' ),
				'desc'    => sprintf( __( '%s optimizes the way it loads gallery stylesheets to improve page performance. This can lead to the incorrect CSS being loaded in some cases. Use this button to clear all the CSS optimizations that have been cached across all galleries.', 'foogallery' ), foogallery_plugin_name() ),
				'type'    => 'clear_optimization_button',
				'tab'     => 'general',
				'section' => __( 'Cache', 'foogallery' )
			);

	        $gallery_templates = foogallery_gallery_templates();
			$gallery_templates_choices = array();
			foreach ( $gallery_templates as $template ) {
				$gallery_templates_choices[ $template['slug'] ] = $template['name'];
			}

			$settings[] = array(
				'id'      => 'gallery_template',
				'title'   => __( 'Default Gallery Template', 'foogallery' ),
				'desc'    => __( 'The default gallery template to use for new galleries', 'foogallery' ),
				'default' => foogallery_get_default( 'gallery_template' ) ,
				'type'    => 'select',
				'choices' => $gallery_templates_choices,
				'tab'     => 'general',
				'section' => __( 'Gallery Defaults', 'foogallery' )
			);

			$settings[] = array(
				'id'      => 'gallery_sorting',
				'title'   => __( 'Default Gallery Sorting', 'foogallery' ),
				'desc'    => __( 'The default attachment sorting to use for new galleries', 'foogallery' ),
				'default' => '',
				'type'    => 'select',
				'choices' => foogallery_sorting_options(),
				'tab'     => 'general',
				'section' => __( 'Gallery Defaults', 'foogallery' )
			);

			$galleries = foogallery_get_all_galleries();
			$gallery_choices = array();
			$gallery_choices[] = __( 'No default', 'foogallery' );
			foreach ( $galleries as $gallery ) {
				$gallery_choices[ $gallery->ID ] = $gallery->name;
			}

			$settings[] = array(
				'id'      => 'default_gallery_settings',
				'title'   => __( 'Default Gallery Settings', 'foogallery' ),
				'desc'    => __( 'When creating a new gallery, it can use the settings from an existing gallery as the default settings. This will save you time when creating many galleries that all have the same look and feel.', 'foogallery' ),
				'type'    => 'select',
				'choices' => $gallery_choices,
				'tab'     => 'general',
				'section' => __( 'Gallery Defaults', 'foogallery' )
			);

			$settings[] = array(
				'id'      => 'caption_title_source',
				'title'   => __( 'Caption Title Source', 'foogallery' ),
				'desc'    => __( 'By default, image caption titles are pulled from the attachment "Caption" field. Alternatively, you can also choose to pull from the attachment "Title" field.', 'foogallery' ),
				'type'    => 'select',
				'choices' => array(
					'caption' => __('Attachment Caption Field', 'foogallery'),
					'title' => __('Attachment Title Field', 'foogallery')
				),
				'default' => 'caption',
				'tab'     => 'general',
				'section' => __( 'Captions', 'foogallery' ),
				'spacer'  => ''
			);

			$settings[] = array(
					'id'      => 'caption_desc_source',
					'title'   => __( 'Caption Description Source', 'foogallery' ),
					'desc'    => __( 'By default, image caption descriptions are pulled from the attachment "Description" field. Alternatively, you can choose to use other fields.', 'foogallery' ),
					'type'    => 'select',
					'choices' => array(
							'desc' => __('Attachment Description Field', 'foogallery'),
							'title' => __('Attachment Title Field', 'foogallery'),
							'caption' => __('Attachment Caption Field', 'foogallery'),
							'alt' => __('Attachment Alt Field', 'foogallery')
					),
					'default' => 'desc',
					'tab'     => 'general',
					'section' => __( 'Captions', 'foogallery' ),
					'spacer'  => ''
			);

			$settings[] = array(
				'id'      => 'hide_gallery_template_help',
				'title'   => __( 'Hide Gallery Template Help', 'foogallery' ),
				'desc'    => __( 'Some gallery templates show helpful tips, which are useful for new users. You can choose to hide these tips.', 'foogallery' ),
				'type'    => 'checkbox',
				'tab'     => 'general',
				'section' => __( 'Admin', 'foogallery' )
			);

			$settings[] = array(
				'id'      => 'hide_editor_button',
				'title'   => __( 'Hide WYSIWYG Editor Button', 'foogallery' ),
				'desc'    => sprintf( __( 'If enabled, this will hide the "Add %s" button in the WYSIWYG editor.', 'foogallery' ), foogallery_plugin_name() ),
				'type'    => 'checkbox',
				'tab'     => 'general',
				'section' => __( 'Admin', 'foogallery' )
			);

			//endregion General

	        //region Extensions Tab
	        $tabs['extensions'] = __( 'Extensions', 'foogallery' );

	        $settings[] = array(
		        'id'      => 'use_future_endpoint',
		        'title'   => __( 'Use Beta Endpoint', 'foogallery' ),
		        'desc'    => __( 'The list of available extensions are pulled from an external URL. You can also pull from a "beta" endpoint which will sometimes contain beta extensions that are not publicly available.', 'foogallery' ),
		        'type'    => 'checkbox',
		        'tab'     => 'extensions',
	        );
			//endregion Extensions Tab

			//region Images Tab
			$tabs['thumb'] = __( 'Images', 'foogallery' );

			$settings[] = array(
				'id'      => 'thumb_jpeg_quality',
				'title'   => __( 'Thumbnail JPEG Quality', 'foogallery' ),
				'desc'    => __( 'The image quality to be used when resizing JPEG images.', 'foogallery' ),
				'type'    => 'text',
				'default' => '80',
				'tab'     => 'thumb'
			);

			$settings[] = array(
				'id'      => 'default_retina_support',
				'title'   => __( 'Default Retina Support', 'foogallery' ),
				'desc'    => __( 'Default retina support for all new galleries that are created. This can also be overridden for each gallery.', 'foogallery' ),
				'type'    => 'checkboxlist',
				'choices' => foogallery_retina_options(),
				'tab'     => 'thumb'
			);

			$settings[] = array(
					'id'      => 'use_original_thumbs',
					'title'   => __( 'Use Original Thumbnails', 'foogallery' ),
					'desc'    => __( 'Allow for the original thumbnails to be used when possible. This can be useful if your thumbs are animated gifs.
PLEASE NOTE : this will only work if your gallery thumbnail sizes are identical to your thumbnail sizes under Settings -> Media.', 'foogallery' ),
					'type'    => 'checkbox',
					'tab'     => 'thumb'
			);

			$settings[] = array(
				'id'      => 'thumb_resize_animations',
				'title'   => __( 'Resize Animated GIFs', 'foogallery' ),
				'desc'    => __( 'Should animated gifs be resized or not. If enabled, only the first frame is used in the resize.', 'foogallery' ),
				'type'    => 'checkbox',
				'tab'     => 'thumb'
			);

			$settings[] = array(
				'id'      => 'animated_gif_use_original_image',
				'title'   => __( 'Show Animated Thumbnails', 'foogallery' ),
				'desc'    => __( 'If animated GIFs are used, then show the original GIF as the thumbnail.', 'foogallery' ),
				'type'    => 'checkbox',
				'tab'     => 'thumb'
			);

			$settings[] = array(
				'id'      => 'thumb_generation_test',
				'title'   => __( 'Thumbnail Generation Test', 'foogallery' ),
				'desc'    => sprintf( __( 'Test to see if %s can generate the thumbnails it needs.', 'foogallery' ), foogallery_plugin_name() ),
				'type'    => 'thumb_generation_test',
				'tab'     => 'thumb'
			);

			//endregion Thumbnail Tab

//	        //region Advanced Tab
//	        $tabs['advanced'] = __( 'Advanced', 'foogallery' );
//
//	        $example_url = '' . trailingslashit( site_url() ) . foogallery_permalink() . '/my-cool-gallery';
//
//	        $settings[] = array(
//		        'id'      => 'gallery_permalinks_enabled',
//		        'title'   => __( 'Enable Friendly URL\'s', 'foogallery' ),
//		        'desc'    => sprintf( __( 'If enabled, you will be able to access your galleries from a friendly URL e.g. %s', 'foogallery' ), $example_url ),
//		        'default' => foogallery_get_default( 'gallery_permalinks_enabled' ),
//		        'type'    => 'checkbox',
//		        'tab'     => 'advanced',
//	        );
//
//	        $settings[] = array(
//		        'id'      => 'gallery_permalink',
//		        'title'   => __( 'Gallery Permalink', 'foogallery' ),
//		        'desc'    => __( 'If friendly URL\'s are enabled, this is used in building up a friendly URL', 'foogallery' ),
//		        'default' => foogallery_get_default( 'gallery_permalink' ),
//		        'type'    => 'text',
//		        'tab'     => 'advanced',
//	        );
//	        //endregion Advanced

			//region Language Tab
			$tabs['language'] = __( 'Language', 'foogallery' );

			$settings[] = array(
				'id'      => 'language_images_count_none_text',
				'title'   => __( 'Image Count None Text', 'foogallery' ),
				'type'    => 'text',
				'default' => __( 'No images', 'foogallery' ),
				'tab'     => 'language'
			);

			$settings[] = array(
				'id'      => 'language_images_count_single_text',
				'title'   => __( 'Image Count Single Text', 'foogallery' ),
				'type'    => 'text',
				'default' => __( '1 image', 'foogallery' ),
				'tab'     => 'language'
			);

			$settings[] = array(
				'id'      => 'language_images_count_plural_text',
				'title'   => __( 'Image Count Many Text', 'foogallery' ),
				'type'    => 'text',
				'default' => __( '%s images', 'foogallery' ),
				'tab'     => 'language'
			);
			//endregion Language Tab

			//region Uninstall Tab
			$tabs['uninstall'] = __( 'Uninstall', 'foogallery' );

			$settings[] = array(
				'id'      => 'uninstall',
				'title'   => __( 'Full Uninstall', 'foogallery' ),
				'desc'    => sprintf( __( 'Run a full uninstall of %s, which includes removing all galleries, settings and metadata. This basically removes all traces of the plugin from your system. Please be careful - there is no undo!', 'foogallery' ), foogallery_plugin_name() ),
				'type'    => 'uninstall',
				'tab'     => 'uninstall'
			);

			//endregion Uninstall Tab

			return apply_filters( 'foogallery_admin_settings_override', array(
				'tabs'     => $tabs,
				'sections' => array(),
				'settings' => $settings,
			) );
		}

		/**
		 * Render any custom setting types to the settings page
		 */
		function render_custom_setting_types( $args ) {
			if ( 'clear_optimization_button' === $args['type'] ) { ?>

					<input type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'foogallery_clear_css_optimizations' ) ); ?>" class="button-primary foogallery_clear_css_optimizations" value="<?php _e( 'Clear CSS Optimization Cache', 'foogallery' ); ?>">

			<?php } else if ( 'uninstall' === $args['type'] ) { ?>

					<input type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'foogallery_uninstall' ) ); ?>" class="button-primary foogallery_uninstall" value="<?php _e( 'Run Full Uninstall', 'foogallery' ); ?>">

			<?php } else if ( 'thumb_generation_test' === $args['type'] ) { ?>

					<input type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'foogallery_thumb_generation_test' ) ); ?>" class="button-primary foogallery_thumb_generation_test" value="<?php _e( 'Run Tests', 'foogallery' ); ?>">

			<?php }
		}

		function after_render_setting( $args ) {
			if ( 'default_retina_support' === $args['id'] ) {

				//build up a list of retina options and add them to a hidden input
				// so we can get the values on the client
				$input_ids = array();
				$count = 0;
				foreach( foogallery_retina_options() as $retina_option ) {
					$input_ids[] = '#default_retina_support' . $count;
					$count++;
				}
				$nonce = wp_create_nonce( 'foogallery_apply_retina_defaults' );
				?>

					<input type="button" data-inputs="<?php echo implode( ',', $input_ids ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>" class="button-primary foogallery_apply_retina_support" value="<?php _e( 'Apply Defaults to all Galleries', 'foogallery' ); ?>">

			<?php }
		}

		/**
		 * AJAX endpoint for clearing all CSS optimizations
		 */
		function ajax_clear_css_optimizations() {
			if ( check_admin_referer( 'foogallery_clear_css_optimizations' ) ) {
				foogallery_clear_all_css_load_optimizations();

				_e('The CSS optimization cache was successfully cleared!', 'foogallery' );
				die();
			}
		}

		/**
		 * AJAX endpoint for testing thumbnail generation using WPThumb
		 */
		function ajax_thumb_generation_test() {
			if ( check_admin_referer( 'foogallery_thumb_generation_test' ) ) {
				foogallery_output_thumbnail_generation_results();
				die();
			}
		}

		/**
		 * AJAX endpoint for applying the retina defaults to all galleries
		 */
		function ajax_apply_retina_defaults() {
			if ( check_admin_referer( 'foogallery_apply_retina_defaults' ) ) {

				$defaults = $_POST['defaults'];

				//extract the settings using a regex
				$regex = '/foogallery\[default_retina_support\|(?<setting>.+?)\]/';

				preg_match_all($regex, $defaults, $matches);

				$gallery_retina_settings = array();

				if ( isset( $matches[1] ) ) {
					foreach ( $matches[1] as $match ) {
						$gallery_retina_settings[$match] = "true";
					}
				}

				//go through all galleries and update the retina settings
				$galleries = foogallery_get_all_galleries();
				$gallery_update_count = 0;
				foreach ( $galleries as $gallery ) {
					update_post_meta( $gallery->ID, FOOGALLERY_META_RETINA, $gallery_retina_settings );
					$gallery_update_count++;
				}

				echo sprintf( _n(
					'1 gallery successfully updated to use the default retina settings.',
					'%s galleries successfully updated to use the default retina settings.',
					$gallery_update_count, 'foogallery' ), $gallery_update_count );

				die();
			}
		}

		function ajax_uninstall() {
			if ( check_admin_referer( 'foogallery_uninstall' ) && current_user_can( 'install_plugins' ) ) {
				foogallery_uninstall();

				_e('All traces of the plugin were removed from your system!', 'foogallery' );
				die();
			}
		}
	}
}


text:
"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var innerSubscribe_1 = require("../innerSubscribe");
function takeUntil(notifier) {
    return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
}
exports.takeUntil = takeUntil;
var TakeUntilOperator = (function () {
    function TakeUntilOperator(notifier) {
        this.notifier = notifier;
    }
    TakeUntilOperator.prototype.call = function (subscriber, source) {
        var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
        var notifierSubscription = innerSubscribe_1.innerSubscribe(this.notifier, new innerSubscribe_1.SimpleInnerSubscriber(takeUntilSubscriber));
        if (notifierSubscription && !takeUntilSubscriber.seenValue) {
            takeUntilSubscriber.add(notifierSubscription);
            return source.subscribe(takeUntilSubscriber);
        }
        return takeUntilSubscriber;
    };
    return TakeUntilOperator;
}());
var TakeUntilSubscriber = (function (_super) {
    __extends(TakeUntilSubscriber, _super);
    function TakeUntilSubscriber(destination) {
        var _this = _super.call(this, destination) || this;
        _this.seenValue = false;
        return _this;
    }
    TakeUntilSubscriber.prototype.notifyNext = function () {
        this.seenValue = true;
        this.complete();
    };
    TakeUntilSubscriber.prototype.notifyComplete = function () {
    };
    return TakeUntilSubscriber;
}(innerSubscribe_1.SimpleOuterSubscriber));
//# sourceMappingURL=takeUntil.js.map

redpajama_set_name: RedPajamaGithub


text:
var path = require('path');
var fs = require('fs');

'use strict';

module.exports = {
  User: User
}

/**
 * Manages user settings and storage locations.
 */

// global cached config
var config;

// optional custom storage path
var customStoragePath;

function User() {
}

User.config = function() {
  return config || (config = Config.load(User.configPath()));
}

User.storagePath = function() {
  if (customStoragePath) return customStoragePath;
  var home = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
  return path.join(home, ".homebridge");
}

User.configPath = function() {
  return path.join(User.storagePath(), "config.json");
}

User.persistPath = function() {
  return path.join(User.storagePath(), "persist");
}

User.setStoragePath = function(path) {
  customStoragePath = path;
}


text:
package coffee.cypher.skills.event;

import coffee.cypher.skills.ResearchMap;
import coffee.cypher.skills.Skills;

public class MapChangedEvent extends SkillsEvent {
    private final ResearchMap map;
    private final String name;

    public MapChangedEvent(String name) {
        if (Skills.mapExists(name)) {
            map = Skills.getResearchMap(name);
        } else {
            map = null;
        }

        this.name = name;
    }

    public ResearchMap getMap() {
        return map;
    }

    public String getName() {
        return name;
    }
}


text:
<?php

namespace Sonata\PageBundle\Controller;

use Sonata\AdminBundle\Controller\CRUDController as Controller;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

/**
 * Site Admin controller
 *
 * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
 */
class SiteAdminController extends Controller
{
    /**
     * @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
     *
     * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
     * @throws \Symfony\Component\Security\Core\Exception\AccessDeniedException
     */
    public function snapshotsAction()
    {
        if (false === $this->admin->isGranted('EDIT')) {
            throw new AccessDeniedException();
        }

        $id = $this->get('request')->get($this->admin->getIdParameter());

        $object = $this->admin->getObject($id);

        if (!$object) {
            throw new NotFoundHttpException(sprintf('unable to find the object with id : %s', $id));
        }

        $this->admin->setSubject($object);

        if ($this->get('request')->getMethod() == "POST") {

            $this->get('sonata.notification.backend')
                ->createAndPublish('sonata.page.create_snapshots', array(
                    'siteId' => $object->getId(),
                    'mode'   => 'async'
                ));

            $this->addFlash('sonata_flash_success', $this->admin->trans('flash_snapshots_created_success'));

            return new RedirectResponse($this->admin->generateUrl('edit', array('id' => $object->getId())));
        }

        return $this->render('SonataPageBundle:SiteAdmin:create_snapshots.html.twig', array(
            'action'  => 'snapshots',
            'object'  => $object
        ));
    }
}


text:
var transcript = '';
var recognizing = false;
var micLoc = 'static/image/';
if (!('webkitSpeechRecognition' in window)) {
    upgrade();
} else {
    var recognition = new webkitSpeechRecognition();
    recognition.continuous = false;
    recognition.interimResults = true;

    recognition.onstart = function() {
        recognizing = true;
        document.getElementById('startImg').src = micLoc + 'microphone_off.png';
    };

    recognition.onerror = function(event) {
        //TODO: Handle errors
    };

    recognition.onend = function() {
        recognizing = false;
        document.getElementById('startImg').src = micLoc + 'microphone.png';
            if (!transcript) {
                return;
            }
    };

    recognition.onresult = function(event) {
        if (typeof(event.results) == 'undefined') {
            recognition.onend = null;
            recognition.stop();
            upgrade();
            return;
        }
        transcript = '';
        for (var i = event.resultIndex; i < event.results.length; ++i) {
            transcript += event.results[i][0].transcript;
        }
        transcript = capitalize(transcript);
        document.getElementById('trans').value = linebreak(transcript);
    };
}

function upgrade() {
    startButton.style.visibility = 'hidden';
}

var twoLine = /\n\n/g;
var oneLine = /\n/g;
function linebreak(s) {
    return s.replace(twoLine, '

').replace(oneLine, '
');
}

var firstChar = /\S/;
function capitalize(s) {
    return s.replace(firstChar, function(m) { return m.toUpperCase(); });
}

function startButtonFunc() {
    if (recognizing) {
        recognition.stop();
        return;
    }
    transcript = '';
    recognition.lang = 'en-US';
    recognition.start();
    document.getElementById('trans').value = '';
    document.getElementById('startImg').src = micLoc + 'microphone.png';
}


text:
require 'bindata'

# A custom type representing an IP address.
# The underlying binary representation is a sequence of four octets.
# The human accessible representation is a dotted quad.
class IPAddr < BinData::Primitive
  array :octets, type: :uint8, initial_length: 4

  def set(val)
    self.octets = val.split(/\./).map(&:to_i)
  end

  def get
    self.octets.map(&:to_s).join(".")
  end
end

ip = IPAddr.new("127.0.0.1")

puts "human readable value:  #{ip}"                     #=> 127.0.0.1
puts "binary representation: #{ip.to_binary_s.inspect}" #=> "\177\000\000\001"


text:
my_dir="$(dirname "$0")"

"$my_dir/generate.sh"

push_website(){
  echo
  echo "Pushing website..."
  repo_dir=$PWD
  cd /tmp
  repo=$(basename $repo_dir)
  git clone $repo_dir $repo 2>/dev/null
  cd $repo
  git remote set-url origin $(cd $repo_dir; git config remote.origin.url)
  git pull
  git checkout gh-pages 2>/dev/null || git checkout -b gh-pages origin/gh-pages
  git rm -rf *
  cp -r $repo_dir/output-site/* ./
  rm ./README.md
  git add *
  git commit -m "Build on $(date) of $(cd $repo_dir; git rev-parse --short HEAD)."
  git push origin gh-pages:gh-pages
  echo "Pushing website... [ok]"
}

push_website


text:
#ifndef RTTR_TYPE_IMPL_H_
#define RTTR_TYPE_IMPL_H_

#include <type_traits>
#include "rttr/detail/misc/misc_type_traits.h"
#include "rttr/detail/misc/function_traits.h"
#include "rttr/detail/type/base_classes.h"
#include "rttr/detail/type/get_derived_info_func.h"
#include "rttr/detail/type/get_create_variant_func.h"
#include "rttr/detail/type/type_register.h"
#include "rttr/detail/misc/utility.h"
#include "rttr/wrapper_mapper.h"
#include "rttr/detail/type/type_comparator.h"
#include "rttr/detail/type/type_data.h"
#include "rttr/detail/type/type_name.h"
#include "rttr/detail/registration/registration_manager.h"
#include "rttr/detail/misc/register_wrapper_mapper_conversion.h"

namespace rttr
{

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type::type(detail::type_data* data) RTTR_NOEXCEPT
:  m_type_data(data)
{
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type::type(const type& other) RTTR_NOEXCEPT
:   m_type_data(other.m_type_data)
{
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type& type::operator=(const type& other) RTTR_NOEXCEPT
{
    m_type_data = other.m_type_data;
    return *this;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::operator<(const type& other) const RTTR_NOEXCEPT
{
    return (m_type_data < other.m_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::operator>(const type& other) const RTTR_NOEXCEPT
{
    return (m_type_data > other.m_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::operator>=(const type& other) const RTTR_NOEXCEPT
{
    return (m_type_data >= other.m_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::operator<=(const type& other) const RTTR_NOEXCEPT
{
    return (m_type_data <= other.m_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::operator==(const type& other) const RTTR_NOEXCEPT
{
    return (m_type_data == other.m_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::operator!=(const type& other) const RTTR_NOEXCEPT
{
    return (m_type_data != other.m_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type::type_id type::get_id() const RTTR_NOEXCEPT
{
    return reinterpret_cast<type::type_id>(m_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_valid() const RTTR_NOEXCEPT
{
    return m_type_data->is_valid;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type::operator bool() const RTTR_NOEXCEPT
{
    return m_type_data->is_valid;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type type::get_raw_type() const RTTR_NOEXCEPT
{
    return type(m_type_data->raw_type_data);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type type::get_wrapped_type() const RTTR_NOEXCEPT
{
    return type(m_type_data->wrapped_type);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type type::get_raw_array_type() const RTTR_NOEXCEPT
{
    return type(m_type_data->array_raw_type);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE string_view type::get_name() const RTTR_NOEXCEPT
{
    return m_type_data->name;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE string_view type::get_full_name() const RTTR_NOEXCEPT
{
    return m_type_data->type_name;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE std::size_t type::get_sizeof() const RTTR_NOEXCEPT
{
    return m_type_data->get_sizeof;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE std::size_t type::get_pointer_dimension() const RTTR_NOEXCEPT
{
    return m_type_data->get_pointer_dimension;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_class() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_class);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_template_instantiation() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_template_instantiation);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_enumeration() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_enum);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_array() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_array);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_associative_container() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_associative_container);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_sequential_container() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_sequential_container);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_pointer() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_pointer);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_arithmetic() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_arithmetic);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_function_pointer() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_function_pointer);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_member_object_pointer() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_member_object_pointer);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_member_function_pointer() const RTTR_NOEXCEPT
{
    return m_type_data->type_trait_value(detail::type_trait_infos::is_member_function_pointer);
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE bool type::is_wrapper() const RTTR_NOEXCEPT
{
    return m_type_data->wrapped_type->is_valid;
}

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE variant type::create_variant(const argument& data) const
{
    return m_type_data->create_variant(data);
}

/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////

namespace detail
{

RTTR_INLINE static type get_invalid_type() RTTR_NOEXCEPT { return create_type(nullptr); }

/////////////////////////////////////////////////////////////////////////////////////////

RTTR_INLINE type create_type(type_data* data) RTTR_NOEXCEPT
{
    return data ? type(data) : type();
}

/////////////////////////////////////////////////////////////////////////////////
template<typename T>
using is_complete_type = std::integral_constant<bool, !std::is_function<T>::value && !std::is_same<T, void>::value>;

template<typename T>
RTTR_LOCAL RTTR_INLINE enable_if_t<is_complete_type<T>::value, type>
create_or_get_type() RTTR_NOEXCEPT
{
    // when you get an error here, then the type was not completely defined
    // (a forward declaration is not enough because base_classes will not be found)
    using type_must_be_complete = char[ sizeof(T) ? 1: -1 ];
    (void) sizeof(type_must_be_complete);
    static const type val = create_type(get_registration_manager().add_item(make_type_data<T>()));
    return val;
}

/////////////////////////////////////////////////////////////////////////////////

template<typename T>
RTTR_LOCAL RTTR_INLINE enable_if_t<!is_complete_type<T>::value, type>
create_or_get_type() RTTR_NOEXCEPT
{
    static const type val = create_type(get_registration_manager().add_item(make_type_data<T>()));
    return val;
}

/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////

template<typename T>
RTTR_LOCAL RTTR_INLINE type get_type_from_instance(const T*) RTTR_NOEXCEPT
{
    return detail::create_or_get_type<T>();
}

/////////////////////////////////////////////////////////////////////////////////

template<typename T, bool>
struct type_from_instance;

//! Specialization for retrieving the type from the instance directly
template<typename T>
struct type_from_instance<T, false> // the typeInfo function is not available
{
    static RTTR_INLINE type get(T&&) RTTR_NOEXCEPT
    {
        using non_ref_type = typename std::remove_cv<typename std::remove_reference<T>::type>::type;
        return create_or_get_type<non_ref_type>();
    }
};

/////////////////////////////////////////////////////////////////////////////////////////

//! Specialization for retrieving the type from the instance directly
template<typename T>
struct type_from_instance<T, true>
{
    static RTTR_INLINE type get(T&& object) RTTR_NOEXCEPT
    {
        return object.get_type();
    }
};

/////////////////////////////////////////////////////////////////////////////////////////

template<typename TargetType, typename SourceType, typename F>
struct type_converter;

} // end namespace detail

/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
RTTR_INLINE type type::get() RTTR_NOEXCEPT
{
    using non_ref_type = typename std::remove_cv<typename std::remove_reference<T>::type>::type;
    return detail::create_or_get_type<non_ref_type>();
}

/////////////////////////////////////////////////////////////////////////////////////////

template<>
RTTR_INLINE type type::get<detail::invalid_type>() RTTR_NOEXCEPT
{
    return detail::get_invalid_type();
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
RTTR_INLINE type type::get(T&& object) RTTR_NOEXCEPT
{
    using remove_ref = typename std::remove_reference<T>::type;
    return detail::type_from_instance<T, detail::has_get_type_func<T>::value && !std::is_pointer<remove_ref>::value>::get(std::forward<T>(object));
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
RTTR_INLINE bool type::is_derived_from() const RTTR_NOEXCEPT
{
    return is_derived_from(type::get<T>());
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
RTTR_INLINE bool type::is_base_of() const RTTR_NOEXCEPT
{
    return is_base_of(type::get<T>());
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename F>
RTTR_INLINE void type::register_converter_func(F func)
{
    using namespace detail;

    using target_type_orig = typename function_traits<F>::return_type;
    using target_type = remove_cv_t<remove_reference_t<target_type_orig>>;

    const std::size_t arg_count = function_traits<F>::arg_count;

    static_assert(arg_count == 2, "Invalid argument count! The converter function signature must be: <target_type(source_type, bool&)>");
    static_assert(!std::is_same<void, target_type>::value, "Return type cannot be void!");
    static_assert(std::is_same<bool&, typename param_types<F, 1>::type>::value, "Second argument type must be a bool reference(bool&).");

    using source_type_orig = param_types_t<F, 0>;
    using source_type = remove_cv_t<remove_reference_t<source_type_orig>>;

    get_registration_manager().add_item(::rttr::detail::make_unique<type_converter<target_type, source_type, F>>(func));
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
RTTR_INLINE void type::register_wrapper_converter_for_base_classes()
{
    detail::reg_wrapper_converter_for_base_classes<T>();
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
void type::register_comparators()
{
    register_equal_comparator<T>();
    register_less_than_comparator<T>();
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
void type::register_equal_comparator()
{
    static_assert(detail::has_equal_operator<T>::value, "No equal operator for given type found.");

    detail::get_registration_manager().add_equal_cmp(::rttr::detail::make_unique<detail::type_equal_comparator<T>>());
}

/////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
void type::register_less_than_comparator()
{
    static_assert(detail::has_less_than_operator<T>::value, "No less-than operator for given type found.");

    detail::get_registration_manager().add_less_than_cmp(::rttr::detail::make_unique<detail::type_less_than_comparator<T>>());
}

/////////////////////////////////////////////////////////////////////////////////////////

} // end namespace rttr

namespace std
{
    template <>
    struct hash<rttr::type>
    {
    public:
        size_t operator()(const rttr::type& info) const
        {
            return hash<rttr::type::type_id>()(info.get_id());
        }
    };
} // end namespace std

#define RTTR_CAT_IMPL(a, b) a##b
#define RTTR_CAT(a, b) RTTR_CAT_IMPL(a, b)

#define RTTR_REGISTRATION_STANDARD_TYPE_VARIANTS(T) rttr::type::get<T>();       \
                                                    rttr::type::get<T*>();      \
                                                    rttr::type::get<const T*>();
#endif // RTTR_TYPE_IMPL_H_


text:
package terminal

import (
	"fmt"
	"io"
	"io/ioutil"
)

type TeePrinter struct {
	disableTerminalOutput bool
	outputBucket          io.Writer
}

func NewTeePrinter() *TeePrinter {
	return &TeePrinter{
		outputBucket: ioutil.Discard,
	}
}

func (t *TeePrinter) SetOutputBucket(bucket io.Writer) {
	if bucket == nil {
		bucket = ioutil.Discard
	}

	t.outputBucket = bucket
}

func (t *TeePrinter) Print(values ...interface{}) (n int, err error) {
	str := fmt.Sprint(values...)
	t.saveOutputToBucket(str)
	if !t.disableTerminalOutput {
		return fmt.Print(str)
	}
	return
}

func (t *TeePrinter) Printf(format string, a ...interface{}) (n int, err error) {
	str := fmt.Sprintf(format, a...)
	t.saveOutputToBucket(str)
	if !t.disableTerminalOutput {
		return fmt.Print(str)
	}
	return
}

func (t *TeePrinter) Println(values ...interface{}) (n int, err error) {
	str := fmt.Sprint(values...)
	t.saveOutputToBucket(str)
	if !t.disableTerminalOutput {
		return fmt.Println(str)
	}
	return
}

func (t *TeePrinter) DisableTerminalOutput(disable bool) {
	t.disableTerminalOutput = disable
}

func (t *TeePrinter) saveOutputToBucket(output string) {
	t.outputBucket.Write([]byte(Decolorize(output)))
}


text:
"""
This module provides classes for the Restaurant project.
"""

#pylint: disable=relative-import,no-init,too-few-public-methods

from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.orm import relationship

from database_utils import BASE

class Restaurant(BASE):
    """A class to store restaurant information."""

    __tablename__ = 'restaurant'
    name = Column(String(80), nullable=False)
    restaurant_id = Column(Integer, primary_key=True)

    @property
    def serialize(self):
        """Method to return serialized JSON object of class data."""

        return {
            'name': self.name,
            'restaurant_id': self.restaurant_id
        }

class MenuItem(BASE):
    """A class to store information for a menu item."""

    __tablename__ = 'menu_item'
    name = Column(String(80), nullable=False)
    menu_item_id = Column(Integer, primary_key=True)
    course = Column(String(250), nullable=False)
    description = Column(String(250), nullable=False)
    price = Column(String(8), nullable=False)
    restaurant_id = Column(Integer, ForeignKey('restaurant.restaurant_id'))
    restaurant = relationship(Restaurant)

    @property
    def serialize(self):
        """Method to return serialized JSON object of class data."""

        return {
            'name': self.name,
            'menu_item_id': self.menu_item_id,
            'description': self.description,
            'price': self.price,
            'course': self.course
        }


text:
minetest.register_craft({
	output = 'default:wood 4',
	recipe = {
		{'default:tree'},
	}
})

minetest.register_craft({
	output = 'default:junglewood 4',
	recipe = {
		{'default:jungletree'},
	}
})

minetest.register_craft({
	output = 'default:pine_wood 4',
	recipe = {
		{'default:pine_tree'},
	}
})

minetest.register_craft({
	output = 'default:acacia_wood 4',
	recipe = {
		{'default:acacia_tree'},
	}
})

minetest.register_craft({
	output = 'default:stick 4',
	recipe = {
		{'group:wood'},
	}
})

minetest.register_craft({
	output = 'default:fence_wood 2',
	recipe = {
		{'group:stick', 'group:stick', 'group:stick'},
		{'group:stick', 'group:stick', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:sign_wall',
	recipe = {
		{'group:wood', 'group:wood', 'group:wood'},
		{'group:wood', 'group:wood', 'group:wood'},
		{'', 'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:torch 4',
	recipe = {
		{'default:coal_lump'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:pick_wood',
	recipe = {
		{'group:wood', 'group:wood', 'group:wood'},
		{'', 'group:stick', ''},
		{'', 'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:pick_stone',
	recipe = {
		{'group:stone', 'group:stone', 'group:stone'},
		{'', 'group:stick', ''},
		{'', 'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:pick_steel',
	recipe = {
		{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
		{'', 'group:stick', ''},
		{'', 'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:pick_bronze',
	recipe = {
		{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
		{'', 'group:stick', ''},
		{'', 'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:pick_mese',
	recipe = {
		{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
		{'', 'group:stick', ''},
		{'', 'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:pick_diamond',
	recipe = {
		{'default:diamond', 'default:diamond', 'default:diamond'},
		{'', 'group:stick', ''},
		{'', 'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:shovel_wood',
	recipe = {
		{'group:wood'},
		{'group:stick'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:shovel_stone',
	recipe = {
		{'group:stone'},
		{'group:stick'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:shovel_steel',
	recipe = {
		{'default:steel_ingot'},
		{'group:stick'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:shovel_bronze',
	recipe = {
		{'default:bronze_ingot'},
		{'group:stick'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:shovel_mese',
	recipe = {
		{'default:mese_crystal'},
		{'group:stick'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:shovel_diamond',
	recipe = {
		{'default:diamond'},
		{'group:stick'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:axe_wood',
	recipe = {
		{'group:wood', 'group:wood'},
		{'group:wood', 'group:stick'},
		{'', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:axe_stone',
	recipe = {
		{'group:stone', 'group:stone'},
		{'group:stone', 'group:stick'},
		{'', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:axe_steel',
	recipe = {
		{'default:steel_ingot', 'default:steel_ingot'},
		{'default:steel_ingot', 'group:stick'},
		{'', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:axe_bronze',
	recipe = {
		{'default:bronze_ingot', 'default:bronze_ingot'},
		{'default:bronze_ingot', 'group:stick'},
		{'', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:axe_mese',
	recipe = {
		{'default:mese_crystal', 'default:mese_crystal'},
		{'default:mese_crystal', 'group:stick'},
		{'', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:axe_diamond',
	recipe = {
		{'default:diamond', 'default:diamond'},
		{'default:diamond', 'group:stick'},
		{'', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:axe_wood',
	recipe = {
		{'group:wood', 'group:wood'},
		{'group:stick', 'group:wood'},
		{'group:stick',''},
	}
})

minetest.register_craft({
	output = 'default:axe_stone',
	recipe = {
		{'group:stone', 'group:stone'},
		{'group:stick', 'group:stone'},
		{'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:axe_steel',
	recipe = {
		{'default:steel_ingot', 'default:steel_ingot'},
		{'group:stick', 'default:steel_ingot'},
		{'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:axe_bronze',
	recipe = {
		{'default:bronze_ingot', 'default:bronze_ingot'},
		{'group:stick', 'default:bronze_ingot'},
		{'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:axe_mese',
	recipe = {
		{'default:mese_crystal', 'default:mese_crystal'},
		{'group:stick', 'default:mese_crystal'},
		{'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:axe_diamond',
	recipe = {
		{'default:diamond', 'default:diamond'},
		{'group:stick', 'default:diamond'},
		{'group:stick', ''},
	}
})

minetest.register_craft({
	output = 'default:sword_wood',
	recipe = {
		{'group:wood'},
		{'group:wood'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:sword_stone',
	recipe = {
		{'group:stone'},
		{'group:stone'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:sword_steel',
	recipe = {
		{'default:steel_ingot'},
		{'default:steel_ingot'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:sword_bronze',
	recipe = {
		{'default:bronze_ingot'},
		{'default:bronze_ingot'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:sword_mese',
	recipe = {
		{'default:mese_crystal'},
		{'default:mese_crystal'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:sword_diamond',
	recipe = {
		{'default:diamond'},
		{'default:diamond'},
		{'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:rail 24',
	recipe = {
		{'default:steel_ingot', '', 'default:steel_ingot'},
		{'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
		{'default:steel_ingot', '', 'default:steel_ingot'},
	}
})

minetest.register_craft({
	output = 'default:chest',
	recipe = {
		{'group:wood', 'group:wood', 'group:wood'},
		{'group:wood', '', 'group:wood'},
		{'group:wood', 'group:wood', 'group:wood'},
	}
})

minetest.register_craft({
	output = 'default:chest_locked',
	recipe = {
		{'group:wood', 'group:wood', 'group:wood'},
		{'group:wood', 'default:steel_ingot', 'group:wood'},
		{'group:wood', 'group:wood', 'group:wood'},
	}
})

minetest.register_craft({
	output = 'default:furnace',
	recipe = {
		{'group:stone', 'group:stone', 'group:stone'},
		{'group:stone', '', 'group:stone'},
		{'group:stone', 'group:stone', 'group:stone'},
	}
})

minetest.register_craft({
	type = "shapeless",
	output = "default:bronze_ingot",
	recipe = {"default:steel_ingot", "default:copper_ingot"},
})

minetest.register_craft({
	output = 'default:coalblock',
	recipe = {
		{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
		{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
		{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
	}
})

minetest.register_craft({
	output = 'default:coal_lump 9',
	recipe = {
		{'default:coalblock'},
	}
})

minetest.register_craft({
	output = 'default:steelblock',
	recipe = {
		{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
		{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
		{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
	}
})

minetest.register_craft({
	output = 'default:steel_ingot 9',
	recipe = {
		{'default:steelblock'},
	}
})

minetest.register_craft({
	output = 'default:copperblock',
	recipe = {
		{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
		{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
		{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
	}
})

minetest.register_craft({
	output = 'default:copper_ingot 9',
	recipe = {
		{'default:copperblock'},
	}
})

minetest.register_craft({
	output = 'default:bronzeblock',
	recipe = {
		{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
		{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
		{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
	}
})

minetest.register_craft({
	output = 'default:bronze_ingot 9',
	recipe = {
		{'default:bronzeblock'},
	}
})

minetest.register_craft({
	output = 'default:goldblock',
	recipe = {
		{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
		{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
		{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
	}
})

minetest.register_craft({
	output = 'default:gold_ingot 9',
	recipe = {
		{'default:goldblock'},
	}
})

minetest.register_craft({
	output = 'default:diamondblock',
	recipe = {
		{'default:diamond', 'default:diamond', 'default:diamond'},
		{'default:diamond', 'default:diamond', 'default:diamond'},
		{'default:diamond', 'default:diamond', 'default:diamond'},
	}
})

minetest.register_craft({
	output = 'default:diamond 9',
	recipe = {
		{'default:diamondblock'},
	}
})

minetest.register_craft({
	output = 'default:sandstone',
	recipe = {
		{'group:sand', 'group:sand'},
		{'group:sand', 'group:sand'},
	}
})

minetest.register_craft({
	output = 'default:sand 4',
	recipe = {
		{'default:sandstone'},
	}
})

minetest.register_craft({
	output = 'default:sandstonebrick 4',
	recipe = {
		{'default:sandstone', 'default:sandstone'},
		{'default:sandstone', 'default:sandstone'},
	}
})

minetest.register_craft({
	output = 'default:clay',
	recipe = {
		{'default:clay_lump', 'default:clay_lump'},
		{'default:clay_lump', 'default:clay_lump'},
	}
})

minetest.register_craft({
	output = 'default:brick',
	recipe = {
		{'default:clay_brick', 'default:clay_brick'},
		{'default:clay_brick', 'default:clay_brick'},
	}
})

minetest.register_craft({
	output = 'default:clay_brick 4',
	recipe = {
		{'default:brick'},
	}
})

minetest.register_craft({
	output = 'default:paper',
	recipe = {
		{'default:papyrus', 'default:papyrus', 'default:papyrus'},
	}
})

minetest.register_craft({
	output = 'default:book',
	recipe = {
		{'default:paper'},
		{'default:paper'},
		{'default:paper'},
	}
})

minetest.register_craft({
	output = 'default:bookshelf',
	recipe = {
		{'group:wood', 'group:wood', 'group:wood'},
		{'default:book', 'default:book', 'default:book'},
		{'group:wood', 'group:wood', 'group:wood'},
	}
})

minetest.register_craft({
	output = 'default:ladder',
	recipe = {
		{'group:stick', '', 'group:stick'},
		{'group:stick', 'group:stick', 'group:stick'},
		{'group:stick', '', 'group:stick'},
	}
})

minetest.register_craft({
	output = 'default:mese',
	recipe = {
		{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
		{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
		{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
	}
})

minetest.register_craft({
	output = 'default:mese_crystal 9',
	recipe = {
		{'default:mese'},
	}
})

minetest.register_craft({
	output = 'default:mese_crystal_fragment 9',
	recipe = {
		{'default:mese_crystal'},
	}
})

minetest.register_craft({
	output = 'default:meselamp 1',
	recipe = {
		{'', 'default:mese_crystal',''},
		{'default:mese_crystal', 'default:glass', 'default:mese_crystal'},
	}
})

minetest.register_craft({
	output = 'default:obsidian_shard 9',
	recipe = {
		{'default:obsidian'}
	}
})

minetest.register_craft({
	output = 'default:obsidian',
	recipe = {
		{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
		{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
		{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
	}
})

minetest.register_craft({
	output = 'default:obsidianbrick 4',
	recipe = {
		{'default:obsidian', 'default:obsidian'},
		{'default:obsidian', 'default:obsidian'}
	}
})

minetest.register_craft({
	output = 'default:stonebrick 4',
	recipe = {
		{'default:stone', 'default:stone'},
		{'default:stone', 'default:stone'},
	}
})

minetest.register_craft({
	output = 'default:desert_stonebrick 4',
	recipe = {
		{'default:desert_stone', 'default:desert_stone'},
		{'default:desert_stone', 'default:desert_stone'},
	}
})

minetest.register_craft({
	output = 'default:snowblock',
	recipe = {
		{'default:snow', 'default:snow', 'default:snow'},
		{'default:snow', 'default:snow', 'default:snow'},
		{'default:snow', 'default:snow', 'default:snow'},
	}
})

minetest.register_craft({
	output = 'default:snow 9',
	recipe = {
		{'default:snowblock'},
	}
})

--
-- Crafting (tool repair)
--
minetest.register_craft({
	type = "toolrepair",
	additional_wear = -0.02,
})

--
-- Cooking recipes
--

minetest.register_craft({
	type = "cooking",
	output = "default:glass",
	recipe = "group:sand",
})

minetest.register_craft({
	type = "cooking",
	output = "default:obsidian_glass",
	recipe = "default:obsidian_shard",
})

minetest.register_craft({
	type = "cooking",
	output = "default:stone",
	recipe = "default:cobble",
})

minetest.register_craft({
	type = "cooking",
	output = "default:stone",
	recipe = "default:mossycobble",
})

minetest.register_craft({
	type = "cooking",
	output = "default:desert_stone",
	recipe = "default:desert_cobble",
})

minetest.register_craft({
	type = "cooking",
	output = "default:steel_ingot",
	recipe = "default:iron_lump",
})

minetest.register_craft({
	type = "cooking",
	output = "default:copper_ingot",
	recipe = "default:copper_lump",
})

minetest.register_craft({
	type = "cooking",
	output = "default:gold_ingot",
	recipe = "default:gold_lump",
})

minetest.register_craft({
	type = "cooking",
	output = "default:clay_brick",
	recipe = "default:clay_lump",
})

--
-- Fuels
--

minetest.register_craft({
	type = "fuel",
	recipe = "group:tree",
	burntime = 30,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:junglegrass",
	burntime = 2,
})

minetest.register_craft({
	type = "fuel",
	recipe = "group:leaves",
	burntime = 1,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:cactus",
	burntime = 15,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:papyrus",
	burntime = 1,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:bookshelf",
	burntime = 30,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:fence_wood",
	burntime = 15,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:ladder",
	burntime = 5,
})

minetest.register_craft({
	type = "fuel",
	recipe = "group:wood",
	burntime = 7,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:lava_source",
	burntime = 60,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:torch",
	burntime = 4,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:sign_wall",
	burntime = 10,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:chest",
	burntime = 30,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:chest_locked",
	burntime = 30,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:nyancat",
	burntime = 1,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:nyancat_rainbow",
	burntime = 1,
})

minetest.register_craft({
	type = "fuel",
	recipe = "group:sapling",
	burntime = 10,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:apple",
	burntime = 3,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:coal_lump",
	burntime = 40,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:coalblock",
	burntime = 370,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:grass_1",
	burntime = 2,
})

minetest.register_craft({
	type = "fuel",
	recipe = "default:dry_grass_1",
	burntime = 2,
})


text:
package org.javarosa.core.services.transport.payload;

import org.javarosa.core.util.externalizable.DeserializationException;
import org.javarosa.core.util.externalizable.ExtUtil;
import org.javarosa.core.util.externalizable.PrototypeFactory;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * A ByteArrayPayload is a simple payload consisting of a
 * byte array.
 *
 * @author Clayton Sims
 */
public class ByteArrayPayload implements IDataPayload {
    private byte[] payload;
    private String id;
    private int type;

    /**
     * Note: Only useful for serialization.
     */
    @SuppressWarnings("unused")
    public ByteArrayPayload() {
    }

    /**
     * @param payload The byte array for this payload.
     * @param id      An optional id identifying the payload
     * @param type    The type of data for this byte array
     */
    public ByteArrayPayload(byte[] payload, String id, int type) {
        this.payload = payload;
        this.id = id;
        this.type = type;
    }

    /**
     * @param payload The byte array for this payload.
     */
    public ByteArrayPayload(byte[] payload) {
        this.payload = payload;
        this.id = null;
        this.type = IDataPayload.PAYLOAD_TYPE_XML;
    }

    @Override
    public InputStream getPayloadStream() {

        return new ByteArrayInputStream(payload);
    }

    @Override
    public void readExternal(DataInputStream in, PrototypeFactory pf)
            throws IOException, DeserializationException {
        int length = in.readInt();
        if (length > 0) {
            this.payload = new byte[length];
            in.read(this.payload);
        }
        id = ExtUtil.nullIfEmpty(ExtUtil.readString(in));
    }

    @Override
    public void writeExternal(DataOutputStream out) throws IOException {
        out.writeInt(payload.length);
        if (payload.length > 0) {
            out.write(payload);
        }
        ExtUtil.writeString(out, ExtUtil.emptyIfNull(id));
    }

    @Override
    public Object accept(IDataPayloadVisitor visitor) {
        return visitor.visit(this);
    }

    @Override
    public String getPayloadId() {
        return id;
    }

    @Override
    public int getPayloadType() {
        return type;
    }

    @Override
    public long getLength() {
        return payload.length;
    }
}


text:
AlphaMail Node.js Client
================================
Use this library to connect your Node.js application to the AlphaMail system.
Start sending transactional e-mail today without the hassle of SMTP and large blocks of unmaintainable HTML.

AlphaMail supports templating (Comlang), DKIM-signatures and reliable delivery. Beside that, we got awesome statistics.

http://amail.io/

## How to start?

1) Install with NPM:

    $ npm install alphamail

2) Sign Up:

    http://amail.io/

3) Send your first mail!

    var alphamail = require('alphamail');
    var emailService = new alphamail.EmailService("API-TOKEN");

    var data = {
        id: "abc-123-456",
        name: "Some Guy",
        profile_url: "http://domain.com/profile/ABC-123-456/",
        recommended_profiles: [
            {
                id: "abc-222-333",
                name: "Jane Joe",
                profile_url: "http://domain.com/profile/ABC-222-333/",
                profile_image_url: "http://img.domain.com/profile/abc-222-333.jpg",
                age: 24
            }
        ]
    };

    var payload = new alphamail.EmailMessagePayload()
        .setProjectId(1235) // ID of your AlphaMail project
        .setSender(new alphamail.EmailContact("My Company", "your@domain.com"))
        .setReceiver(new alphamail.EmailContact("Some guy", "some@guy.com"))
        .setBodyObject(data);

    emailService.queue(payload, function(error, result){
        if(error){
            console.log(error);
            return;
        }
        console.log("Email sent! ID = " + result);
    });

## Usage

Include the module

    var alphamail = require('alphamail');

Initialize an email service with your token

    var emailService = new alphamail.EmailService(apiToken);

Where apiToken is your AlphaMail token. Don't have a token? Head to http://amail.io/ and signup for a free AlphaMail account.

Queue an email for sending

    emailService.queue(payload, callback);

Where payload is:

    var payload = new alphamail.EmailMessagePayload()
        .setProjectId(12345) // ID of your AlphaMail project
        .setSender(new alphamail.EmailContact("My Company", "your@domain.com"))
        .setReceiver(new alphamail.EmailContact("Some guy", "some@guy.com"))
        .setBodyObject({/*Data to use in email*/});

Where callback is:

    var callback = function(error, result){
        if(error){
            console.log(error);
        }else{
            console.log("Mail successfully sent! ID = " + result);
        }
    };

## Documentation

### EmailService

>Service used to queue and retrieve information about emails.

```var emailService = new alphamail.EmailService("MY-ALPHAMAIL-API-TOKEN");```

#### Constructor

alphamail.EmailService(string token)

>setting parameter 'token' is the same as calling emailService.setApiToken(token);

#### Methods

* EmailService setServiceUrl(string url)
>Set the base service url. Default when not called: 'http://api.amail.io/v2/'

* EmailService setApiToken(string token)
>Set the API token to authenticate with.

* EmailService queue(EmailMessagePayload payload[, function callback])
>Queue an email for sending.
```
    emailService.queue(payload, function(error, result){
        if(error){
            console.log(error);
        }else{
            console.log("Mail successfully sent! ID = " + result);
        }
    });
```

### EmailContact

>Entity that holds Sender/Receiver data such as name and email.

```var contact = new alphamail.EmailContact("Some Guy", "some@guy.com");```

#### Constructor

alphamail.EmailContact(string name, string email[, string id]);

>setting parameter 'name' is same as calling contact.setName(name);

>setting parameter 'email' is same as calling contact.setEmail(email);

>setting optional parameter 'id' is same as calling contact.setIdentity(id);

#### Methods

* string getName()
> Get the name of the contact.

* EmailContact setName(string name)
> Set the name of the contact. E.g. 'John Snow'

* string getEmail()
> Get the email of the contact.

* EmailContact setEmail(string email)
> Set the email of the contact. E.g. 'john.snow@nightswatch.gov'

* string getIdentity()
> Get the identity of the contact.

* EmailContact setIdentity(string id)
> Set the identity of the contact. Note! Currently only handled when setting a receiver contact.

### EmailMessagePayload

>Entity that holds data used when queueing a new email.

```var payload = new alphamail.EmailMessagePayload();```

#### Constructor

alphamail.EmailMessagePayload()

#### Methods

* integer getProjectId()
>Get the identity of the AlphaMail Project to send with.

* EmailMessagePayload setProjectId(integer projectId)
>Set the identity of the AlphaMail Project to send with.
```
    payload.setProjectId(12345);
```

* EmailContact getSender()
>Get the EmailContact to send with.

* EmailMessagePayload setSender(EmailContact sender)
>Set the EmailContact to send with. I.e. this should be your sender email/name.
```
    payload.setSender(
        new alphamail.EmailContact(
            "Your Company", // Name
            "you@domain.com" // Email
        )
    );
```

* string getReceiver()
>Get the EmailContact to send to.

* EmailMessagePayload setReceiver(EmailContact receiver)
>Set the EmailContact to send to. I.e. this should be the email/name that you want to send to.
```
    payload.setReceiver(
        new alphamail.EmailContact(
            "John Wayne", // Name
            "john@wayne.com", // Email
            "jwayne1979" // Optional identifier
        )
    );
```

* object getBodyObject()
>Get the payload data.

* EmailMessagePayload setBodyObject(object body)
>Set the payload data. This is the data that you'll use in AlphaMail to format your email.
```
    payload.setBodyObject({
        id: "abc-123-456",
        name: "Some Guy",
        profile_url: "http://domain.com/profile/ABC-123-456/",
        sso_url: "http://domain.com/login/ABC-123-456-789-000-FFF/"
    });
```

## Error Handling

All errors created by this module are instances of the JavaScript Error object.
When returned by a service, the error object is decorated with the property 'code'.
In callbacks, the error parameter is always the first parameter (as shown below).

```
function(error, result){
    if(error){
        console.log(error.name);
        console.log(error.message);
        console.log(error.code); // Only present in the context of a service
    }
}
```

## Debugging

### Logging

If you're interested in accessing verbose logs generated by this library you can override the method 'log' on alphamail.Logger.

```
alphamail.Logger.log = function(message){
    console.log(message);
};
```

## Frequently Asked Questions (FAQ)

### I'm having trouble with Unicode data

>This library has full Unicode support (UTF-8). If you're experiencing issues with Unicode, ensure that the data that you are passing is a UTF-8 encoded string and not a Buffer. You can do this by calling 'toString' as demonstrated below.

```
someVariable.toString("utf8");
```

### Can I use multiple recipients?

>Since the AlphaMail API is a "transactional only" API, support for multiple recipients is currently not available.

>But this feature is planned!

## Author & License

Robin Orheden (robin@amail.io)

    Copyright (C) 2013 Robin Orheden
    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?>
<root>
  <document>
    <sentences>
      <sentence id="1">
        <tokens>
          <token id="1">
            <word>The</word>
            <lemma>the</lemma>
            <CharacterOffsetBegin>0</CharacterOffsetBegin>
            <CharacterOffsetEnd>3</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="2">
            <word>new</word>
            <lemma>new</lemma>
            <CharacterOffsetBegin>4</CharacterOffsetBegin>
            <CharacterOffsetEnd>7</CharacterOffsetEnd>
            <POS>JJ</POS>
          </token>
          <token id="3">
            <word>gadget</word>
            <lemma>gadget</lemma>
            <CharacterOffsetBegin>8</CharacterOffsetBegin>
            <CharacterOffsetEnd>14</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="4">
            <word>would</word>
            <lemma>would</lemma>
            <CharacterOffsetBegin>15</CharacterOffsetBegin>
            <CharacterOffsetEnd>20</CharacterOffsetEnd>
            <POS>MD</POS>
          </token>
          <token id="5">
            <word>be</word>
            <lemma>be</lemma>
            <CharacterOffsetBegin>21</CharacterOffsetBegin>
            <CharacterOffsetEnd>23</CharacterOffsetEnd>
            <POS>VB</POS>
          </token>
          <token id="6">
            <word>served</word>
            <lemma>serve</lemma>
            <CharacterOffsetBegin>24</CharacterOffsetBegin>
            <CharacterOffsetEnd>30</CharacterOffsetEnd>
            <POS>VBN</POS>
          </token>
          <token id="7">
            <word>on</word>
            <lemma>on</lemma>
            <CharacterOffsetBegin>31</CharacterOffsetBegin>
            <CharacterOffsetEnd>33</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="8">
            <word>14</word>
            <lemma>14</lemma>
            <CharacterOffsetBegin>34</CharacterOffsetBegin>
            <CharacterOffsetEnd>36</CharacterOffsetEnd>
            <POS>CD</POS>
          </token>
          <token id="9">
            <word>routes</word>
            <lemma>route</lemma>
            <CharacterOffsetBegin>37</CharacterOffsetBegin>
            <CharacterOffsetEnd>43</CharacterOffsetEnd>
            <POS>NNS</POS>
          </token>
          <token id="10">
            <word>connecting</word>
            <lemma>connect</lemma>
            <CharacterOffsetBegin>44</CharacterOffsetBegin>
            <CharacterOffsetEnd>54</CharacterOffsetEnd>
            <POS>VBG</POS>
          </token>
          <token id="11">
            <word>Hawaii</word>
            <lemma>Hawaii</lemma>
            <CharacterOffsetBegin>55</CharacterOffsetBegin>
            <CharacterOffsetEnd>61</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
          <token id="12">
            <word>with</word>
            <lemma>with</lemma>
            <CharacterOffsetBegin>62</CharacterOffsetBegin>
            <CharacterOffsetEnd>66</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="13">
            <word>mainland</word>
            <lemma>mainland</lemma>
            <CharacterOffsetBegin>67</CharacterOffsetBegin>
            <CharacterOffsetEnd>75</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="14">
            <word>USA</word>
            <lemma>usa</lemma>
            <CharacterOffsetBegin>76</CharacterOffsetBegin>
            <CharacterOffsetEnd>79</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="15">
            <word>,</word>
            <lemma>,</lemma>
            <CharacterOffsetBegin>79</CharacterOffsetBegin>
            <CharacterOffsetEnd>80</CharacterOffsetEnd>
            <POS>,</POS>
          </token>
          <token id="16">
            <word>Asia</word>
            <lemma>Asia</lemma>
            <CharacterOffsetBegin>81</CharacterOffsetBegin>
            <CharacterOffsetEnd>85</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
          <token id="17">
            <word>,</word>
            <lemma>,</lemma>
            <CharacterOffsetBegin>85</CharacterOffsetBegin>
            <CharacterOffsetEnd>86</CharacterOffsetEnd>
            <POS>,</POS>
          </token>
          <token id="18">
            <word>and</word>
            <lemma>and</lemma>
            <CharacterOffsetBegin>87</CharacterOffsetBegin>
            <CharacterOffsetEnd>90</CharacterOffsetEnd>
            <POS>CC</POS>
          </token>
          <token id="19">
            <word>the</word>
            <lemma>the</lemma>
            <CharacterOffsetBegin>91</CharacterOffsetBegin>
            <CharacterOffsetEnd>94</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="20">
            <word>South</word>
            <lemma>South</lemma>
            <CharacterOffsetBegin>95</CharacterOffsetBegin>
            <CharacterOffsetEnd>100</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
          <token id="21">
            <word>Pacific</word>
            <lemma>Pacific</lemma>
            <CharacterOffsetBegin>101</CharacterOffsetBegin>
            <CharacterOffsetEnd>108</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
          <token id="22">
            <word>.</word>
            <lemma>.</lemma>
            <CharacterOffsetBegin>108</CharacterOffsetBegin>
            <CharacterOffsetEnd>109</CharacterOffsetEnd>
            <POS>.</POS>
          </token>
        </tokens>
        <parse>(ROOT (S (NP (DT The) (JJ new) (NN gadget)) (VP (MD would) (VP (VB be) (VP (VBN served) (PP (IN on) (NP (NP (CD 14) (NNS routes)) (VP (VBG connecting) (NP (NP (NNP Hawaii)) (PP (IN with) (NP (NP (NN mainland) (NN USA)) (, ,) (NP (NNP Asia)) (, ,) (CC and) (NP (DT the) (NNP South) (NNP Pacific))))))))))) (. .))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="6">served</dependent>
          </dep>
          <dep type="det">
            <governor idx="3">gadget</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="amod">
            <governor idx="3">gadget</governor>
            <dependent idx="2">new</dependent>
          </dep>
          <dep type="nsubjpass">
            <governor idx="6">served</governor>
            <dependent idx="3">gadget</dependent>
          </dep>
          <dep type="aux">
            <governor idx="6">served</governor>
            <dependent idx="4">would</dependent>
          </dep>
          <dep type="auxpass">
            <governor idx="6">served</governor>
            <dependent idx="5">be</dependent>
          </dep>
          <dep type="prep">
            <governor idx="6">served</governor>
            <dependent idx="7">on</dependent>
          </dep>
          <dep type="num">
            <governor idx="9">routes</governor>
            <dependent idx="8">14</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="7">on</governor>
            <dependent idx="9">routes</dependent>
          </dep>
          <dep type="vmod">
            <governor idx="9">routes</governor>
            <dependent idx="10">connecting</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="10">connecting</governor>
            <dependent idx="11">Hawaii</dependent>
          </dep>
          <dep type="prep">
            <governor idx="11">Hawaii</governor>
            <dependent idx="12">with</dependent>
          </dep>
          <dep type="nn">
            <governor idx="14">USA</governor>
            <dependent idx="13">mainland</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="12">with</governor>
            <dependent idx="14">USA</dependent>
          </dep>
          <dep type="conj">
            <governor idx="14">USA</governor>
            <dependent idx="16">Asia</dependent>
          </dep>
          <dep type="cc">
            <governor idx="14">USA</governor>
            <dependent idx="18">and</dependent>
          </dep>
          <dep type="det">
            <governor idx="21">Pacific</governor>
            <dependent idx="19">the</dependent>
          </dep>
          <dep type="nn">
            <governor idx="21">Pacific</governor>
            <dependent idx="20">South</dependent>
          </dep>
          <dep type="conj">
            <governor idx="14">USA</governor>
            <dependent idx="21">Pacific</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="6">served</dependent>
          </dep>
          <dep type="det">
            <governor idx="3">gadget</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="amod">
            <governor idx="3">gadget</governor>
            <dependent idx="2">new</dependent>
          </dep>
          <dep type="nsubjpass">
            <governor idx="6">served</governor>
            <dependent idx="3">gadget</dependent>
          </dep>
          <dep type="aux">
            <governor idx="6">served</governor>
            <dependent idx="4">would</dependent>
          </dep>
          <dep type="auxpass">
            <governor idx="6">served</governor>
            <dependent idx="5">be</dependent>
          </dep>
          <dep type="num">
            <governor idx="9">routes</governor>
            <dependent idx="8">14</dependent>
          </dep>
          <dep type="prep_on">
            <governor idx="6">served</governor>
            <dependent idx="9">routes</dependent>
          </dep>
          <dep type="vmod">
            <governor idx="9">routes</governor>
            <dependent idx="10">connecting</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="10">connecting</governor>
            <dependent idx="11">Hawaii</dependent>
          </dep>
          <dep type="nn">
            <governor idx="14">USA</governor>
            <dependent idx="13">mainland</dependent>
          </dep>
          <dep type="prep_with">
            <governor idx="11">Hawaii</governor>
            <dependent idx="14">USA</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="14">USA</governor>
            <dependent idx="16">Asia</dependent>
          </dep>
          <dep type="det">
            <governor idx="21">Pacific</governor>
            <dependent idx="19">the</dependent>
          </dep>
          <dep type="nn">
            <governor idx="21">Pacific</governor>
            <dependent idx="20">South</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="14">USA</governor>
            <dependent idx="21">Pacific</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="6">served</dependent>
          </dep>
          <dep type="det">
            <governor idx="3">gadget</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="amod">
            <governor idx="3">gadget</governor>
            <dependent idx="2">new</dependent>
          </dep>
          <dep type="nsubjpass">
            <governor idx="6">served</governor>
            <dependent idx="3">gadget</dependent>
          </dep>
          <dep type="aux">
            <governor idx="6">served</governor>
            <dependent idx="4">would</dependent>
          </dep>
          <dep type="auxpass">
            <governor idx="6">served</governor>
            <dependent idx="5">be</dependent>
          </dep>
          <dep type="num">
            <governor idx="9">routes</governor>
            <dependent idx="8">14</dependent>
          </dep>
          <dep type="prep_on">
            <governor idx="6">served</governor>
            <dependent idx="9">routes</dependent>
          </dep>
          <dep type="vmod">
            <governor idx="9">routes</governor>
            <dependent idx="10">connecting</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="10">connecting</governor>
            <dependent idx="11">Hawaii</dependent>
          </dep>
          <dep type="nn">
            <governor idx="14">USA</governor>
            <dependent idx="13">mainland</dependent>
          </dep>
          <dep type="prep_with">
            <governor idx="11">Hawaii</governor>
            <dependent idx="14">USA</dependent>
          </dep>
          <dep type="prep_with">
            <governor idx="11">Hawaii</governor>
            <dependent idx="16">Asia</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="14">USA</governor>
            <dependent idx="16">Asia</dependent>
          </dep>
          <dep type="det">
            <governor idx="21">Pacific</governor>
            <dependent idx="19">the</dependent>
          </dep>
          <dep type="nn">
            <governor idx="21">Pacific</governor>
            <dependent idx="20">South</dependent>
          </dep>
          <dep type="prep_with">
            <governor idx="11">Hawaii</governor>
            <dependent idx="21">Pacific</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="14">USA</governor>
            <dependent idx="21">Pacific</dependent>
          </dep>
        </dependencies>
      </sentence>
      <sentence id="2">
        <tokens>
          <token id="1">
            <word>connecting</word>
            <lemma>connect</lemma>
            <CharacterOffsetBegin>110</CharacterOffsetBegin>
            <CharacterOffsetEnd>120</CharacterOffsetEnd>
            <POS>VBG</POS>
          </token>
          <token id="2">
            <word>flights</word>
            <lemma>flight</lemma>
            <CharacterOffsetBegin>121</CharacterOffsetBegin>
            <CharacterOffsetEnd>128</CharacterOffsetEnd>
            <POS>NNS</POS>
          </token>
          <token id="3">
            <word>to</word>
            <lemma>to</lemma>
            <CharacterOffsetBegin>129</CharacterOffsetBegin>
            <CharacterOffsetEnd>131</CharacterOffsetEnd>
            <POS>TO</POS>
          </token>
          <token id="4">
            <word>and</word>
            <lemma>and</lemma>
            <CharacterOffsetBegin>132</CharacterOffsetBegin>
            <CharacterOffsetEnd>135</CharacterOffsetEnd>
            <POS>CC</POS>
          </token>
          <token id="5">
            <word>from</word>
            <lemma>from</lemma>
            <CharacterOffsetBegin>136</CharacterOffsetBegin>
            <CharacterOffsetEnd>140</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="6">
            <word>Hawaii</word>
            <lemma>Hawaii</lemma>
            <CharacterOffsetBegin>141</CharacterOffsetBegin>
            <CharacterOffsetEnd>147</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
        </tokens>
        <parse>(ROOT (S (VP (VBG connecting) (NP (NNS flights)) (PP (TO to) (CC and) (IN from) (NP (NNP Hawaii)))))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="1">connecting</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="1">connecting</governor>
            <dependent idx="2">flights</dependent>
          </dep>
          <dep type="prep">
            <governor idx="1">connecting</governor>
            <dependent idx="3">to</dependent>
          </dep>
          <dep type="cc">
            <governor idx="3">to</governor>
            <dependent idx="4">and</dependent>
          </dep>
          <dep type="conj">
            <governor idx="3">to</governor>
            <dependent idx="5">from</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="3">to</governor>
            <dependent idx="6">Hawaii</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="1">connecting</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="1">connecting</governor>
            <dependent idx="1" copy="1">connecting</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="1">connecting</governor>
            <dependent idx="2">flights</dependent>
          </dep>
          <dep type="prep_from">
            <governor idx="1" copy="1">connecting</governor>
            <dependent idx="6">Hawaii</dependent>
          </dep>
          <dep type="prep_to">
            <governor idx="1">connecting</governor>
            <dependent idx="6">Hawaii</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="1">connecting</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="1">connecting</governor>
            <dependent idx="1" copy="1">connecting</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="1">connecting</governor>
            <dependent idx="2">flights</dependent>
          </dep>
          <dep type="prep_from">
            <governor idx="1" copy="1">connecting</governor>
            <dependent idx="6">Hawaii</dependent>
          </dep>
          <dep type="prep_to">
            <governor idx="1">connecting</governor>
            <dependent idx="6">Hawaii</dependent>
          </dep>
        </dependencies>
      </sentence>
    </sentences>
  </document>
</root>


text:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");

var t = async_test("createImageData(imgdata) exists and returns something");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
    throw reason;
});
t.step(function() {

var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');

_assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
t.done();

});
done();


text:
NSString * const kBaseURL = @"http://hollyscorner.com/tweeder/api";

@interface TWApiManager()
@property (strong, nonatomic) AFHTTPSessionManager *sessionManager;
@end

@implementation TWApiManager

#pragma mark - Public methods
- (NSURLSessionDataTask * )apiRequest:(NSString *)endpoint
                           withMethod:(NSString *)method
                        andParameters:(NSDictionary *)parameters
                              success:(void (^)(id responseObject))successBlock
                              failure:(void (^)(NSUInteger httpResponseCode, NSError *error)) failureBlock {

    NSError *error = nil;
    NSString *fullUrl = [[@"http://hollyscorner.com/tweeder/api/" stringByAppendingString:endpoint] stringByAppendingString:@".php"];
    NSMutableURLRequest *request = [self.sessionManager.requestSerializer requestWithMethod:method URLString:fullUrl parameters:parameters error:&error];

    NSLog(@"%@", [request cURLString]);

    NSURLSessionDataTask *dataTask = [self.sessionManager dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id  _Nullable responseObject, NSError * _Nullable error) {

        if (!error) {
            if (successBlock) {
                successBlock(responseObject);
            }
        } else {
            if (failureBlock) {
                NSUInteger statusCode = 0;
                if ([response isKindOfClass:[NSHTTPURLResponse class]]) {
                    statusCode = ((NSHTTPURLResponse *)response).statusCode;
                }
                failureBlock(statusCode, error);
            }
        }
    }];

    [dataTask resume];

    return dataTask;
}

#pragma mark - initialization methods
- (id)init {

    self = [super init];
    if (self) {
        self.sessionManager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:kBaseURL]];
        self.sessionManager.responseSerializer = [AFJSONResponseSerializer serializer];
    }
    return self;
}

#pragma mark - Singleton Methods

+ (TWApiManager *)shared {
    static TWApiManager *_sharedInstance;
    if(!_sharedInstance) {
        static dispatch_once_t oncePredicate;
        dispatch_once(&oncePredicate, ^{
            _sharedInstance = [[super allocWithZone:nil] init];
        });
    }

    return _sharedInstance;
}

+ (id)allocWithZone:(NSZone *)zone {

    return [self shared];
}

- (id)copyWithZone:(NSZone *)zone {
    return self;
}

#if (!__has_feature(objc_arc))

- (id)retain {

    return self;
}

- (unsigned)retainCount {
    return UINT_MAX;  //denotes an object that cannot be released
}

- (void)release {
    //do nothing
}

- (id)autorelease {

    return self;
}
#endif

@end


text:
package disk_test

import (
	"errors"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	. "github.com/cloudfoundry/bosh-agent/platform/disk"
	fakedisk "github.com/cloudfoundry/bosh-agent/platform/disk/fakes"
)

var _ = Describe("linuxBindMounter", func() {
	var (
		delegateErr     error
		delegateMounter *fakedisk.FakeMounter
		mounter         Mounter
	)

	BeforeEach(func() {
		delegateErr = errors.New("fake-err")
		delegateMounter = &fakedisk.FakeMounter{}
		mounter = NewLinuxBindMounter(delegateMounter)
	})

	Describe("Mount", func() {
		It("delegates to mounter and adds --bind option to mount as a bind-mount", func() {
			delegateMounter.MountErr = delegateErr

			err := mounter.Mount("fake-partition-path", "fake-mount-path", "fake-opt1")

			// Outputs
			Expect(err).To(Equal(delegateErr))

			// Inputs
			Expect(delegateMounter.MountPartitionPaths).To(Equal([]string{"fake-partition-path"}))
			Expect(delegateMounter.MountMountPoints).To(Equal([]string{"fake-mount-path"}))
			Expect(delegateMounter.MountMountOptions).To(Equal([][]string{{"fake-opt1", "--bind"}}))
		})
	})

	Describe("RemountAsReadonly", func() {
		It("does not delegate to mounter because remount with --bind does not work", func() {
			err := mounter.RemountAsReadonly("fake-path")
			Expect(err).To(BeNil())
			Expect(delegateMounter.RemountAsReadonlyCalled).To(BeFalse())
		})
	})

	Describe("Remount", func() {
		It("delegates to mounter and adds --bind option to mount as a bind-mount", func() {
			delegateMounter.RemountErr = delegateErr

			err := mounter.Remount("fake-from-path", "fake-to-path", "fake-opt1")

			// Outputs
			Expect(err).To(Equal(delegateErr))

			// Inputs
			Expect(delegateMounter.RemountFromMountPoint).To(Equal("fake-from-path"))
			Expect(delegateMounter.RemountToMountPoint).To(Equal("fake-to-path"))
			Expect(delegateMounter.RemountMountOptions).To(Equal([]string{"fake-opt1", "--bind"}))
		})
	})

	Describe("SwapOn", func() {
		It("delegates to mounter", func() {
			delegateMounter.SwapOnErr = delegateErr

			err := mounter.SwapOn("fake-path")

			// Outputs
			Expect(err).To(Equal(delegateErr))

			// Inputs
			Expect(delegateMounter.SwapOnPartitionPaths).To(Equal([]string{"fake-path"}))
		})
	})

	Describe("Unmount", func() {
		It("delegates to mounter", func() {
			delegateMounter.UnmountErr = delegateErr
			delegateMounter.UnmountDidUnmount = true

			didUnmount, err := mounter.Unmount("fake-device-path")

			// Outputs
			Expect(didUnmount).To(BeTrue())
			Expect(err).To(Equal(delegateErr))

			// Inputs
			Expect(delegateMounter.UnmountPartitionPathOrMountPoint).To(Equal("fake-device-path"))
		})
	})

	Describe("IsMountPoint", func() {
		It("delegates to mounter", func() {
			delegateMounter.IsMountPointErr = delegateErr
			delegateMounter.IsMountPointResult = true
			delegateMounter.IsMountPointPartitionPath = "fake-partition-path"

			partitionPath, isMountPoint, err := mounter.IsMountPoint("fake-device-path")

			// Outputs
			Expect(partitionPath).To(Equal("fake-partition-path"))
			Expect(isMountPoint).To(BeTrue())
			Expect(err).To(Equal(delegateErr))

			// Inputs
			Expect(delegateMounter.IsMountPointPath).To(Equal("fake-device-path"))
		})
	})

	Describe("IsMounted", func() {
		It("delegates to mounter", func() {
			delegateMounter.IsMountedErr = delegateErr
			delegateMounter.IsMountedResult = true

			isMounted, err := mounter.IsMounted("fake-device-path")

			// Outputs
			Expect(isMounted).To(BeTrue())
			Expect(err).To(Equal(delegateErr))

			// Inputs
			Expect(delegateMounter.IsMountedDevicePathOrMountPoint).To(Equal("fake-device-path"))
		})
	})
})


text:
package org.thymeleaf.spring4.expression;

import org.springframework.expression.AccessException;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.TypedValue;
import org.springframework.expression.spel.support.ReflectivePropertyAccessor;
import org.thymeleaf.context.VariablesMap;

/**
 * <p>
 *   Property accessor used for allowing Spring EL expression evaluators
 *   treat {@link VariablesMap} objects correctly (map keys will be accessible
 *   as object properties).
 * </p>
 *
 * @author Daniel Fernández
 *
 * @since 1.1
 *
 */
public final class VariablesMapPropertyAccessor extends ReflectivePropertyAccessor {

    private static final Class<?>[] TARGET_CLASSES = new Class<?>[] { VariablesMap.class };

    public static final VariablesMapPropertyAccessor INSTANCE = new VariablesMapPropertyAccessor();

    public VariablesMapPropertyAccessor() {
        super();
    }

    @Override
    public Class<?>[] getSpecificTargetClasses() {
        return TARGET_CLASSES;
    }

    @Override
    public boolean canRead(final EvaluationContext context, final Object target, final String name)
            throws AccessException {
        if (target == null) {
            return false;
        }
        return true;
    }

    @Override
    @SuppressWarnings("unchecked")
    public TypedValue read(final EvaluationContext context, final Object target, final String name)
            throws AccessException {
        if (target == null) {
            throw new AccessException("Cannot read property of null target");
        }
        if (!(target instanceof VariablesMap)) {
            // This can happen simply because we're applying the same
            // AST tree on a different class (Spring internally caches property accessors).
            // So this exception might be considered "normal" by Spring AST evaluator and
            // just use it to refresh the property accessor cache.
            throw new AccessException("Cannot read target of class " + target.getClass().getName());
        }
        return new TypedValue(((VariablesMap<String,?>)target).get(name));
    }

    @Override
    public boolean canWrite(
            final EvaluationContext context, final Object target, final String name)
            throws AccessException {
        if (target == null) {
            return false;
        }
        return true;
    }

    @Override
    @SuppressWarnings("unchecked")
    public void write(
            final EvaluationContext context, final Object target, final String name, final Object newValue)
            throws AccessException {
        if (target == null) {
            throw new AccessException("Cannot write property of null target");
        }
        if (!(target instanceof VariablesMap)) {
            // This can happen simply because we're applying the same
            // AST tree on a different class (Spring internally caches property accessors).
            // So this exception might be considered "normal" by Spring AST evaluator and
            // just use it to refresh the property accessor cache.
            throw new AccessException("Cannot write target of class " + target.getClass().getName());
        }
        ((VariablesMap<String,Object>)target).put(name, newValue);
    }

}


text:
export interface Storage {
  readonly length: number;
  clear(): void;
  getItem(key: string): string | null;
  key(index: number): string | null;
  removeItem(key: string): void;
  setItem(key: string, data: string): void;
}


text:
package relationshipextractor

import play.api.libs.json._
import scala.io.Source.{ fromFile }
import scala.collection.mutable.ListBuffer

case class RelationDefinition(
  title: String,
  id: String,
  description: String,
  english: Option[Seq[String]],
  swedish: Option[Seq[String]]
  )

object RelationDefinition {
  implicit val jsonFormat = Json.format[RelationDefinition]

  private def readConfig(): JsResult[Seq[RelationDefinition]] = {
    val configFile = fromFile("data/relations.json").getLines mkString "\n"
    val rawJson = Json.parse(configFile)
    rawJson.validate[Seq[RelationDefinition]]
  }

  def getRelations(): Option[Seq[RelationDefinition]] = {
    readConfig().fold(
      invalid = {
        fieldErrors => fieldErrors.foreach(x => println(s"field: ${x._1} errors: ${x._2}"))
        None
      },
      valid = {
        relations => Some(relations)
      }
    )
  }

  def getRelationLabels(relation: RelationDefinition): Seq[String] = {
    relation.english.getOrElse(Nil)
  }

  def getSwedishRelationLabels(relation: RelationDefinition): Seq[String] = {
    relation.swedish.getOrElse(Nil)
  }
}


text:
No hay ningún recordatorio

 0">

{{reminder.text}}

{{getTreatment(reminder.treatment.type)}}

{{getTypes(reminder.treatment.vaccines)}}

{{reminder.treatment.notes}}

{{reminder.date.getDate()}}/{{reminder.date.getMonth()+1}}/{{reminder.date.getFullYear()}}

		        Delete item