text:
#region License Header

#endregion License Header

using FluentAssertions;
using Moq;
using Quantler.Exchanges;
using Quantler.Scheduler;
using System;
using System.Collections.Generic;
using Xunit;

namespace Quantler.Tests.Core.Scheduler
{
    /// <summary>
    /// Time based functions tests
    /// TODO: set unit tests
    /// </summary>
    public class TimeFuncTests
    {
        #region Private Fields

        /// <summary>
        /// The date function
        /// </summary>
        private readonly DateFunc Date = new DateFunc();

        /// <summary>
        /// The scheduled actions keeper
        /// </summary>
        private readonly ScheduledActionsKeeper ScheduledActionsKeeper;

        /// <summary>
        /// The time function
        /// </summary>
        private readonly TimeFunc Time = new TimeFunc();

        /// <summary>
        /// Default End date
        /// </summary>
        private DateTime End = new DateTime(2017, 1, 1);

        /// <summary>
        /// The exchangeModel mock
        /// </summary>
        private Mock<ExchangeModel> Exchange = new Mock<ExchangeModel>();

        /// <summary>
        /// The result
        /// </summary>
        private List<DateTime> Result = new List<DateTime>();

        /// <summary>
        /// Default Start date
        /// </summary>
        private DateTime Start = new DateTime(2016, 1, 1);

        #endregion Private Fields

        #region Public Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="TimeFuncTests"/> class.
        /// </summary>
        public TimeFuncTests()
        {
            //Initialize
            Func<DateTime, bool> func = d => !(d.Day != 31) && d.DayOfWeek != DayOfWeek.Sunday && d.DayOfWeek != DayOfWeek.Saturday; //We simulate that we are not opened on any 31st days and during weekends
            Exchange.Setup(x => x.IsOpenOnDate(It.IsAny<DateTime>())).Returns(func);
        }

        #endregion Public Constructors

        #region Public Methods

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test after market open timings
        public void TimeFunc_AfterMarketOpen_Hit_Success()
        {
            //Arrange
            List<DateTime> expected = new List<DateTime>()
            {
                new DateTime(2016, 01, 30, 01, 00, 00 ), //Check timing for each day in 1 month (January for instance)
                new DateTime(2016, 02, 30, 01, 00, 00 ),
                new DateTime(2016, 03, 31, 01, 00, 00 ),
                new DateTime(2016, 04, 30, 01, 00, 00 ),
                new DateTime(2016, 05, 31, 01, 00, 00 ),
                new DateTime(2016, 06, 30, 01, 00, 00 ),
                new DateTime(2016, 07, 31, 01, 00, 00 ),
                new DateTime(2016, 08, 31, 01, 00, 00 ),
                new DateTime(2016, 09, 30, 01, 00, 00 ),
                new DateTime(2016, 10, 31, 01, 00, 00 ),
                new DateTime(2016, 11, 31, 01, 00, 00 ),
                new DateTime(2016, 12, 31, 01, 00, 00 )
            };

            //SUT
            //ScheduledActionsKeeper.Event(Date.EveryDay(), Time.AfterMarketOpen(Exchange.Object, TimeSpan.FromMinutes(1)), (name, date) => Result.Add(date));

            //Act
            Run(new DateTime(2016, 01, 01), new DateTime(2016, 01, 31), TimeSpan.FromSeconds(1));

            //Assert
            expected.ForEach(x => expected.Should().Contain(x, "because we expected this to be hit"));
            expected.Count.Should().Be(Result.Count);
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test after market open timings
        public void TimeFunc_AfterMarketOpen_NoHit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test at a specific timespan
        public void TimeFunc_At_Timespan_Hit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test at a specific timespan
        public void TimeFunc_At_Timespan_NoHit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test at a specific timespan in another timezone
        public void TimeFunc_At_Timespan_Timezoned_Hit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test at a specific timespan in another timezone
        public void TimeFunc_At_Timespan_Timezoned_NoHit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test before market openings
        public void TimeFunc_BeforeMarketClose_Hit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test before market openings
        public void TimeFunc_BeforeMarketClose_NoHit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully test interval timers
        public void TimeFunc_Every_Interval_Hit_Success()
        {
        }

        [Fact(Skip = "TODO")]
        [Trait("Quantler.Core.Scheduler", "Quantler")]
        //Test to see if we can successfully initialize time func
        public void TimeFunc_Initialize_Success()
        {
        }

        #endregion Public Methods

        #region Private Methods

        /// <summary>
        /// Runs the specified period for the current initialized scheduled action keeper.
        /// </summary>
        /// <param name="start">The start.</param>
        /// <param name="end">The end.</param>
        /// <param name="interval">The interval.</param>
        private void Run(DateTime start, DateTime end, TimeSpan interval) =>
            start.DoWhile(x =>
            {
                ScheduledActionsKeeper.CheckAll();
                return x.Add(interval);
            }, x => x <= end);

        #endregion Private Methods
    }
}


text:
package org.gradle.internal.logging.sink;

import org.gradle.api.logging.configuration.ConsoleOutput;
import org.gradle.internal.logging.console.AnsiConsole;
import org.gradle.internal.logging.console.ColorMap;
import org.gradle.internal.logging.console.Console;
import org.gradle.internal.nativeintegration.console.ConsoleDetector;
import org.gradle.internal.nativeintegration.console.ConsoleMetaData;
import org.gradle.internal.nativeintegration.console.FallbackConsoleMetaData;
import org.gradle.internal.nativeintegration.services.NativeServices;

import java.io.OutputStream;
import java.io.OutputStreamWriter;

public class ConsoleConfigureAction {
    public static void execute(OutputEventRenderer renderer, ConsoleOutput consoleOutput) {
        execute(renderer, consoleOutput, getConsoleMetaData(), renderer.getOriginalStdOut(), renderer.getOriginalStdErr());
    }

    public static void execute(OutputEventRenderer renderer, ConsoleOutput consoleOutput, ConsoleMetaData consoleMetadata, OutputStream stdout, OutputStream stderr) {
        if (consoleOutput == ConsoleOutput.Auto) {
            configureAutoConsole(renderer, consoleMetadata, stdout, stderr);
        } else if (consoleOutput == ConsoleOutput.Rich) {
            configureRichConsole(renderer, consoleMetadata, stdout, stderr, false);
        } else if (consoleOutput == ConsoleOutput.Verbose) {
            configureRichConsole(renderer, consoleMetadata, stdout, stderr, true);
        } else if (consoleOutput == ConsoleOutput.Plain) {
            configurePlainConsole(renderer, consoleMetadata, stdout, stderr);
        }
    }

    private static ConsoleMetaData getConsoleMetaData() {
        ConsoleDetector consoleDetector = NativeServices.getInstance().get(ConsoleDetector.class);
        ConsoleMetaData metaData = consoleDetector.getConsole();
        if (metaData != null) {
            return metaData;
        }
        return FallbackConsoleMetaData.NOT_ATTACHED;
    }

    private static void configureAutoConsole(OutputEventRenderer renderer, ConsoleMetaData consoleMetaData, OutputStream stdout, OutputStream stderr) {
        if (consoleMetaData.isStdOut() && consoleMetaData.isStdErr()) {
            // Redirect stderr to stdout when both stdout and stderr are attached to a console. Assume that they are attached to the same console
            // This avoids interleaving problems when stdout and stderr end up at the same location
            Console console = consoleFor(stdout, consoleMetaData, renderer.getColourMap());
            renderer.addRichConsoleWithErrorOutputOnStdout(console, consoleMetaData, false);
        } else if (consoleMetaData.isStdOut()) {
            // Write rich content to stdout and plain content to stderr
            Console console = consoleFor(stdout, consoleMetaData, renderer.getColourMap());
            renderer.addRichConsole(console, stderr, consoleMetaData, false);
        } else if (consoleMetaData.isStdErr()) {
            // Write plain content to stdout and rich content to stderr
            Console stderrConsole = consoleFor(stderr, consoleMetaData, renderer.getColourMap());
            renderer.addRichConsole(stdout, stderrConsole, true);
        } else {
            renderer.addPlainConsole(stdout, stderr);
        }
    }

    private static void configurePlainConsole(OutputEventRenderer renderer, ConsoleMetaData consoleMetaData, OutputStream stdout, OutputStream stderr) {
        if (consoleMetaData.isStdOut() && consoleMetaData.isStdErr()) {
            // Redirect stderr to stdout when both stdout and stderr are attached to a console. Assume that they are attached to the same console
            // This avoids interleaving problems when stdout and stderr end up at the same location
            renderer.addPlainConsoleWithErrorOutputOnStdout(stdout);
        } else {
            renderer.addPlainConsole(stdout, stderr);
        }
    }

    private static void configureRichConsole(OutputEventRenderer renderer, ConsoleMetaData consoleMetaData, OutputStream stdout, OutputStream stderr, boolean verbose) {
        if (consoleMetaData.isStdOut() && consoleMetaData.isStdErr()) {
            // Redirect stderr to stdout when both stdout and stderr are attached to a console. Assume that they are attached to the same console
            // This avoids interleaving problems when stdout and stderr end up at the same location
            Console console = consoleFor(stdout, consoleMetaData, renderer.getColourMap());
            renderer.addRichConsoleWithErrorOutputOnStdout(console, consoleMetaData, verbose);
        } else {
            // Write rich content to both stdout and stderr
            Console stdoutConsole = consoleFor(stdout, consoleMetaData, renderer.getColourMap());
            Console stderrConsole = consoleFor(stderr, consoleMetaData, renderer.getColourMap());
            renderer.addRichConsole(stdoutConsole, stderrConsole, consoleMetaData, verbose);
        }
    }

    private static Console consoleFor(OutputStream stdout, ConsoleMetaData consoleMetaData, ColorMap colourMap) {
        boolean force = !consoleMetaData.isWrapStreams();
        OutputStreamWriter outStr = new OutputStreamWriter(force ? stdout : AnsiConsoleUtil.wrapOutputStream(stdout));
        return new AnsiConsole(outStr, outStr, colourMap, consoleMetaData, force);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0"?>
<Document>

	<Sentence>
		<value>Twin-to-twin transfusion syndrome is a rare condition that occurs only in identical twins while they are in the womb.</value>
		<pattern_crowdsource> [[Twin-to-twin transfusion syndrome|C0015958]] is a rare condition that occurs only in [[identical twins|C0041432]] while they are in the womb.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Twin-to-twin transfusion syndrome</surface-form>
				<RDF-ID>C0015958</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>rare</surface-form>
				<RDF-ID>C0522498</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>condition</surface-form>
				<RDF-ID>C0348080</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>identical twins</surface-form>
				<RDF-ID>C0041432</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>womb</surface-form>
				<RDF-ID>C0042149</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0015958 OCCURS_IN C0041432</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>The infant often has anemia, is dehydrated, and looks pale.</value>
		<pattern_crowdsource> The [[infant|C0021270]] often has [[anemia|C0002871]], is dehydrated, and looks pale.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>infant</surface-form>
				<RDF-ID>C0021270</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>often</surface-form>
				<RDF-ID>C0332183</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>anemia</surface-form>
				<RDF-ID>C0002871</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>pale</surface-form>
				<RDF-ID>C0030232</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0002871 PROCESS_OF C0021270</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>The donor twin may need a blood transfusion to treat anemia.</value>
		<pattern_crowdsource> The donor twin may need a [[blood transfusion|C0005841]] to treat [[anemia|C0002871]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>twin</surface-form>
				<RDF-ID>C0205173</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>blood transfusion</surface-form>
				<RDF-ID>C0005841</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>anemia</surface-form>
				<RDF-ID>C0002871</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0005841 TREATS C0002871</triple>
		</triples>
	</Sentence>

</Document>


text:
def mapper(key, value):
    # value is ignored, key is a line of text
    for k in key.lower().split():
        yield k.strip(), 1


text:
#ifndef BASELIB_LINKEDLIST_H_
#define BASELIB_LINKEDLIST_H_

namespace java { namespace lang{
class IObject;
}}

namespace alinous {
class ThreadContext;
}

namespace java { namespace util {

using namespace alinous;
using namespace java::lang;

template <typename T> class List;
template <typename T> class Iterator;

template <typename T>
class LinkedList final : public List<T> {
public:
	class LinkedListIterator final : public Iterator<T> {

	public:
		LinkedListIterator(LinkedList* list, ThreadContext* ctx) throw(): IObject(ctx), Iterator<T>(ctx), ite(&list->rawList) {

		}

		virtual ~LinkedListIterator() throw() {
			__releaseRegerences(false, nullptr);
		}

		virtual void __releaseRegerences(bool prepare, ThreadContext* ctx) throw() {

		}
		virtual bool hasNext(ThreadContext* ctx) throw() {
			return ite.hasNext();
		}

		virtual T* next(ThreadContext* ctx) throw() {
			return ite.next();
		}
		virtual void remove(ThreadContext* ctx) throw() {
		}
	private:
		typename RawLinkedList<T>::Iterator ite;
	};

	LinkedList(ThreadContext* ctx) throw() : IObject(ctx), List<T>(ctx), rawList() {}
	LinkedList() throw() : IObject(0), List<T>(0), rawList() {}
	virtual ~LinkedList() throw() {
		ThreadContext* ctx = ThreadContext::getCurentContext();
		__releaseRegerences(false, ctx);
	}

	virtual void __releaseRegerences(bool prepare, ThreadContext* ctx) throw() {
		auto it = this->rawList.iterator();
		while(it.hasNext()){
			T* obj = it.next();
			__GC_DEC(this, obj, T);
		}
		this->rawList.clear();
	}
	virtual void add(T* obj, ThreadContext* ctx) throw() {
		__GC_INS(this, obj, T);

		this->rawList.add(obj);
	}
	virtual void add(int index, T* element, ThreadContext* ctx) throw() {
		__GC_INS(this, element, T);

		T* lastOne = this->rawList.get(index);
		if(lastOne != 0){
			__GC_DEC(this, lastOne, T);
		}

		this->rawList.add(index, element);
	}
	virtual void addAll(List<T>* list, ThreadContext* ctx) throw() {
		int maxLoop = list->size(ctx);
		for(int i = 0; i != maxLoop; ++i){
			T* element = list->get(i, ctx);
			add(element, ctx);
		}
	}
	virtual void clear(ThreadContext* ctx) throw() {
		auto it = this->rawList.iterator();
		while(it.hasNext()){
			T* obj = it.next();
			__GC_DEC(this, obj, T);
		}

		this->rawList.clear();
	}

	virtual bool contains(T* o, ThreadContext* ctx) throw() {
		return this->rawList.contains(o);
	}

	virtual bool equals(T* o, ThreadContext* ctx) throw() {
		return false;
	}
	virtual T* get(int index, ThreadContext* ctx) throw() {
		return __GC_RT(this->rawList.get(index), T);
	}
	virtual T* set(int index, T* element, ThreadContext* ctx) throw() {
		__GC_INS(this, element, T);

		auto elm = this->rawList.getElement(index);

		T* last = elm->data;
		if(last != 0){
			__GC_DEC(this, last, T);
		}

		elm->data = element;

		return __GC_RT(last, T);
	}
	virtual int indexOf(T* o,ThreadContext* ctx) throw() {
		return this->rawList.indexOf(o);
	}
	virtual bool isEmpty(ThreadContext* ctx) throw() {
		return this->rawList.isEmpty();
	}
	virtual Iterator<T> *iterator(ThreadContext* ctx) throw() {
		return nullptr;
	}
	virtual T* remove(int index, ThreadContext* ctx) throw() {
		T* del = this->rawList.get(index);

		this->rawList.remove(index);
		__GC_DEC(this, del, T);

		return __GC_RT(del, T);
	}
	void removeFirst(ThreadContext* ctx) throw() {
		remove(0, ctx);
	}
	virtual bool remove(T* o, ThreadContext* ctx) throw() {
		int idx = this->rawList.indexOf(o);
		if(idx < 0){
			return false;
		}

		remove(idx, ctx);

		return true;
	}
	virtual int size(ThreadContext* ctx) throw() {
		return this->rawList.size();
	}
	virtual List<T>* subList(int fromIndex, int toIndex, ThreadContext* ctx) throw() {
		return nullptr;
	}
	virtual ArrayObject<T>* toArray(IArrayObject<T>* dummy, ThreadContext* ctx) throw() {
		return nullptr;
	}
private:
	RawLinkedList<T> rawList;
};

}} /* namespace alinous */

#endif /* BASELIB_LINKEDLIST_H_ */


text:
<?php
/**
 *
 *
 * @package Admin
 */

if ( ! defined( 'WPSEO_VERSION' ) ) {
	header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
	exit();
}

global $wpseo_admin_pages;

$options = get_option( 'wpseo' );

if ( isset( $_GET['allow_tracking'] ) && check_admin_referer( 'wpseo_activate_tracking', 'nonce' ) ) {
	$options['tracking_popup_done'] = true;
	if ( $_GET['allow_tracking'] == 'yes' ) {
		$options['yoast_tracking'] = true;
	}
	else {
		$options['yoast_tracking'] = false;
	}
	update_option( 'wpseo', $options );

	if ( isset( $_SERVER['HTTP_REFERER'] ) ) {
		wp_safe_redirect( $_SERVER['HTTP_REFERER'], 307 );
		exit;
	}
}

// Fix metadescription if so requested
if ( isset( $_GET['fixmetadesc'] ) && check_admin_referer( 'wpseo-fix-metadesc', 'nonce' ) && $options['theme_description_found'] !== '' ) {
	$path = false;
	if ( file_exists( get_stylesheet_directory() . '/header.php' ) ) {
		// theme or child theme
		$path = get_stylesheet_directory();
	}
	elseif ( file_exists( get_template_directory() . '/header.php' ) ) {
		// parent theme in case of a child theme
		$path = get_template_directory();
	}

	if ( is_string( $path ) && $path !== '' ) {
		$fcontent    = file_get_contents( $path . '/header.php' );
		$msg         = '';
		$backup_file = date( 'Ymd-H.i.s-' ) . 'header.php.wpseobak';
		if ( ! file_exists( $path . '/' . $backup_file ) ) {
			$backupfile = fopen( $path . '/' . $backup_file, 'w+' );
			if ( $backupfile ) {
				fwrite( $backupfile, $fcontent );
				fclose( $backupfile );
				$msg = __( 'Backed up the original file header.php to ' . esc_html( $backup_file ) . ', ', 'wordpress-seo' );

				$count    = 0;
				$fcontent = str_replace( $options['theme_description_found'], '', $fcontent, $count );
				if ( $count > 0 ) {
					$header_file = fopen( $path . '/header.php', 'w+' );
					if ( $header_file ) {
						if ( fwrite( $header_file, $fcontent ) !== false ) {
							$msg .= __( 'Removed hardcoded meta description.', 'wordpress-seo' );
							$options['theme_has_description']   = false;
							$options['theme_description_found'] = '';
							update_option( 'wpseo', $options );
						}
						else {
							$msg .= '' . __( 'Failed to remove hardcoded meta description.', 'wordpress-seo' ) . '';
						}
						fclose( $header_file );
					}
				}
				else {
					wpseo_description_test();
					$msg .= '' . __( 'Earlier found meta description was not found in file. Renewed the description test data.', 'wordpress-seo' ) . '';
				}
				add_settings_error( 'yoast_wpseo_dashboard_options', 'error', $msg, 'updated' );
			}
		}
	}

	// Clean up the referrer url for later use
	if ( isset( $_SERVER['REQUEST_URI'] ) ) {
		$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'nonce', 'fixmetadesc' ), $_SERVER['REQUEST_URI'] );
	}
}

if ( ( ! isset( $options['theme_has_description'] ) || ( ( isset( $options['theme_has_description'] ) && $options['theme_has_description'] === true ) || $options['theme_description_found'] !== '' ) ) || ( isset( $_GET['checkmetadesc'] ) && check_admin_referer( 'wpseo-check-metadesc', 'nonce' ) ) ) {
	wpseo_description_test();
	// Renew the options after the test
	$options = get_option( 'wpseo' );
}
if ( isset( $_GET['checkmetadesc'] ) ) {
	// Clean up the referrer url for later use
	if ( isset( $_SERVER['REQUEST_URI'] ) ) {
		$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'nonce', 'checkmetadesc' ), $_SERVER['REQUEST_URI'] );
	}
}

$wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo' ), 'wpseo' );

do_action( 'wpseo_all_admin_notices' );

if ( is_array( $options['blocking_files'] ) && count( $options['blocking_files'] ) > 0 ) {
	echo '
'
		. '' . __( 'Fix it.', 'wordpress-seo' ) . ''
		. __( 'The following file(s) is/are blocking your XML sitemaps from working properly:', 'wordpress-seo' ) . '
';
	foreach ( $options['blocking_files'] as $file ) {
		echo esc_html( $file ) . '
';
	}
	echo __( 'Either delete them (this can be done with the "Fix it" button) or disable WP SEO XML sitemaps.', 'wordpress-seo' );
	echo '
';
}

if ( $options['theme_description_found'] !== '' ) {
	echo '
'
		. ' wp_create_nonce( 'wpseo-fix-metadesc' ) ), admin_url( 'admin.php?page=wpseo_dashboard&fixmetadesc' ) ) ) . '" class="button fixit">' . __( 'Fix it.', 'wordpress-seo' ) . ''
		. '  wp_create_nonce( 'wpseo-check-metadesc' ) ), admin_url( 'admin.php?page=wpseo_dashboard&checkmetadesc' ) ) ) . '" class="button checkit">' . __( 'Re-check theme.', 'wordpress-seo' ) . ''
		. __( 'Your theme contains a meta description, which blocks WordPress SEO from working properly, please delete the following line, or press fix it:', 'wordpress-seo' ) . '
';
	echo '' . esc_html( $options['theme_description_found'] ) . '';
	echo '
';
}

if ( strpos( get_option( 'permalink_structure' ), '%postname%' ) === false && $options['ignore_permalink'] === false ) {
	echo '
'
		. '' . __( 'Fix it.', 'wordpress-seo' ) . ''
		. '' . __( 'Ignore.', 'wordpress-seo' ) . ''
		. __( 'You do not have your postname in the URL of your posts and pages, it is highly recommended that you do. Consider setting your permalink structure to /%postname%/.', 'wordpress-seo' ) . '
';
}

if ( get_option( 'page_comments' ) && $options['ignore_page_comments'] === false ) {
	echo '
'
		. '' . __( 'Fix it.', 'wordpress-seo' ) . ''
		. '' . __( 'Ignore.', 'wordpress-seo' ) . ''
		. __( 'Paging comments is enabled, this is not needed in 999 out of 1000 cases, so the suggestion is to disable it, to do that, simply uncheck the box before "Break comments into pages..."', 'wordpress-seo' ) . '
';
}

echo '
' . __( 'General', 'wordpress-seo' ) . '
';

if ( $options['ignore_tour'] === true ) {
	echo '' . __( 'Introduction Tour:', 'wordpress-seo' ) . '' . __( 'Start Tour', 'wordpress-seo' ) . '';
	echo '
' . __( 'Take this tour to quickly learn about the use of this plugin.', 'wordpress-seo' ) . '
';
}

echo '' . __( 'Default Settings:', 'wordpress-seo' ) . ' wp_create_nonce( 'wpseo_reset_defaults' ) ), admin_url( 'admin.php?page=wpseo_dashboard&wpseo_reset_defaults' ) ) ) . '">' . __( 'Reset Default Settings', 'wordpress-seo' ) . '';
echo '
' . __( 'If you want to restore a site to the default WordPress SEO settings, press this button.', 'wordpress-seo' ) . '
';

echo '
' . __( 'Tracking', 'wordpress-seo' ) . '
';
echo $wpseo_admin_pages->checkbox( 'yoast_tracking', __( 'Allow tracking of this WordPress install\'s anonymous data.', 'wordpress-seo' ) );
echo '
' . __( "To maintain a plugin as big as WordPress SEO, we need to know what we're dealing with: what kinds of other plugins our users are using, what themes, etc. Please allow us to track that data from your install. It will not track any user details, so your security and privacy are safe with us.", 'wordpress-seo' ) . '
';

echo '
' . __( 'Security', 'wordpress-seo' ) . '
';
echo $wpseo_admin_pages->checkbox( 'disableadvanced_meta', __( 'Disable the Advanced part of the WordPress SEO meta box', 'wordpress-seo' ) );
echo '
' . __( 'Unchecking this box allows authors and editors to redirect posts, noindex them and do other things you might not want if you don\'t trust your authors.', 'wordpress-seo' ) . '
';

echo '
' . __( 'Webmaster Tools', 'wordpress-seo' ) . '
';
echo '
' . __( 'You can use the boxes below to verify with the different Webmaster Tools, if your site is already verified, you can just forget about these. Enter the verify meta values for:', 'wordpress-seo' ) . '
';
echo $wpseo_admin_pages->textinput( 'alexaverify', '' . __( 'Alexa Verification ID', 'wordpress-seo' ) . '' );
echo $wpseo_admin_pages->textinput( 'msverify', '' . __( 'Bing Webmaster Tools', 'wordpress-seo' ) . '' );
echo $wpseo_admin_pages->textinput( 'googleverify', '' . __( 'Google Webmaster Tools', 'wordpress-seo' ) . '' );
echo $wpseo_admin_pages->textinput( 'pinterestverify', '' . __( 'Pinterest', 'wordpress-seo' ) . '' );
echo $wpseo_admin_pages->textinput( 'yandexverify', '' . __( 'Yandex Webmaster Tools', 'wordpress-seo' ) . '' );

do_action( 'wpseo_dashboard' );

$wpseo_admin_pages->admin_footer();


text:
<?php

namespace Akeeba\Engine\Postproc\Connector\S3v4;

// Protection against direct access
defined('AKEEBAENGINE') || die();

/**
 * Base class for request signing objects.
 */
abstract class Signature
{
	/**
	 * The request we will be signing
	 *
	 * @var  Request
	 */
	protected $request = null;

	/**
	 * Signature constructor.
	 *
	 * @param   Request  $request  The request we will be signing
	 */
	public function __construct(Request $request)
	{
		$this->request = $request;
	}

	/**
	 * Get a signature object for the request
	 *
	 * @param   Request  $request  The request which needs signing
	 * @param   string   $method   The signature method, "v2" or "v4"
	 *
	 * @return  Signature
	 */
	public static function getSignatureObject(Request $request, string $method = 'v2'): self
	{
		$className = __NAMESPACE__ . '\\Signature\\' . ucfirst($method);

		return new $className($request);
	}

	/**
	 * Returns the authorization header for the request
	 *
	 * @return  string
	 */
	abstract public function getAuthorizationHeader(): string;

	/**
	 * Pre-process the request headers before we convert them to cURL-compatible format. Used by signature engines to
	 * add custom headers, e.g. x-amz-content-sha256
	 *
	 * @param   array  $headers     The associative array of headers to process
	 * @param   array  $amzHeaders  The associative array of amz-* headers to process
	 *
	 * @return  void
	 */
	abstract public function preProcessHeaders(array &$headers, array &$amzHeaders): void;

	/**
	 * Get a pre-signed URL for the request. Typically used to pre-sign GET requests to objects, i.e. give shareable
	 * pre-authorized URLs for downloading files from S3.
	 *
	 * @param   integer|null  $lifetime  Lifetime in seconds. NULL for default lifetime.
	 * @param   bool          $https     Use HTTPS ($hostBucket should be false for SSL verification)?
	 *
	 * @return  string  The authenticated URL, complete with signature
	 */
	abstract public function getAuthenticatedURL(?int $lifetime = null, bool $https = false): string;
}


text:
import time
from typing import List

import requests
from flask import current_app as app
from werkzeug.http import parse_options_header

from feedrsub.database import db
from feedrsub.ingestion.utils import headers_to_dict
from feedrsub.models.feed import Feed
from feedrsub.models.feedstats import FeedStats, FetchType
from feedrsub.utils.date_parsing import unix_timestamp
from feedrsub.utils.hashing import DiffResult
from feedrsub.utils.signals import notification_received
from feedrsub.utils.strings import stringify_list, utf8len

class ContentLengthException(Exception):
    pass

class FeedFetcher:
    def __init__(self, max_feeds: int = 10) -> None:
        self.to_fetch: List[Feed] = []
        self.fetched: List[Feed] = []
        self.max_feeds: int = max_feeds

    @classmethod
    def fetch_feed(cls, feed: Feed, force: bool = False) -> bool:
        """
        Fetch a single Feed.

        Will attempt to fetch latest version of Feed. Statistics will be saved and next fetch
        scheduled regardless of fetch success. If fetch failed or there is no change in the feed, then
        no notification_received signal will be sent and the process will exit.

        :param feed: Feed to be fetched
        :param force: Always fetch regardless of last-modified values
        :return: True if fetch was successful with new content
        """
        fetched: bool = False

        content: str = ""
        content_length: int = 0
        response_url: str = ""
        headers: dict = {}
        status_code: int = 500
        encoding: str = ""

        app.logger.info("Fetching %s", feed)

        start = time.perf_counter()
        try:
            with requests.get(
                feed.topic,
                headers=feed.fetch_headers(force),
                timeout=(3.05, 10),
                stream=True,
            ) as response:

                # Capture response variables before raising any exceptions
                status_code = response.status_code
                headers = response.headers
                encoding = response.encoding or "utf-8"

                # Only set content if content length is acceptable, else raise ContentLengthException
                content_length = int(response.headers.get("Content-Length", 0))
                if content_length < app.config.get("MAX_FEED_LENGTH"):
                    content = response.text
                else:
                    raise ContentLengthException()

                response.raise_for_status()

        except requests.Timeout as t:
            app.logger.warning("Timeout fetching Feed %s: %s", feed, t)
        except requests.ConnectionError as c:
            app.logger.warning("ConnectionError fetching feed %s: %s", feed, c)
        except requests.RequestException as e:
            app.logger.warning("Error fetching Feed %s: %s", feed, e)
        except ContentLengthException:
            app.logger.warning("TOO BIG: feed=%s size=%s", feed, content_length)
        else:
            fetched = True

        request_time_ms = int((time.perf_counter() - start) * 1000)

        # Read content length from content only if available and required
        if content and content_length == 0:
            content_length = utf8len(content)

        app.logger.info(
            "FETCHED: topic=%s duration=%dms status=%s size=%sb",
            feed.topic,
            request_time_ms,
            status_code,
            content_length,
        )

        feed.last_status_code = status_code
        feed.set_last_fetch()
        feed.set_next_scheduled_update()

        stats = FeedStats.create_stats(
            feed.id,
            FetchType.PULL,
            status_code=status_code,
            latency=request_time_ms,
            content_length=content_length,
        )

        # Set feed to inactive if Feed is Gone
        if status_code == 410:
            feed.gone = True

        # Exit if Feed not successfully fetched
        if not fetched:
            return cls.no_change(feed, stats)

        # Set Feed ETag from response
        # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
        etag = headers.get("etag")
        if etag:
            feed.etag = etag

        # Set Feed Last-Modified from response
        # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
        last_modified = headers.get("last-modified")
        if last_modified:
            feed.last_modified = feed.set_last_modified(last_modified)

        # Save and return if not modified code received
        if status_code == 304:
            return cls.no_change(feed, stats)

        # Check if content hash is new
        new_content: DiffResult = feed.is_new_content(content, encoding or "UTF-8")
        app.logger.info(
            "HASH: feed=%s diff=%d threshold=%d original=%s new=%s",
            feed,
            new_content.diff,
            new_content.threshold,
            new_content.hash1,
            new_content.hash2,
        )

        # Save and return if no new content and not forcing update
        if not new_content and not force:
            return cls.no_change(feed, stats)

        db.session.commit()

        # Set content-location header to final url if not already set
        if "content-location" not in headers:
            headers["content-location"] = response_url

        notification_received.send(
            cls,
            feed=feed,
            content_type=parse_options_header(headers.get("content-type")),
            content=content,
            encoding=encoding,
            stats=stats,
            headers=headers_to_dict(headers),
        )
        return True

    def fetch_scheduled_feeds(self) -> None:
        """
        Fetch all scheduled Feeds

        :return: None
        """
        start = time.perf_counter()

        self.to_fetch = self.get_scheduled_feeds(self.max_feeds)

        if not self.to_fetch:
            app.logger.debug("No Feeds to fetch. Exiting.")
            return

        app.logger.info("Fetching Feeds %s", stringify_list(self.to_fetch))

        for feed in self.to_fetch:
            result = self.fetch_feed(feed)
            if result:
                self.fetched.append(feed)

        app.logger.info(
            "Feeds fetched in %dms", int((time.perf_counter() - start) * 1000)
        )

    @classmethod
    def get_scheduled_feeds(cls, max_feeds: int = 10) -> List[Feed]:
        """
        Get all Feeds that are past their next scheduled fetch time

        :param max_feeds: Maximum number of Feeds to fetch
        :return: List of Feeds to fetch
        """
        feeds = (
            Feed.query.filter(
                Feed.next_scheduled_update <= unix_timestamp(), Feed.active == True
            )
            .limit(max_feeds)
            .all()
        )  # noqa

        return feeds

    @classmethod
    def no_change(cls, feed: Feed, stats: dict) -> bool:
        """
        Save FeedStats, commit, and return False

        :param feed: Feed that was fetched
        :param stats: Statistics about Feed fetch
        """
        app.logger.info("No change in %s since fetch at %s", feed, feed.last_fetch)

        # Save Feed Stats and Feed to DB
        FeedStats.save_stats(stats)
        db.session.commit()
        return False


text:
This integrates PayPal for django-shop version 1.0 and above.

## Installation

for django-shop version 1.2.x:

```
pip install djangoshop-paypal<1.3
```

## Configuration

In ``settings.py`` of the merchant's project:

Add ``'shop_paypal'`` to ``INSTALLED_APPS``.

At [PayPal](https://paypal.com/) create a business account and apply for the vendor credentials.
For a testing account add them as:

```
SHOP_PAYPAL = {
    'API_ENDPOINT': 'https://api.sandbox.paypal.com',
    'MODE': 'sandbox',
    'CLIENT_ID': '<client-id-as-provided-by-PayPal>',
    'CLIENT_SECRET': '<client-secret-as-provided-by-PayPal>',
    'PURCHASE_DESCRIPTION': "Thanks for purchasing at My Shop",
}
```

and for production:

```
SHOP_PAYPAL = {
    'API_ENDPOINT': 'https://api.paypal.com',
    'MODE': 'live',
    'CLIENT_ID': '<client-id-as-provided-by-PayPal>',
    'CLIENT_SECRET': '<client-secret-as-provided-by-PayPal>',
    'PURCHASE_DESCRIPTION': "Thanks for purchasing at My Shop",
}
```

Add ``'shop_paypal.modifiers.PaymentModifier'`` to the list of ``SHOP_CART_MODIFIERS``.

Add ``'shop_paypal.payment.OrderWorkflowMixin'`` to the list of ``SHOP_ORDER_WORKFLOWS``.

When rendering the payment method form, "PayPal" shall appear in the list of possible payments.

Successful payments are redirected onto the just created order detail page.

If a payment was rejected by PayPal, **djangoshop-paypal** redirects onto the CMS page with the ID
``shop-cancel-payment``, so make sure that such a page exists.


text:
trezor-qrenc
============

Minimalistic QR Code Generator (Encoder)

- Originally written by Psytec Inc.
- Modified by Alexey Mednyy
- Heavily modified and maintained by Pavol Rusnak
- JavaScript cross-compilation by Karel Bilek using emscripten, with some code from Kazuhiko Arase

Licensed under MIT License


text:
Object: dbug {#dbug}
====================

Wrapper for the firebug console.log() function. No dependencies.

### Tutorial/Demo

* [Online Tutorial/Demo][]
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/01-core/00-dbug

About dbug
----------
dbug is a wrapper for the firebug console plugin for firefox. The syntax for logging is the same as documented at [http://getfirebug.com][].

You can leave *dbug.log()* statements in your code and they will not be echoed out to the screen in any way.

Enabling dbug {#dbug:enable}
----------------------------
To display the dbug statements, you have two options: include **"jsdebug=true"** in the query string of the page and all your dbug statements will be printed as they occur OR **type into the firebug console dbug.enable()** and the debug statements that have occurred up until that point will be echoed, and all others from that point will be printed as they occur. You can also **put dbug.enable() in your page's javascript** to turn it on.

Disabling dbug {#dbug:disable}
------------------------------
*dbug.disable()* will turn it back off.

dbug Properties {#dbug:properties}
----------------------------------
* logged - (*array*) the messages logged previously if *dbug* is not enabled. When *dbug.enable* is invoked, all logged messages are dumped to the console
* firebug - (*boolean*) *true* if firebug (or Moobugger) is present; if *false*, *dbug.enable* will not have any effect
* debug - (*boolean*) *true* if debugging is enabled

dbug Method: log {#dbug:log}
----------------------------

Sends a message to the console if dbug is enabled, otherwise it stores this info until dbug is enabled.

### Syntax

	dbug.log(msg[, msg2, msg3, etc]);

### Arguments

1. (*mixed*) collection of messages to log to the console. You may pass as many as you like.

### Messages

Messages sent to *dbug* methods can contain various substitutions. See [http://getfirebug.com][].

### Examples

	dbug.log("message");
	> message
	dbug.log("my var is %s", myVar);
	> my var is x
	dbug.log($('myelement'));
	>

	dbug.log("myelement: %s, some value: %s", $('myelement'), somevalue);
	> myelement:

, some value: blah

dbug Method: cookie {#dbug:cookie}
----------------------------------

Turns debugging on for the rest of the day for that domain. This lets you click around without having to add jsdebug=true to each new page's url and reload the page or execute *dbug.enable* every time.

Calling dbug.cookie() when the cookie is already present will disable it (toggle).

### Syntax

	dbug.cookie(set);

### Arguments

*  set - (*boolean*, optional) if *true* sets the cookie even if it's already set (overrides toggle), if *false* overrides to disable the cookie (same as [dbug:disableCookie][]);

### Examples

	dbug.cookie(); //toggles debugging state for the current browser session
	dbug.cookie(true); //forces debug cookie to be set, overriding toggle

dbug Method: disableCookie {#dbug:disableCookie}
------------------------------------------------

This removes the cookie set by [dbug:cookie][] and turns off debugging for subsequent page loads.

### Syntax

	dbug.disableCookie(); //cookie is disabled

Additional dbug Methods
-----------------------
See [http://www.getfirebug.com/console.html][] for all the methods that Firebug supports. Each of these methods will be passed through to the console so any of them will work against *dbug*, just as if you had called them against *console*.

### Examples

	dbug.time(); //same as console.time()
	dbug.timeEnd(); //same as console.timeEnd()
	dbug.trace(); //same as console.trace();
	dbug.dir(obj); //same as console.dir(obj);
	//etc

Script: dbugScripts.js {#dbugScripts-js}
========================================

This stand-alone script allows you to debug against a live environment by discarding the live version of a library (typically compressed with no line breaks or comments) in exchange for a non-live one (typically uncompressed). This provides two primary benefits:

1. you can test against an environment using a non-compressed version of the library
2. you can test against an environment without changing it (i.e. test against a live environment with non-production ready code)

This is the entirety of the method:

	function dbugScripts(baseurl,libs){
		var value = document.cookie.match('(?:^|;)\\s*jsdebug=([^;]*)');
		var debugCookie = value ? unescape(value[1]) : false;
		if(window.location.href.indexOf("basePath=this")>0){
			var path=baseurl.substring(baseurl.substring(7,baseurl.length).indexOf("/")+8,baseurl.length);
			var href=window.location.href;
			baseurl=href.substring(href.substring(7,href.length).indexOf("/")+8,href.length);
		}
		if(window.location.href.indexOf("jsdebug=true")>0 || window.location.href.indexOf("jsdebugCookie=true")>0 || debugCookie == 'true'){
			if (libs) {
				for(var i=0;i<libs.length;i++){
					document.write("<scri"+"pt src=\""+baseurl+libs[i]+"\" type=\"text/javascript\"></sc"+"ript>");
				}
			} else {
				document.write("<scri"+"pt src=\""+baseurl+"\" type=\"text/javascript\"></scr"+"ipt>");
			}
			return true;
		}
		return false;
	};

### Tutorial/Demo

* [Online Tutorial/Demo][]
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/01-core/00-dbug#dbugscripts

Function: dbugScripts {#dbugScripts}
------------------------------------

### Syntax

	if(!dbugScripts(baseHref[, scripts]) {
		//...compressed code
	}

### Arguments

1. baseHref - (*string*) the url to the common directory containing all the compressed scripts OR the url to a single js file
2. libs - (*array*, optional) a list of file locations relative to the baseHref to each of the files contained in the library

### Details

If you include this method at the top of your first library you then can wrap your compressed library with a conditional for debugging:

	if (!dbugScritps("http://test.foo.com", ["library.js", "library2.js"]) {
		//...compressed library.js goes here
		//...compressed library2.js goes here
	}

If your compressed document only includes one file, you don't have to use the second argumnet:

	if (!dbugScripts("http://test.foo.com/foo.js")) {
		//...compressed foo.js goes here
	}

Then, using the enabling methods described in dbug.js above (see [dbug:enable][] & [dbug:cookie][]) you can switch between the uncompressed library and the compressed (live) one.

[dbug:disableCookie]: #dbug:disableCookie
[dbug:enable]: #dbug:enable
[dbug:cookie]: #dbug:cookie
[http://getfirebug.com]: http://getfirebug.com
[http://www.getfirebug.com/console.html]: http://www.getfirebug.com/console.html


text:
namespace Squire.Setup
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public static class GenericSetupExtensions
    {
        public static IAppSetup<T> Setup<T>(this T application)
        {
            return new AppSetup<T>(application);
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.cloud.paas.portal.persistence.AccountNumberMapper">

	<select id="getAccountNumberByLoginName" parameterType="AccountNumberCondition" resultType="AccountNumber">
		SELECT
			a.ACCOUNT_NUMBER_ID,
			a.LOGIN_NAME,
			a.LOGIN_PASSWORD,
			a.AVATAR,
			a.EMAIL,
			a.`NAME`,
			a.MOBILE_NUMBER,
			a.`STATUS`,
			a.SORT_NUMBER
		FROM
			tpt_account_number a
		WHERE
		  a.LOGIN_NAME = #{loginName}

	</select>

	<select id="list" parameterType="AccountNumberCondition" resultType="AccountNumber">
		SELECT
			a.ACCOUNT_NUMBER_ID,
			a.`NAME`,
			a.LOGIN_NAME,
			a.`STATUS`,
			a.MOBILE_NUMBER,
			a.SORT_NUMBER,
			a.AVATAR
		FROM
			TPT_ACCOUNT_NUMBER a
		WHERE
			1 = 1
		<if test="name!=null and name!=''">
			AND a.`NAME` like CONCAT('%',#{name},'%')
		</if>
		<if test="loginName!=null and loginName!=''">
			AND a.LOGIN_NAME like CONCAT('%',#{loginName},'%')
		</if>
		<if test="mobileNumber!=null and mobileNumber!=''">
			AND a.MOBILE_NUMBER like CONCAT('%',#{mobileNumber},'%')
		</if>
		<if test="status !=null and status != ''">
			and a.`STATUS` = #{status}
		</if>
		<if test="accountNumberId !=null and accountNumberId != ''">
			AND a.`ACCOUNT_NUMBER_ID` = #{accountNumberId}
		</if>
	</select>

	<select id="get" parameterType="String" resultType="AccountNumber">
		SELECT
			a.ACCOUNT_NUMBER_ID,
			a.LOGIN_NAME,
			a.LOGIN_PASSWORD,
			a.AVATAR,
			a.EMAIL,
			a.`NAME`,
			a.MOBILE_NUMBER,
		    a.SORT_NUMBER,
		    a.`STATUS`
		FROM
			tpt_account_number a
		WHERE
			a.ACCOUNT_NUMBER_ID = #{accountNumberId}
	</select>

</mapper>


text:
require 'sleeping_king_studios/tasks/apps/applications_task'
require 'sleeping_king_studios/tasks/apps/bundle'
require 'sleeping_king_studios/tasks/apps/bundle/install_runner'

module SleepingKingStudios::Tasks::Apps::Bundle
  # Defines a Thor task for installing gem dependencies for each application.
  class InstallTask < SleepingKingStudios::Tasks::Task
    include SleepingKingStudios::Tasks::Apps::ApplicationsTask

    def self.description
      'Installs the Ruby gem dependencies for each application.'
    end # class method description

    def call *applications
      filtered = filter_applications(:only => applications)

      gemfiles(filtered).each do |gemfile|
        say %(\nInstalling gems for gemfile "#{gemfile}")
        say '-' * 80
        say "\n"

        install_runner.call(gemfile)
      end # each
    end # method call

    private

    def gemfiles applications
      applications.map { |_, config| config.gemfile }.uniq
    end # method gemfiles

    def install_runner
      @install_runner =
        SleepingKingStudios::Tasks::Apps::Bundle::InstallRunner.new
    end # method install_runner
  end # module
end # module


text:
.syntax .preprocessor {
  text-decoration: underline; }


text:
import { Assertion } from "./index";

export const toBeInstanceOf = <T>(expected: new () => any) => (
  actual: T
): Assertion<T> => {
  return {
    value: actual,
    pass: actual instanceof expected,
    message: `is instanceof ${expected.name}`,
  };
};


text:
package eu.fbk.knowledgestore.filestore;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import eu.fbk.knowledgestore.data.Stream;
import eu.fbk.knowledgestore.runtime.Component;

/**
 * A storage for resource files, supporting CRUD operations.
 * <p>
 * A {@code FileStore} abstracts the way resource files are stored in the KnowledgeStore allowing
 * different implementations to be plugged in. A {@code FileStore} stores a list of files each
 * identified by a filename, with no (visible) directory structure. Files can be listed (
 * {@link #list()}), written ({@link #write(String)}), read ( {@link #read(String)}) or deleted (
 * {@link #delete(String)}), but not modified after they are written the first time. Note that a
 * {@code FileStore} obeys the general contract and lifecycle of {@link Component}.
 * </p>
 */
public interface FileStore extends Component {

    /**
     * Read a file stored on the {@code FileStore}. The method returns an {@code InputStream} over
     * the content of the file, starting from its first byte. Sequential access and forward
     * seeking ( {@link InputStream#skip(long)}) are supported. Note that multiple concurrent read
     * operations on the same file are allowed.
     *
     * @param filename
     *            the name of the file
     * @return an {@code InputStream} allowing access to the content of the file
     * @throws FileMissingException
     *             in case no file exists for the name specified, resulting either from a caller
     *             error or from an external modification (deletion) to the {@code FileStore}
     * @throws IOException
     *             in case the file cannot be accessed for whatever reason, with no implication on
     *             the fact that the file exists or does not exist (e.g., the whole
     *             {@code FileStore} may temporarily be not accessible)
     */
    InputStream read(String filename) throws FileMissingException, IOException;

    /**
     * Writes a new file to the {@code FileStore}. The method creates a file with the name
     * specified, and returns an {@code OutputStream} that can be used to write the content of the
     * file. Writing is completed by closing that stream, which forces written data to be flushed
     * to disk; errors in writing the file may result in the stream being forcedly closed and a
     * truncated file to be written. The file being written may be listed by {@link #list()}
     * (depending on the {@code FileStore} implementation) but should not be accessed for read or
     * deletion until writing is completed; the consequences of doing so are not specified.
     *
     * @param filename
     *            the name of the file
     * @return an {@code OutputStream} where the content of the file can be written to
     * @throws FileExistsException
     *             in case a file with the same name already exists, resulting either from a
     *             caller error or from an external modification (file creation) to the
     *             {@code FileStore}.
     * @throws IOException
     *             in case the file cannot be created for whatever reason, with no implication on
     *             the fact that another file with the same name already exists
     */
    OutputStream write(String filename) throws FileExistsException, IOException;

    /**
     * Deletes a file on the {@code FileStore}. An exception is thrown if the file specified does
     * not exist. After the method returns, the file cannot be accessed anymore from
     * {@link #read(String)} or {@link #delete(String)}. Deleting a file being read is allowed and
     * eventually results in the deletion of the file; whether the concurrent read operation fails
     * or is permitted to complete is an implementation detail.
     *
     * @param filename
     *            the name of the file
     * @throws FileMissingException
     *             in case the file specified does not exist, possibly because of an external
     *             modification to the {@code FileStore}
     * @throws IOException
     *             in case the file cannot be accessed for whatever reason, with no implication on
     *             the fact that the file specified actually exists
     */
    void delete(String filename) throws FileMissingException, IOException;

    /**
     * Lists all the files stored on the {@code FileStore}. The method returns a {@code Stream}
     * supporting streaming access to the names of the files stored in the {@code FileStore}.
     * Concurrent modifications to the {@code FileStore} ({@link #write(String)},
     * {@link #delete(String)}) may be supported, depending on the implementation: in that case,
     * the stream may either reflect the status before or after the concurrent modification.
     *
     * @return a stream over the names of the files stored in the {@code FileStore}
     * @throws IOException
     *             in case of failure, for whatever reason
     */
    Stream<String> list() throws IOException;

}


text:
<?php

class Google_Service_CloudDatabaseMigrationService_MySqlConnectionProfile extends Google_Model
{
  public $cloudSqlId;
  public $host;
  public $password;
  public $passwordSet;
  public $port;
  protected $sslType = 'Google_Service_CloudDatabaseMigrationService_SslConfig';
  protected $sslDataType = '';
  public $username;

  public function setCloudSqlId($cloudSqlId)
  {
    $this->cloudSqlId = $cloudSqlId;
  }
  public function getCloudSqlId()
  {
    return $this->cloudSqlId;
  }
  public function setHost($host)
  {
    $this->host = $host;
  }
  public function getHost()
  {
    return $this->host;
  }
  public function setPassword($password)
  {
    $this->password = $password;
  }
  public function getPassword()
  {
    return $this->password;
  }
  public function setPasswordSet($passwordSet)
  {
    $this->passwordSet = $passwordSet;
  }
  public function getPasswordSet()
  {
    return $this->passwordSet;
  }
  public function setPort($port)
  {
    $this->port = $port;
  }
  public function getPort()
  {
    return $this->port;
  }
  /**
   * @param Google_Service_CloudDatabaseMigrationService_SslConfig
   */
  public function setSsl(Google_Service_CloudDatabaseMigrationService_SslConfig $ssl)
  {
    $this->ssl = $ssl;
  }
  /**
   * @return Google_Service_CloudDatabaseMigrationService_SslConfig
   */
  public function getSsl()
  {
    return $this->ssl;
  }
  public function setUsername($username)
  {
    $this->username = $username;
  }
  public function getUsername()
  {
    return $this->username;
  }
}


text:
function  mean_bt_counts(data){
  var scalar = 100;
  d3.select("#finally-a-plot")
    .append("div")
    .attr("class", "chart")
    .selectAll(".bar")
    .data(data.total)
    .enter()
    .append("div")
    .attr("class", "bar")
    .text(function(d){return Math.round(d.count)});

  // I haven't figure out how to update the CSS
  // in sphinx, so this is the other way to style it
  d3.select("#finally-a-plot")
    .selectAll(".bar")
    .style("width", function(d){return d.count/scalar + "px"})
    .style("background-color", "DarkRed")
    .style("color", "white")
    .style("margin-bottom", '2px')
    .style("text-align", "right")
    .style("font-family", "sans-serif")
}


text:
require 'active_record'
require_relative 'config'

module FootballArRepository::EstablishConnection
ActiveRecord::Base.establish_connection(
:adapter => FootballArRepository::Config::DB_Adapter,
:pool => 25,
:mode => FootballArRepository::Config::DB_Mode,
:dsn => FootballArRepository::Config::DB_DSN  )
end


text:
package org.webcurator.ui.report.validator;

import static org.junit.Assert.*;

import org.junit.Test;
import org.springframework.context.MockMessageSource;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.webcurator.test.BaseWCTTest;
import org.webcurator.ui.report.command.ReportCommand;
import org.webcurator.ui.util.DateUtils;

import java.util.*;

public class ReportValidatorTest extends BaseWCTTest<ReportValidator>{

	public ReportValidatorTest()
	{
		super(ReportValidator.class,"");
	}

	public void setUp() throws Exception
	{
		super.setUp();
		DateUtils.get().setMessageSource(new MockMessageSource());
	}

	@Test
	public final void testSupports() {
		assertTrue(testInstance.supports(ReportCommand.class));
	}

	@Test
	public final void testValidateCase01() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("System Usage Report");
			parameters.add("startDate");
			parameters.add("01/01/2008");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("Start Date");
			parameters.add("false");

			parameters.add("System Usage Report");
			parameters.add("endDate");
			parameters.add("31/12/2008");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("End Date");
			parameters.add("false");

			parameters.add("System Usage Report");
			parameters.add("agency");
			parameters.add("All Agencies");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Agencies");
			parameters.add("true");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("System Usage Report");

			// pass in parameters, expect no errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case01: Not expecting errors with valid parameters", 0, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

	@Test
	public final void testValidateCase02() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("System Usage Report");
			parameters.add("startDate");
			parameters.add("");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("Start Date");
			parameters.add("false");

			parameters.add("System Usage Report");
			parameters.add("endDate");
			parameters.add("");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("End Date");
			parameters.add("false");

			parameters.add("System Usage Report");
			parameters.add("agency");
			parameters.add("All Agencies");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Agencies");
			parameters.add("true");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("System Usage Report");

			// pass in parameters, expect two errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case02: Expecting two errors with invalid parameters", 2, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

	@Test
	public final void testValidateCase03() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("System Activity Report");
			parameters.add("startDate");
			parameters.add("01/01/2008");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("Start Date");
			parameters.add("false");

			parameters.add("System Activity Report");
			parameters.add("endDate");
			parameters.add("31/12/2008");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("End Date");
			parameters.add("false");

			parameters.add("System Activity Report");
			parameters.add("agency");
			parameters.add("All Agencies");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Agencies");
			parameters.add("true");

			parameters.add("System Activity Report");
			parameters.add("user");
			parameters.add("All users");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Users");
			parameters.add("true");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("System Activity Report");

			// pass in parameters, expect no errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case03: Not expecting errors with valid parameters", 0, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

	@Test
	public final void testValidateCase04() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("System Activity Report");
			parameters.add("startDate");
			parameters.add("");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("Start Date");
			parameters.add("false");

			parameters.add("System Activity Report");
			parameters.add("endDate");
			parameters.add("");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("End Date");
			parameters.add("false");

			parameters.add("System Activity Report");
			parameters.add("agency");
			parameters.add("All Agencies");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Agencies");
			parameters.add("true");

			parameters.add("System Activity Report");
			parameters.add("user");
			parameters.add("All users");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Users");
			parameters.add("true");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("System Activity Report");

			// pass in parameters, expect two errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case04: Expecting two errors with invalid parameters", 2, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

	@Test
	public final void testValidateCase05() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("Crawler Activity Report");
			parameters.add("startDate");
			parameters.add("01/01/2008");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("Start Date");
			parameters.add("false");

			parameters.add("Crawler Activity Report");
			parameters.add("endDate");
			parameters.add("31/12/2008");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("End Date");
			parameters.add("false");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("Crawler Activity Report");

			// pass in parameters, expect no errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case05: Not expecting errors with valid parameters", 0, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

	@Test
	public final void testValidateCase06() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("Crawler Activity Report");
			parameters.add("startDate");
			parameters.add("");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("Start Date");
			parameters.add("false");

			parameters.add("Crawler Activity Report");
			parameters.add("endDate");
			parameters.add("");
			parameters.add("org.webcurator.core.report.parameter.DateParameter");
			parameters.add("End Date");
			parameters.add("false");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("Crawler Activity Report");

			// pass in parameters, expect two errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case06: Expecting two errors with invalid parameters", 2, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

	@Test
	public final void testValidateCase07() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("Target/Group Schedules Report");
			parameters.add("agency");
			parameters.add("All agencies");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Agencies");
			parameters.add("true");

			parameters.add("Target/Group Schedules Report");
			parameters.add("users");
			parameters.add("All users");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Users");
			parameters.add("true");

			parameters.add("Target/Group Schedules Report");
			parameters.add("targettype");
			parameters.add("All target types");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Target Types");
			parameters.add("true");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("Target/Group Schedules Report");

			// pass in parameters, expect no errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case09: Not expecting errors with valid parameters", 0, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

	@Test
	public final void testValidateCase08() {
		try {
			ReportCommand cmd = new ReportCommand();
			Errors errors = new BindException(cmd, "ReportCommand");

			List<String> parameters = new ArrayList<String>();
			parameters.add("Summary Target Schedules Report");
			parameters.add("agency");
			parameters.add("All agencies");
			parameters.add("org.webcurator.core.report.parameter.StringParameter");
			parameters.add("Agencies");
			parameters.add("true");

			cmd.setParameters(parameters);
			cmd.setSelectedReport("Summary Target Schedules Report");

			// pass in parameters, expect no errors.
			testInstance.validate(cmd, errors);
			assertEquals("Case09: Not expecting errors with valid parameters", 0, errors.getErrorCount());
		}
		catch (Exception e)
		{
			String message = e.getClass().toString() + " - " + e.getMessage();
			log.debug(message);
			fail(message);
		}
	}

}


text:
package org.kaaproject.kaa.server.operations.service.logs;

import org.junit.Before;
import org.junit.Test;
import org.kaaproject.kaa.common.dto.logs.LogAppenderDto;
import org.kaaproject.kaa.server.common.log.shared.appender.LogAppender;
import org.kaaproject.kaa.server.common.log.shared.appender.LogDeliveryCallback;
import org.kaaproject.kaa.server.common.log.shared.appender.LogEventPack;

public class DefaultLogAppenderBuilderTest {

  LogAppenderBuilder builder;

  @Before
  public void before() {
    builder = new DefaultLogAppenderBuilder();
  }

  @Test(expected = IllegalArgumentException.class)
  public void testNullAppenderConfig() throws ReflectiveOperationException {
    builder.getAppender(null);
  }

  @Test(expected = ReflectiveOperationException.class)
  public void testGetNotExistingAppender() throws ReflectiveOperationException {
    LogAppenderDto dto = new LogAppenderDto();
    dto.setPluginClassName("not.existing.class.name");
    builder.getAppender(dto);
  }

  @Test(expected = ReflectiveOperationException.class)
  public void testGetProtectedAppender() throws ReflectiveOperationException {
    LogAppenderDto dto = new LogAppenderDto();
    dto.setPluginClassName(TestPrivateAppender.class.getName());
    builder.getAppender(dto);
  }

  @Test
  public void testGetPublicAppender() throws ReflectiveOperationException {
    LogAppenderDto dto = new LogAppenderDto();
    dto.setPluginClassName(TestPublicAppender.class.getName());
    builder.getAppender(dto);
  }

  public static class TestPrivateAppender extends TestPublicAppender {
    private TestPrivateAppender() {
      super();
    }
  }

  public static class TestPublicAppender implements LogAppender {
    public TestPublicAppender() {
      super();
    }

    @Override
    public String getName() {
      return null;
    }

    @Override
    public void setName(String name) {
    }

    @Override
    public String getAppenderId() {
      return null;
    }

    @Override
    public void setAppenderId(String appenderId) {
    }

    @Override
    public void setApplicationToken(String applicationToken) {
    }

    @Override
    public void init(LogAppenderDto appender) {
    }

    @Override
    public void doAppend(LogEventPack logEventPack, LogDeliveryCallback callback) {
    }

    @Override
    public void close() {
    }

    @Override
    public boolean isSchemaVersionSupported(int version) {
      return true;
    }

    @Override
    public boolean isDeliveryConfirmationRequired() {
      return false;
    }
  }
}


text:
Contributing to Bolt
====================

If you are reading this, you must be considering opening an issue for help with
a bug, to suggest a new feature or help out with a Pull Request. Great!

To streamline this process, we've made this small document, to help you report
your issue or feature more efficiently. We did our best to keep it brief, so
please read it carefully.

Jump to the relevant section below:

 - [1. I'm reporting a bug](#1-im-reporting-a-bug)
 - [2. I'd like to request/propose a feature](#2-id-like-to-requestpropose-a-feature)
 - [3. I'm making a pull request](#3-im-making-a-pull-request)

**Note:** Please don't use our main GitHub repository for reporting bugs
with _extensions_. If you have found a bug in an extension, the best place to
report this would be in the extension's own repository, so that the original
author can look into it.

1. I'm reporting a bug
----------------------

If you think you've found a bug, try to make sure it's actually a bug, and not
the result of something else going wrong. For example, make sure your webserver
is functioning correctly, and try the issue in another browser, if possible. Be
sure to **search for similar bugs**. Perhaps somebody has already reported the
issue. If so, you should add any additional information to the existing bug. It
might make it easier for us to fix, and at the very least it'll get bumped
higher onto the list.

After you've done these things, and you are fairly certain you've found a new
bug, please open an issue to report it. Create a [GitHub account](https://github.com),
if you don't have one yet.

When posting your bug, please include the following:

 1. **Bug summary**: Write a short summary of the bug. Try to pinpoint it as
    much a possible. Try to state the _actual problem_, and not just what you
    _think_ the solution might be.
 2. **Specifics**: Mention the URL where this bug occurs, if applicable. What
    version of Bolt are you using (down to the very last digit!), and what
    method did you use to install it? What browser and version are you using?
    Please mention if you've checked it in other browsers as well.
 3. **Steps to reproduce**: Clearly mention the steps to reproduce the bug.
 4. **Expected result**: What did you _expect_ that would happen on your Bolt
    site? Describe the intended outcome after you did the steps mentioned
    before.
 5. **Actual result**: What is the actual result of the above steps? So,
    describe the behavior of the bug. Please, please include **Error messages**
    and screenshots. They might mean nothing to you, but they are _very_ helpful
    to us.

Further reading: [10 tips for better Pull Requests](http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/)

#### Reporting security issues

If you wish to contact us privately about any possible security issues in Bolt,
please contact us at [security@bolt.cm](mailto:security@bolt.cm). Your email
will be handled confidentially. After fixing them, you will be credited for any
security issues that you may have discovered.

2. I'd like to request/propose a feature
----------------------------------------

We get a lot of feature requests for Bolt, and we can't do them all, even if we
wanted to. In fact, since Bolt is designed to be 'simple, sophisticated and
straightforward', not all feature requests might be a good fit for Bolt. Be sure
to read [our manifesto](https://docs.bolt.cm/manifesto) to get an idea of our
goals and values.

If you're proposing an idea, with the intent to work on it yourself, please open
an issue with a title like `[RFC] Wouldn't it be swell, if we had [X]?`. That
will make it obvious that you're open for discussion about the feature, and that
it'll be a good fit for Bolt itself, or that it might be better suited as an
extension. If you want to discuss your idea first, before 'officially' posting
it, you can always join us on [IRC](http://bolt.cm/community).

On the other hand, if you have a suggestion for a cool new feature, but don't
have the skill to work on it yourself, we'll gladly read it, and comment on it,
but we can't make any promises as to when/if it'll be realised.

3. I'm making a pull request
----------------------------

Your contributions to the project are very welcome. If you would like to fix a
bug or implement a proposed feature, you can submit a Pull Request. To help us
merge your Pull Request, please make sure you follow these points:

 1. Describe the problem clearly in the Pull Request description.
 2. Please refer to a bug report on the issue list. An example of a good title
    is "Fixes problem [x] by doing [y]. Fixes #1555"
 3. If you're doing a PR for a non-trivial new feature, _please_ make an `RFC`
    issue first, as described above.
 4. Do not edit compiled asset files such as `bolt.min.js` or `bolt.css`.
    Instead, edit the source javascript and Sass files inside the `/app/src/`
    directory. We'll handle the updated compiled files.
 5. For any change that you make, **please try to also add a test case(s)** in
    the `tests` directory.

Make sure you read our guide on [Contributing to
Bolt](https://docs.bolt.cm/internals/contributing), the page on [Code
Quality](https://docs.bolt.cm/internals/code-quality) and the page describing
our [Release process](https://docs.bolt.cm/internals/release-process).

Further reading:
 - [Creating a pull request](https://help.github.com/articles/creating-a-pull-request/)
 - [Pull Request Tutorial](http://yangsu.github.io/pull-request-tutorial/)

Thank you for your contributions!

And finally, **one last tip**: Mention that you do not like
[brown M&M's](http://www.snopes.com/music/artists/vanhalen.asp). If you do,
we'll know you've read this page. ;-)


text:
<?php
/**
 * Appointment
 *
 * PHP version 5
 *
 * @category Class
 * @package  Swagger\Client
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * MINDBODY Public API
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v6
 *
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 2.4.6
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace Swagger\Client\Model;

use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;

/**
 * Appointment Class Doc Comment
 *
 * @category Class
 * @description Contains information about an appointment.
 * @package  Swagger\Client
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class Appointment implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $swaggerModelName = 'Appointment';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'gender_preference' => 'string',
        'duration' => 'int',
        'provider_id' => 'string',
        'id' => 'int',
        'status' => 'string',
        'start_date_time' => '\DateTime',
        'end_date_time' => '\DateTime',
        'notes' => 'string',
        'staff_requested' => 'bool',
        'program_id' => 'int',
        'session_type_id' => 'int',
        'location_id' => 'int',
        'staff_id' => 'int',
        'client_id' => 'string',
        'first_appointment' => 'bool',
        'client_service_id' => 'int',
        'resources' => '\Swagger\Client\Model\Resource[]'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'gender_preference' => null,
        'duration' => 'int32',
        'provider_id' => null,
        'id' => 'int64',
        'status' => null,
        'start_date_time' => 'date-time',
        'end_date_time' => 'date-time',
        'notes' => null,
        'staff_requested' => null,
        'program_id' => 'int32',
        'session_type_id' => 'int32',
        'location_id' => 'int32',
        'staff_id' => 'int64',
        'client_id' => null,
        'first_appointment' => null,
        'client_service_id' => 'int64',
        'resources' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'gender_preference' => 'GenderPreference',
        'duration' => 'Duration',
        'provider_id' => 'ProviderId',
        'id' => 'Id',
        'status' => 'Status',
        'start_date_time' => 'StartDateTime',
        'end_date_time' => 'EndDateTime',
        'notes' => 'Notes',
        'staff_requested' => 'StaffRequested',
        'program_id' => 'ProgramId',
        'session_type_id' => 'SessionTypeId',
        'location_id' => 'LocationId',
        'staff_id' => 'StaffId',
        'client_id' => 'ClientId',
        'first_appointment' => 'FirstAppointment',
        'client_service_id' => 'ClientServiceId',
        'resources' => 'Resources'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'gender_preference' => 'setGenderPreference',
        'duration' => 'setDuration',
        'provider_id' => 'setProviderId',
        'id' => 'setId',
        'status' => 'setStatus',
        'start_date_time' => 'setStartDateTime',
        'end_date_time' => 'setEndDateTime',
        'notes' => 'setNotes',
        'staff_requested' => 'setStaffRequested',
        'program_id' => 'setProgramId',
        'session_type_id' => 'setSessionTypeId',
        'location_id' => 'setLocationId',
        'staff_id' => 'setStaffId',
        'client_id' => 'setClientId',
        'first_appointment' => 'setFirstAppointment',
        'client_service_id' => 'setClientServiceId',
        'resources' => 'setResources'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'gender_preference' => 'getGenderPreference',
        'duration' => 'getDuration',
        'provider_id' => 'getProviderId',
        'id' => 'getId',
        'status' => 'getStatus',
        'start_date_time' => 'getStartDateTime',
        'end_date_time' => 'getEndDateTime',
        'notes' => 'getNotes',
        'staff_requested' => 'getStaffRequested',
        'program_id' => 'getProgramId',
        'session_type_id' => 'getSessionTypeId',
        'location_id' => 'getLocationId',
        'staff_id' => 'getStaffId',
        'client_id' => 'getClientId',
        'first_appointment' => 'getFirstAppointment',
        'client_service_id' => 'getClientServiceId',
        'resources' => 'getResources'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$swaggerModelName;
    }

    const GENDER_PREFERENCE_NONE = 'None';
    const GENDER_PREFERENCE_FEMALE = 'Female';
    const GENDER_PREFERENCE_MALE = 'Male';
    const STATUS_NONE = 'None';
    const STATUS_REQUESTED = 'Requested';
    const STATUS_BOOKED = 'Booked';
    const STATUS_COMPLETED = 'Completed';
    const STATUS_CONFIRMED = 'Confirmed';
    const STATUS_ARRIVED = 'Arrived';
    const STATUS_NO_SHOW = 'NoShow';
    const STATUS_CANCELLED = 'Cancelled';
    const STATUS_LATE_CANCELLED = 'LateCancelled';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getGenderPreferenceAllowableValues()
    {
        return [
            self::GENDER_PREFERENCE_NONE,
            self::GENDER_PREFERENCE_FEMALE,
            self::GENDER_PREFERENCE_MALE,
        ];
    }

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getStatusAllowableValues()
    {
        return [
            self::STATUS_NONE,
            self::STATUS_REQUESTED,
            self::STATUS_BOOKED,
            self::STATUS_COMPLETED,
            self::STATUS_CONFIRMED,
            self::STATUS_ARRIVED,
            self::STATUS_NO_SHOW,
            self::STATUS_CANCELLED,
            self::STATUS_LATE_CANCELLED,
        ];
    }

    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['gender_preference'] = isset($data['gender_preference']) ? $data['gender_preference'] : null;
        $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null;
        $this->container['provider_id'] = isset($data['provider_id']) ? $data['provider_id'] : null;
        $this->container['id'] = isset($data['id']) ? $data['id'] : null;
        $this->container['status'] = isset($data['status']) ? $data['status'] : null;
        $this->container['start_date_time'] = isset($data['start_date_time']) ? $data['start_date_time'] : null;
        $this->container['end_date_time'] = isset($data['end_date_time']) ? $data['end_date_time'] : null;
        $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null;
        $this->container['staff_requested'] = isset($data['staff_requested']) ? $data['staff_requested'] : null;
        $this->container['program_id'] = isset($data['program_id']) ? $data['program_id'] : null;
        $this->container['session_type_id'] = isset($data['session_type_id']) ? $data['session_type_id'] : null;
        $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null;
        $this->container['staff_id'] = isset($data['staff_id']) ? $data['staff_id'] : null;
        $this->container['client_id'] = isset($data['client_id']) ? $data['client_id'] : null;
        $this->container['first_appointment'] = isset($data['first_appointment']) ? $data['first_appointment'] : null;
        $this->container['client_service_id'] = isset($data['client_service_id']) ? $data['client_service_id'] : null;
        $this->container['resources'] = isset($data['resources']) ? $data['resources'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        $allowedValues = $this->getGenderPreferenceAllowableValues();
        if (!is_null($this->container['gender_preference']) && !in_array($this->container['gender_preference'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'gender_preference', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        $allowedValues = $this->getStatusAllowableValues();
        if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'status', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }

    /**
     * Gets gender_preference
     *
     * @return string
     */
    public function getGenderPreference()
    {
        return $this->container['gender_preference'];
    }

    /**
     * Sets gender_preference
     *
     * @param string $gender_preference The preferred gender of the appointment provider.
     *
     * @return $this
     */
    public function setGenderPreference($gender_preference)
    {
        $allowedValues = $this->getGenderPreferenceAllowableValues();
        if (!is_null($gender_preference) && !in_array($gender_preference, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'gender_preference', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['gender_preference'] = $gender_preference;

        return $this;
    }

    /**
     * Gets duration
     *
     * @return int
     */
    public function getDuration()
    {
        return $this->container['duration'];
    }

    /**
     * Sets duration
     *
     * @param int $duration The duration of the appointment.
     *
     * @return $this
     */
    public function setDuration($duration)
    {
        $this->container['duration'] = $duration;

        return $this;
    }

    /**
     * Gets provider_id
     *
     * @return string
     */
    public function getProviderId()
    {
        return $this->container['provider_id'];
    }

    /**
     * Sets provider_id
     *
     * @param string $provider_id If a user has Complementary and Alternative Medicine features enabled, this property indicates the provider assigned to the appointment.
     *
     * @return $this
     */
    public function setProviderId($provider_id)
    {
        $this->container['provider_id'] = $provider_id;

        return $this;
    }

    /**
     * Gets id
     *
     * @return int
     */
    public function getId()
    {
        return $this->container['id'];
    }

    /**
     * Sets id
     *
     * @param int $id The unique ID of the appointment.
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->container['id'] = $id;

        return $this;
    }

    /**
     * Gets status
     *
     * @return string
     */
    public function getStatus()
    {
        return $this->container['status'];
    }

    /**
     * Sets status
     *
     * @param string $status The status of this appointment.
     *
     * @return $this
     */
    public function setStatus($status)
    {
        $allowedValues = $this->getStatusAllowableValues();
        if (!is_null($status) && !in_array($status, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'status', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['status'] = $status;

        return $this;
    }

    /**
     * Gets start_date_time
     *
     * @return \DateTime
     */
    public function getStartDateTime()
    {
        return $this->container['start_date_time'];
    }

    /**
     * Sets start_date_time
     *
     * @param \DateTime $start_date_time The date and time the appointment is to start.
     *
     * @return $this
     */
    public function setStartDateTime($start_date_time)
    {
        $this->container['start_date_time'] = $start_date_time;

        return $this;
    }

    /**
     * Gets end_date_time
     *
     * @return \DateTime
     */
    public function getEndDateTime()
    {
        return $this->container['end_date_time'];
    }

    /**
     * Sets end_date_time
     *
     * @param \DateTime $end_date_time The date and time the appointment is to end.
     *
     * @return $this
     */
    public function setEndDateTime($end_date_time)
    {
        $this->container['end_date_time'] = $end_date_time;

        return $this;
    }

    /**
     * Gets notes
     *
     * @return string
     */
    public function getNotes()
    {
        return $this->container['notes'];
    }

    /**
     * Sets notes
     *
     * @param string $notes Any notes associated with the appointment.
     *
     * @return $this
     */
    public function setNotes($notes)
    {
        $this->container['notes'] = $notes;

        return $this;
    }

    /**
     * Gets staff_requested
     *
     * @return bool
     */
    public function getStaffRequested()
    {
        return $this->container['staff_requested'];
    }

    /**
     * Sets staff_requested
     *
     * @param bool $staff_requested When `true`, indicates that the staff member was requested specifically by the client.
     *
     * @return $this
     */
    public function setStaffRequested($staff_requested)
    {
        $this->container['staff_requested'] = $staff_requested;

        return $this;
    }

    /**
     * Gets program_id
     *
     * @return int
     */
    public function getProgramId()
    {
        return $this->container['program_id'];
    }

    /**
     * Sets program_id
     *
     * @param int $program_id The ID of the program to which this appointment belongs.
     *
     * @return $this
     */
    public function setProgramId($program_id)
    {
        $this->container['program_id'] = $program_id;

        return $this;
    }

    /**
     * Gets session_type_id
     *
     * @return int
     */
    public function getSessionTypeId()
    {
        return $this->container['session_type_id'];
    }

    /**
     * Sets session_type_id
     *
     * @param int $session_type_id The ID of the session type of this appointment.
     *
     * @return $this
     */
    public function setSessionTypeId($session_type_id)
    {
        $this->container['session_type_id'] = $session_type_id;

        return $this;
    }

    /**
     * Gets location_id
     *
     * @return int
     */
    public function getLocationId()
    {
        return $this->container['location_id'];
    }

    /**
     * Sets location_id
     *
     * @param int $location_id The ID of the location where this appointment is to take place.
     *
     * @return $this
     */
    public function setLocationId($location_id)
    {
        $this->container['location_id'] = $location_id;

        return $this;
    }

    /**
     * Gets staff_id
     *
     * @return int
     */
    public function getStaffId()
    {
        return $this->container['staff_id'];
    }

    /**
     * Sets staff_id
     *
     * @param int $staff_id The ID of the staff member providing the service for this appointment.
     *
     * @return $this
     */
    public function setStaffId($staff_id)
    {
        $this->container['staff_id'] = $staff_id;

        return $this;
    }

    /**
     * Gets client_id
     *
     * @return string
     */
    public function getClientId()
    {
        return $this->container['client_id'];
    }

    /**
     * Sets client_id
     *
     * @param string $client_id The RSSID of the client who is booked for this appointment.
     *
     * @return $this
     */
    public function setClientId($client_id)
    {
        $this->container['client_id'] = $client_id;

        return $this;
    }

    /**
     * Gets first_appointment
     *
     * @return bool
     */
    public function getFirstAppointment()
    {
        return $this->container['first_appointment'];
    }

    /**
     * Sets first_appointment
     *
     * @param bool $first_appointment When `true`, indicates that this is the client's first appointment at this site.
     *
     * @return $this
     */
    public function setFirstAppointment($first_appointment)
    {
        $this->container['first_appointment'] = $first_appointment;

        return $this;
    }

    /**
     * Gets client_service_id
     *
     * @return int
     */
    public function getClientServiceId()
    {
        return $this->container['client_service_id'];
    }

    /**
     * Sets client_service_id
     *
     * @param int $client_service_id The ID of the pass on the client's account that is to pay for this appointment.
     *
     * @return $this
     */
    public function setClientServiceId($client_service_id)
    {
        $this->container['client_service_id'] = $client_service_id;

        return $this;
    }

    /**
     * Gets resources
     *
     * @return \Swagger\Client\Model\Resource[]
     */
    public function getResources()
    {
        return $this->container['resources'];
    }

    /**
     * Sets resources
     *
     * @param \Swagger\Client\Model\Resource[] $resources The resources this appointment is to use.
     *
     * @return $this
     */
    public function setResources($resources)
    {
        $this->container['resources'] = $resources;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


text:
{% extends "base.html" %}

{% block content %}
    {% with profile.user as user %}

1. Contact Information

                    Name
                    {{ user.get_full_name }}

                    Email
                    {{ user.email|urlize }}

2. Approval/Rejection Comment

This message will be sent to {{ user.get_full_name }}
            as part of their approval/rejection email.

        <form method="post" action="">
            {% csrf_token %}

            {{ form.comment }}

                <input id="approve" type="submit" name="status" value="Approve">
                <input id="reject" type="submit" name="status" value="Reject">

        </form>
    {% endwith %}
{% endblock %}


text:
module.exports = {
  siteMetadata: {
    title: `gatsby-example-using-markdown-pages`,
    description: `Start your new blog using markdown files`,
    author: `@gatsbyjs`,
  },
  plugins: [
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `markdown-pages`,
        path: `${__dirname}/src/markdown-pages`,
      },
    },
    `gatsby-transformer-remark`,
    `gatsby-plugin-react-helmet`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#663399`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        icon: `src/images/gatsby-icon.png`,
      },
    },
  ],
}