text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/api.css" />

<title>CListIterator</title>

Yii Framework v1.1.17 Class Reference

CListIterator

All Packages
| Methods

<colgroup>
	<col class="col-name" />
	<col class="col-value" />
</colgroup>

  Package
  system.collections

  Inheritance
  class CListIterator

  Implements
  Iterator, Traversable

  Since
  1.0

  Source Code
  framework/collections/CListIterator.php

CListIterator implements an iterator for CList.

It allows CList to return a new iterator for traversing the items in the list.

Public Methods

Hide inherited methods

<colgroup>
	<col class="col-method" />
	<col class="col-description" />
	<col class="col-defined" />
</colgroup>

  Method	Description	Defined By

  __construct()
  Constructor.
  CListIterator

  current()
  Returns the current array item.
  CListIterator

  key()
  Returns the key of the current array item.
  CListIterator

  next()
  Moves the internal pointer to the next array item.
  CListIterator

  rewind()
  Rewinds internal array pointer.
  CListIterator

  valid()
  Returns whether there is an item at current position.
  CListIterator

Method Details

__construct()

method

public void __construct(array &$data)

  $data
  array
  the data to be iterated through

Source Code: framework/collections/CListIterator.php#35 (show)

public function __construct(&$data)
{
    $this->_d=&$data;
    $this->_i=0;
}

Constructor.

current()

method

public mixed current()

  {return}
  mixed
  the current array item

Source Code: framework/collections/CListIterator.php#65 (show)

public function current()
{
    return $this->_d[$this->_i];
}

Returns the current array item.
This method is required by the interface Iterator.

key()

method

public integer key()

  {return}
  integer
  the key of the current array item

Source Code: framework/collections/CListIterator.php#55 (show)

public function key()
{
    return $this->_i;
}

Returns the key of the current array item.
This method is required by the interface Iterator.

next()

method

public void next()

Source Code: framework/collections/CListIterator.php#74 (show)

public function next()
{
    $this->_i++;
}

Moves the internal pointer to the next array item.
This method is required by the interface Iterator.

rewind()

method

public void rewind()

Source Code: framework/collections/CListIterator.php#45 (show)

public function rewind()
{
    $this->_i=0;
}

Rewinds internal array pointer.
This method is required by the interface Iterator.

valid()

method

public boolean valid()

  {return}
  boolean

Source Code: framework/collections/CListIterator.php#84 (show)

public function valid()
{
    return $this->_i<count($this->_d);
}

Returns whether there is an item at current position.
This method is required by the interface Iterator.

© 2008-2013 by Yii Software LLC

All Rights Reserved.


text:
POLTERGEIST_ROOT = File.expand_path('..', __dir__)
$:.unshift(POLTERGEIST_ROOT + '/lib')

require 'bundler/setup'

require 'rspec'
require 'capybara/spec/spec_helper'
require 'capybara/poltergeist'

require 'support/test_app'
require 'support/spec_logger'

Capybara.register_driver :poltergeist do |app|
  debug = !ENV['DEBUG'].nil?
  options = {
    logger: TestSessions.logger,
    inspector: debug,
    debug: debug
  }

  options[:phantomjs] = ENV['PHANTOMJS'] if ENV['TRAVIS'] && ENV['PHANTOMJS']

  Capybara::Poltergeist::Driver.new(
    app, options
  )
end

module TestSessions
  def self.logger
    @logger ||= SpecLogger.new
  end

  Poltergeist = Capybara::Session.new(:poltergeist, TestApp)
end

module Poltergeist
  module SpecHelper
    class << self
      def set_capybara_wait_time(t)
        Capybara.default_max_wait_time = t
      rescue StandardError
        Capybara.default_wait_time = t
      end
    end
  end
end

RSpec::Expectations.configuration.warn_about_potential_false_positives = false if ENV['TRAVIS']

RSpec.configure do |config|
  config.before do
    TestSessions.logger.reset
  end

  config.after do |example|
    if ENV['DEBUG']
      puts TestSessions.logger.messages
    elsif ENV['TRAVIS'] && example.exception
      example.exception.message << "\n\nDebug info:\n" + TestSessions.logger.messages.join("\n") unless example.exception.message.frozen?
    end
  end

  config.define_derived_metadata do |metadata|
    case metadata[:full_description]
    when /^Capybara::Session Poltergeist #select input with datalist should select an option/
      metadata[:pending] = "PhantomJS doesn't support datalist"
    when /^Capybara::Session Poltergeist #click_button should follow permanent redirects that maintain method/
      metadata[:pending] = "PhantomJS doesn't support 308 HTTP response code"
    when /^Capybara::Session Poltergeist Capybara::Window#fullscreen should be able to fullscreen the window/
      metadata[:pending] = "Poltergeist doesn't support fullscreen"
    when /^Capybara::Session Poltergeist #has_css\? should support case insensitive :class and :id options/
      metadata[:pending] = "PhantomJS doesn't support case insensitive CSS"
    end
  end

  Capybara::SpecHelper.configure(config)

  config.filter_run_excluding full_description: lambda { |description, _metadata|
    [
      # test is marked pending in Capybara but Poltergeist passes - disable here - have our own test in driver spec
      /Capybara::Session Poltergeist node #set should allow me to change the contents of a contenteditable elements child/,
    ].any? { |desc| description =~ desc }
  }

  config.before(:each) do
    Poltergeist::SpecHelper.set_capybara_wait_time(0)
  end

  %i[js modals windows].each do |cond|
    config.before(:each, requires: cond) do
      Poltergeist::SpecHelper.set_capybara_wait_time(1)
    end
  end
end

def phantom_version_is?(ver_spec, driver)
  Cliver.detect(driver.options[:phantomjs] || Capybara::Poltergeist::Client::PHANTOMJS_NAME, ver_spec)
end

redpajama_set_name: RedPajamaGithub


text: <input id="module-filter-query" class="pure-menu-link" type="text" placeholder="<%= localeMsg.module_filter_placeholder %>">


text:
'use strict';

var path = require('path');
var nconf = require('nconf');

nconf.file('secure', {
  file: path.join(__dirname, 'secure-config.json'),
  secure: {
    secretPath: require.resolve(path.join(__dirname, 'secure-config-cert.key')),
    alg: 'aes-256-ctr'
  }
});
nconf.file(path.join(__dirname, 'config.json'));

module.exports = nconf;


text:
require 'hipe-cli'

class AppGg1
  include Hipe::Cli
  cli.does(:whatever1) do
    required :blah
    option('-a', '--Aaa') {|x| 'xyz'}
  end
  def whatever1(*args); 'whatever1' end

  cli.does(:whatever2) do
    optional '--blah'
    required :blah
  end
  def whatever2(*args); 'whatever2' end

  cli.does(:whatever3) do
    optional('--blah')
    splat('blah')
  end
  def whatever3(*args); 'whatever3' end

  cli.does(:whatever4) do
    splat('blah')
    optional('--blah')
  end
  def whatever4(*args); 'whatever4' end

  cli.does(:whatever5) do
    splat('blah')
    splat('blah2')
  end
  def whatever5(*args); 'whatever5' end
end

describe AppGg1, "at run time" do
  it "should enforce that options come before required (gg1)" do
    @app = AppGg1.new
    e = lambda{ @app.cli.commands[:whatever1].run(['']) }.should.raise(Hipe::Cli::GrammarGrammarException)
    e.message.should.match(/option.*(?:cannot|shouldn't|should not) (?:come|appear|follow) after.*required/i)
  end

  it "should enforce that required come before optional (gg2)" do
    e = lambda{ @app.cli.commands[:whatever2].run(['']) }.should.raise(Hipe::Cli::GrammarGrammarException)
    e.message.should.match(/required.*(?:cannot|shouldn't|should not) (?:come|appear|follow) after optional/i)
  end

  it "should enforce that splat does not come after optional (gg3)" do
    e = lambda{ @app.cli.commands[:whatever3].run(['']) }.should.raise(Hipe::Cli::GrammarGrammarException)
    e.message.should.match(/splat.*(?:cannot|shouldn't|should not) (?:come|appear|follow) after optional/i)
  end

  it "should enforce that optional does not come after splat (gg4)" do
    e = lambda{ @app.cli.commands[:whatever4].run(['']) }.should.raise(Hipe::Cli::GrammarGrammarException)
    e.message.should.match(/optional.*(?:cannot|shouldn't|should not) (?:come|appear|follow) after.*splat/i)
  end

  it "should enforce that splat cannot come after splat (gg5)" do
    e = lambda{ @app.cli.commands[:whatever5].run(['']) }.should.raise(Hipe::Cli::GrammarGrammarException)
    e.message.should.match(/splat.*(?:cannot|shouldn't|should not) (?:come|appear|follow) after.*splat/i)
  end
end


text:
package com.github.jinahya.simple.file.front;

import com.github.jinahya.simple.file.back.DefaultFileContext;
import com.github.jinahya.simple.file.back.FileBack;
import com.github.jinahya.simple.file.back.FileBack.FileOperation;
import com.github.jinahya.simple.file.back.FileBackException;
import com.github.jinahya.simple.file.back.FileContext;
import java.io.IOException;
import static java.lang.invoke.MethodHandles.lookup;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.nio.file.StandardOpenOption;
import static java.util.Optional.ofNullable;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.StreamingOutput;
import javax.ws.rs.core.UriInfo;
import org.slf4j.Logger;
import static org.slf4j.LoggerFactory.getLogger;

/**
 *
 * @author Jin Kwon <jinahya_at_gmail.com>
 */
//@Path("/paths")
public abstract class AbstractPathsResource {

    public static final String PREFERRED_PATH_VALUE = "/paths";

    @PostConstruct
    private void constructed() {
    }

    @PreDestroy
    private void destroying() {

        if (tempPath != null) {
            try {
                final boolean deleted = Files.deleteIfExists(tempPath);
                logger.trace("temp path deleted: {}", deleted);
            } catch (final IOException ioe) {
                logger.error("failed to delete temp path: " + tempPath, ioe);
            }
        }
    }

    @Produces(MediaType.WILDCARD)
    @GET
    @Path("/{path: .+}")
    public Response readSingle(@PathParam("path") final String path)
        throws IOException, FileBackException {

        logger.trace("path: {}", path);

        tempPath = Files.createTempFile("prefix", "suffix");

        final FileContext fileContext = new DefaultFileContext();

        fileContext.fileOperationSupplier(() -> FileOperation.READ);

        fileContext.pathNameSupplier(() -> path);

        final Object[] sourceObject_ = new Object[1];
        fileContext.sourceObjectConsumer(sourceObject -> {
            logger.trace("consuming source object: {}", sourceObject);
            sourceObject_[0] = sourceObject;
        });

        final Long[] sourceCopied_ = new Long[1];
        fileContext.sourceCopiedConsumer(sourceCopied -> {
            logger.trace("consuming source copied: {}", sourceCopied);
            sourceCopied_[0] = sourceCopied;
        });

        final Long[] targetCopied_ = new Long[1];
        fileContext.targetCopiedConsumer(targetCopied -> {
            logger.trace("consuming target copied: {}", targetCopied);
            targetCopied_[0] = targetCopied;
        });

        fileContext.sourceChannelConsumer(sourceChannel -> {
            logger.trace("consuming source channel : {}", sourceChannel);
            try {
                final long sourceCopied = Files.copy(
                    Channels.newInputStream(sourceChannel), tempPath,
                    StandardCopyOption.REPLACE_EXISTING);
                logger.trace("source copied: {}", sourceCopied);
                sourceCopied_[0] = sourceCopied;
            } catch (final IOException ioe) {
                final String message
                    = "failed from source channel to temp path";
                logger.error(message, ioe);
                throw new WebApplicationException(message, ioe);
            }
        });

        final FileChannel[] targetChannel_ = new FileChannel[1];
        fileContext.targetChannelSupplier(true ? null : () -> { // _not_usd_!!!
            try {
                targetChannel_[0] = FileChannel.open(
                    tempPath, StandardOpenOption.CREATE_NEW,
                    StandardOpenOption.WRITE);
                logger.trace("suppling target channel: {}", targetChannel_[0]);
                return targetChannel_[0];
            } catch (final IOException ioe) {
                final String message
                    = "failed to open temp path for writing";
                logger.error(message, ioe);
                throw new WebApplicationException(message, ioe);
            }
        });

        fileBack.operate(fileContext);

        ofNullable(targetChannel_[0]).ifPresent(v -> {
            try {
                v.close();
            } catch (final IOException ioe) {
                logger.error("failed to close target channel", ioe);
            }
        });

        if (sourceCopied_[0] == null && targetCopied_[0] == null) {
            throw new NotFoundException("no file for path: " + path);
        }

        return Response
            .ok((StreamingOutput) output -> Files.copy(tempPath, output))
            .header(FileFrontConstants.HEADER_SOURCE_COPIED, sourceCopied_[0])
            .header(FileFrontConstants.HEADER_TARGET_COPIED, targetCopied_[0])
            .build();
    }

    private transient final Logger logger = getLogger(lookup().lookupClass());

    private transient java.nio.file.Path tempPath;

    /**
     * A file back injected.
     */
    @Inject
    @Backing
    private FileBack fileBack;

    @Context
    private UriInfo uriInfo;

    @HeaderParam("Content-Type")
    private MediaType contentType;

}


text:
package com.walmart.labs.pcs.normalize.ElasticSearch;

import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.index.query.FilterBuilders;
import org.elasticsearch.index.query.FilterBuilders.*;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.QueryBuilders.*;
import org.elasticsearch.index.query.RangeFilterBuilder;
import org.elasticsearch.index.query.TermsQueryBuilder;
import org.elasticsearch.script.ScriptService;

import java.util.List;
import java.util.Map;

/**
 * Created by pzhong1 on 1/16/15.
 */
public class ElasticSearchApi {
    ElasticSearchUtil elasticSearchUtil = new ElasticSearchUtil();
    SearchRequestBuilder searchRequestBuilder;
    public ElasticSearchApi(String ... args){
        searchRequestBuilder = elasticSearchUtil.getClient().prepareSearch();
        elasticSearchUtil.getClient().prepareSearch(args);
    }

    public ElasticSearchApi setSearchDocTypes(String ... types){
        searchRequestBuilder.setTypes(types);
        return this;
    }

    public ElasticSearchApi setSearchType(SearchType searchType){
        searchRequestBuilder.setSearchType(searchType);
        return this;
    }

    public SearchResponse search(TermsQueryBuilder termsQueryBuilder, RangeFilterBuilder rangeFilterBuilder, int size){
        SearchResponse response = searchRequestBuilder.setQuery(termsQueryBuilder).setPostFilter(rangeFilterBuilder)
                .setFrom(0).setSize(size).setExplain(true)
                .execute().actionGet();
        return response;
    }

    public SearchResponse search(Map<String, String> map){
        SearchResponse sr = elasticSearchUtil.getClient().prepareSearch()
                .setTemplateName("template")
                .setTemplateType(ScriptService.ScriptType.FILE)
                .setTemplateParams(map)
                .get();
        return sr;
    }
}


text:
package ee.ria.xroad.signer.protocol.message;

import lombok.Value;

import java.io.Serializable;

/**
 * Signer API message.
 */
@Value
public class DeleteCert implements Serializable {

    private final String certId;

 }


text:
FactoryGirl.define do
  factory :solution do
    body { "This is a test solution body" }
    original true
  end
end


text:
package com.quakearts.webapp.security.rest.exception;

/**Exception thrown when there is an error in the {@link com.quakearts.webapp.security.rest.SecurityContext}
 * @author kwakutwumasi-afriyie
 *
 */
public class SecurityContextException extends RuntimeException {

	/**
	 *
	 */
	private static final long serialVersionUID = -267676554626808077L;

	public SecurityContextException() {
	}

	public SecurityContextException(String message) {
		super(message);
	}

	public SecurityContextException(Throwable cause) {
		super(cause);
	}

	public SecurityContextException(String message, Throwable cause) {
		super(message, cause);
	}

	public SecurityContextException(String message, Throwable cause, boolean enableSuppression,
			boolean writableStackTrace) {
		super(message, cause, enableSuppression, writableStackTrace);
	}

}


text:
<?php

require_once('include/MVC/View/SugarView.php');

class CalendarViewSaveSettings extends SugarView {

	function CalendarViewSettings(){
 		parent::SugarView();
	}

	function process(){
		$this->display();
	}

	function display(){
		global $current_user;

		$db_start = $this->to_db_time($_REQUEST['day_start_hours'],$_REQUEST['day_start_minutes'],$_REQUEST['day_start_meridiem']);
		$db_end = $this->to_db_time($_REQUEST['day_end_hours'],$_REQUEST['day_end_minutes'],$_REQUEST['day_end_meridiem']);

		$current_user->setPreference('day_start_time', $db_start, 0, 'global', $current_user);
		$current_user->setPreference('day_end_time', $db_end, 0, 'global', $current_user);

		$current_user->setPreference('calendar_display_timeslots', $_REQUEST['display_timeslots'], 0, 'global', $current_user);
		$current_user->setPreference('show_tasks', $_REQUEST['show_tasks'], 0, 'global', $current_user);
		$current_user->setPreference('show_calls', $_REQUEST['show_calls'], 0, 'global', $current_user);
		$current_user->setPreference('show_completed', $_REQUEST['show_completed'], 0, 'global', $current_user);

		if(isset($_REQUEST['day']) && !empty($_REQUEST['day']))
			header("Location: index.php?module=Calendar&action=index&view=".$_REQUEST['view']."&hour=0&day=".$_REQUEST['day']."&month=".$_REQUEST['month']."&year=".$_REQUEST['year']);
		else
			header("Location: index.php?module=Calendar&action=index");
	}

	private function to_db_time($hours,$minutes,$mer){
		$hours = intval($hours);
		$minutes = intval($minutes);
		$mer = strtolower($mer);
		if(!empty($mer)){
			if(($mer) == 'am')
				if($hours == 12)
					$hours = $hours - 12;
			if(($mer) == 'pm')
				if($hours != 12)
					$hours = $hours + 12;
		}
		if($hours < 10)
			$hours = "0".$hours;
		if($minutes < 10)
			$minutes = "0".$minutes;
		return $hours . ":". $minutes;
	}

}

?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="nt:unstructured"
    jcr:title="Named Transform Image"
    sling:resourceType="cq/gui/components/authoring/dialog">
    <content
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/foundation/container">
        <layout
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/foundation/layouts/tabs"
            type="nav"/>
        <items jcr:primaryType="nt:unstructured">
            <image
                jcr:primaryType="nt:unstructured"
                jcr:title="Image"
                sling:resourceType="granite/ui/components/foundation/section">
                <layout
                    jcr:primaryType="nt:unstructured"
                    sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
                <items jcr:primaryType="nt:unstructured">
                    <column
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/foundation/container">
                        <items jcr:primaryType="nt:unstructured">
                            <file
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/foundation/form/fileupload"
                                autoStart="{Boolean}false"
                                class="cq-droptarget"
                                fieldLabel="Image asset"
                                fileNameParameter="./fileName"
                                mimeTypes="[image]"
                                multiple="{Boolean}false"
                                name="./file"
                                title="Upload Image Asset"
                                uploadUrl="${suffix.path}"
                                useHTML5="{Boolean}true"/>
                            <alt
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/foundation/form/textfield"
                                fieldDescription="(leave empty to use the title defined above)"
                                fieldLabel="Alt Text"
                                name="./alt"/>
                            <link-url
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
                                fieldLabel="Link to"
                                name="./linkURL"
                                rootPath="/content"/>
                        </items>
                    </column>
                </items>
            </image>
            <transform
                jcr:primaryType="nt:unstructured"
                jcr:title="Image Transform"
                sling:resourceType="granite/ui/components/foundation/section">
                <layout
                    jcr:primaryType="nt:unstructured"
                    sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
                <items jcr:primaryType="nt:unstructured">
                    <column
                        jcr:primaryType="nt:unstructured"
                        sling:resourceType="granite/ui/components/foundation/container">
                        <items jcr:primaryType="nt:unstructured">
                            <transform
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/foundation/form/select"
                                fieldLabel="Transformation Name"
                                name="./transform">
                                <datasource
                                    jcr:primaryType="nt:unstructured"
                                    sling:resourceType="acs-commons/datasources/named-image-transforms"/>
                            </transform>
                        </items>
                    </column>
                </items>
            </transform>
        </items>
    </content>
</jcr:root>


text:
<?php

namespace DesignPatterns\Mvc\Model;

use DesignPatterns\Mvc\Model;

/**
 * @property string $nickname
 * @property string $desc
 * @property string $password
 */
class User extends Model
{
    public static $table = 'user';
}


text:
<configuration>
    <property name="LOG_DIR" value="${LOG_DIR:- /tmp/datahub/logs}"/>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOG_DIR}/gms-war.log</file>
        <append>true</append>
        <encoder>
            <pattern>%d{HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <FileNamePattern>${LOG_DIR}/gms-war.%i.log</FileNamePattern>
            <minIndex>1</minIndex>
            <maxIndex>3</maxIndex>
        </rollingPolicy>
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <MaxFileSize>100MB</MaxFileSize>
        </triggeringPolicy>
    </appender>

    <logger name="org.apache.kafka.clients" level="info">
        <appender-ref ref="STDOUT" />
    </logger>

    <root level="info">
        <appender-ref ref="STDOUT" />
        <appender-ref ref="FILE"/>
    </root>
</configuration>


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.ComponentModel.DataAnnotations;
using System.Web.Http.OData;

namespace BookingApp.Models
{
    public class RoomReservations {

        public int Id { get; set; }
        private Nullable<DateTime> endDate;
		private Nullable<DateTime> startDate;
		private Nullable<DateTime> timestamp;

		public RoomReservations(){

		}

		~RoomReservations(){

		}
        [Required]
        public Room Room { get; set; }

        [Required]
        public AppUser AppUser { get; set; }

        public Nullable<DateTime> EndDate
        {
			get{
				return endDate;
			}
			set{
				endDate = value;
			}
		}

		public Nullable<DateTime> StartDate
        {
			get{
				return startDate;
			}
			set{
				startDate = value;
			}
		}

		public Nullable<DateTime> Timestamp{
			get{
				return timestamp;
			}
			set{
				timestamp = value;
			}
		}

	}

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ShopifyAPIAdapterLibrary
{

    /// <summary>
    /// An instance of this interface would translate the data between c# and the Shopify API
    /// </summary>
    public interface IDataTranslator
    {
        /// <summary>
        /// Encode the data in a way that is expected by the Shopify API
        /// </summary>
        /// <param name="data">data that should be encoded for the Shopify API</param>
        /// <returns></returns>
        string Encode(object data);

        /// <summary>
        /// Decode the data returned by the Shopify API
        /// </summary>
        /// <param name="encodedData">data encoded by the Shopify API</param>
        /// <returns></returns>
        object Decode(string encodedData);

        /// <summary>
        /// The Content Type (Mime Type) used by this translator
        /// </summary>
        /// <returns></returns>
        string GetContentType();
    }
}


text:
cask 'caprine' do
  version '2.20.0'
  sha256 'e12a4d63934f93774c16fa9f608b156eca489927fa42d8d6f0a3d164aa3eedd9'

  url "https://github.com/sindresorhus/caprine/releases/download/v#{version}/Caprine-#{version}.dmg"
  appcast 'https://github.com/sindresorhus/caprine/releases.atom'
  name 'Caprine'
  homepage 'https://github.com/sindresorhus/caprine'

  auto_updates true

  app 'Caprine.app'

  zap trash: [
               '~/Library/Application Support/Caprine',
               '~/Library/Logs/Caprine',
               '~/Library/Caches/com.sindresorhus.caprine',
               '~/Library/Caches/com.sindresorhus.caprine.ShipIt',
               '~/Library/Preferences/com.sindresorhus.caprine.helper.plist',
               '~/Library/Preferences/com.sindresorhus.caprine.plist',
               '~/Library/Saved Application State/com.sindresorhus.caprine.savedState',
             ]
end


text:
<?php

use app\core\helpers\Html;
use app\core\widgets\ActiveForm;
use app\modules\shop\models\Type;
use app\core\helpers\ArrayHelper;

/* @var $this yii\web\View */
/* @var $model app\modules\shop\models\Attr */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'type_id')->dropDownList(ArrayHelper::map(Type::find()->all(), 'id', 'title')) ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'body')->textarea(['rows' => 6]) ?>

            <?=  Html::submitButton('保 存', ['class' => 'btn btn-primary btn-block']) ?>

    <?php ActiveForm::end(); ?>


text:
package io.blacklagoonapps.myquotes.quotes;

import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;

import io.blacklagoonapps.myquotes.R;
import io.blacklagoonapps.myquotes.authors.AuthorsActivity;
import io.blacklagoonapps.myquotes.database.DatabaseHelper;
import io.blacklagoonapps.myquotes.command.Command;
import io.blacklagoonapps.myquotes.command.CommandWrapper;

public class EditQuoteActivity extends QuotesActivity {

    public static final String QUOTE_CONTENT = "QUOTE_CONTENT";
    public static final String AUTHOR_FIRST_NAME = "AUTHOR_FIRST_NAME";
    public static final String AUTHOR_LAST_NAME = "AUTHOR_LAST_NAME";

    private String authorFirstName;
    private String authorLastName;
    private String quoteContent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Intent intent = getIntent();

        authorFirstName = intent.getStringExtra(AUTHOR_FIRST_NAME);
        authorLastName = intent.getStringExtra(AUTHOR_LAST_NAME);
        quoteContent = intent.getStringExtra(QUOTE_CONTENT);

        authorFirstNameInputLayout.setHintAnimationEnabled(false);
        authorFirstNameInput.setText(authorFirstName);

        authorLastNameInputLayout.setHintAnimationEnabled(false);   //Heh https://code.google.com/p/android/issues/detail?id=178168&thanks=178168&ts=1435254358
        authorLastNameInput.setText(authorLastName);
        authorLastNameInputLayout.setHintAnimationEnabled(true);

        quoteContentInputLayout.setHintAnimationEnabled(false);
        quoteContentInput.setText(quoteContent);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.quotes_edit_menu, menu);
        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        final DatabaseHelper databaseHelper = new DatabaseHelper(this);
        final SQLiteDatabase db = databaseHelper.getWritableDatabase();
        final long authorId = databaseHelper.findAuthorId(db, authorFirstName, authorLastName);
        final long quoteId = databaseHelper.findQuoteId(db, authorId, quoteContent);

        switch (item.getItemId()) {
            case R.id.item_editquotes_save:

                final String firstNameInput = authorFirstNameInput.getText().toString().trim();
                final String lastNameInput = authorLastNameInput.getText().toString().trim();
                final String contentInput = quoteContentInput.getText().toString().trim();

                if (firstNameInput.equals(authorFirstName) && lastNameInput.equals(authorLastName) && contentInput.equals(quoteContent)) {
                    finish();
                    return true;
                }

                // Tmp variables, because if they were both in IF the second one might not be invoked
                boolean fn = validateFieldNotEmpty(authorFirstNameInputLayout, authorFirstNameInput);
                boolean qc = validateFieldNotEmpty(quoteContentInputLayout, quoteContentInput);
                if (fn && qc) {

                    // Quote's content have changed
                    if (!quoteContent.equals(contentInput)) {
                        databaseHelper.editQuote(db, quoteId, authorId, contentInput);
                    }

                    long newAuthorId = -1;
                    // Author has changed
                    if (!authorFirstName.equals(firstNameInput) || !authorLastName.equals(lastNameInput)) {
                        if (databaseHelper.countQuotes(db, authorId) > 1)
                            createAndShowDialog(databaseHelper, db, firstNameInput, lastNameInput, authorId, quoteId);
                        else
                            newAuthorId = changeAllQuotes(databaseHelper, db, firstNameInput, lastNameInput, authorId);
                    }

                    if (newAuthorId != -1)
                        finishWithToastAndResult(getString(R.string.saved), newAuthorId);
                }
                break;

            case R.id.item_editquotes_delete:
                databaseHelper.deleteQuote(db, quoteId);
                finishWithToast(getString(R.string.deleted));
                break;

            case android.R.id.home:
                finish();
                return true;
        }

        return super.onOptionsItemSelected(item);
    }

    private void createAndShowDialog(final DatabaseHelper databaseHelper, final SQLiteDatabase db,
                                     final String firstNameInput, final String lastNameInput, final long authorId,
                                     final long quoteId) {
        Command changeSingleQuoteCommand = new Command() {
            @Override
            public void execute() {
                long newAuthorId = changeSingleQuote(databaseHelper, db, firstNameInput, lastNameInput, authorId, quoteId);
                finishWithToastAndResult(getString(R.string.saved), newAuthorId);
            }
        };
        Command changeAllQuotesCommand = new Command() {
            @Override
            public void execute() {
                long newAuthorId = changeAllQuotes(databaseHelper, db, firstNameInput, lastNameInput, authorId);
                finishWithToastAndResult(getString(R.string.saved), newAuthorId);
            }
        };
        Command emptyCommand = Command.Companion.getNO_OPERATION();
        AlertDialog dialog = createEditAuthorDialog(changeAllQuotesCommand, emptyCommand, changeSingleQuoteCommand);
        dialog.show();
        centerDialogButtons(dialog);
    }

    private void finishWithToastAndResult(String message, long authorId) {
        Intent intent = new Intent();
        intent.putExtra(AuthorsActivity.AUTHOR_ID, authorId);
        setResult(AuthorsActivity.NEW_AUTHOR_ID, intent);
        finishWithToast(message);
    }

    private void finishWithToast(String message) {
        Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
        finish();
    }

    private long changeSingleQuote(DatabaseHelper databaseHelper, SQLiteDatabase db, String firstNameInput,
                                   String lastNameInput, long authorId, long quoteId) {
        long newAuthorId = databaseHelper.findAuthorId(db, firstNameInput, lastNameInput);
        if (newAuthorId == -1) {   // quote's new author doesn't exist in database
            newAuthorId = databaseHelper.addAuthor(db, firstNameInput, lastNameInput);
        }
        databaseHelper.updateQuote(db, quoteId, newAuthorId);
        if (databaseHelper.countQuotes(db, authorId) == 0) {  // delete old author if there are no quotes by him/her
            databaseHelper.deleteAuthor(db, authorId);
        }

        return newAuthorId;
    }

    private long changeAllQuotes(DatabaseHelper databaseHelper, SQLiteDatabase db, String firstNameInput,
                                 String lastNameInput, long authorId) {
        long newAuthorId = databaseHelper.findAuthorId(db, firstNameInput, lastNameInput);
        if (newAuthorId == -1) { // if new author doesn't exist in database, edit existing author's first name and last name
            databaseHelper.editAuthor(db, authorId, firstNameInput, lastNameInput);
            return authorId;
        } else {
            databaseHelper.editQuotesAuthor(db, authorId, newAuthorId);
            return newAuthorId;
        }
    }

    private AlertDialog createEditAuthorDialog(Command allQuotesCommand, Command cancelCommand,
                                               Command singleQuoteCommand) {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle(R.string.edit_author_dialog_title)
                .setMessage(R.string.edit_author_dialog_message)
                .setPositiveButton(R.string.all_quotes, new CommandWrapper(allQuotesCommand))
                .setNeutralButton(R.string.cancel, new CommandWrapper(cancelCommand))
                .setNegativeButton(R.string.only_this_quote, new CommandWrapper(singleQuoteCommand));
        return builder.create();
    }

    private void centerDialogButtons(AlertDialog dialog) {
        Button[] buttons = {dialog.getButton(AlertDialog.BUTTON_POSITIVE), dialog.getButton(AlertDialog.BUTTON_NEUTRAL),
                dialog.getButton(AlertDialog.BUTTON_NEGATIVE)};

        for (Button button : buttons) {
            centerButton(button);
        }
    }

    private void centerButton(Button button) {
        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) button.getLayoutParams();
        layoutParams.gravity = Gravity.CENTER;
        button.setLayoutParams(layoutParams);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<SimpleXml>
    <Data value="value of par1"/>
</SimpleXml>


text:
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.9">
  <compounddef id="_r_m_upload_availability_8h" kind="file">
    <compoundname>RMUploadAvailability.h</compoundname>
    <includes local="no">Cocoa/Cocoa.h</includes>
    <incdepgraph>
      <node id="7">
        Cocoa/Cocoa.h
      </node>
      <node id="6">
        /Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h
        <link refid="RMUploadAvailability.h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="_r_m_upload_availability_8h_16a1c6e282e372fbe9d3172507ff7e34c" prot="public" static="no">
        <name>RMUPLOADKIT_DEPRECATED_ATTRIBUTE</name>
        <initializer>__attribute__((deprecated))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="11" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="11" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_11f9abab0173c9135cc1240d3a5ea1570" prot="public" static="no">
        <name>RMUPLOADKIT_UNAVAILABLE_ATTRIBUTE</name>
        <initializer>__attribute__((unavailable))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="12" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="12" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_1b75c3f483cef6ad944611d087e0c3597" prot="public" static="no">
        <name>RMUPLOADKIT_WEAK_IMPORT_ATTRIBUTE</name>
        <initializer>__attribute__((weak_import))</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="13" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="13" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_1ea5d12a8298162b057431e1c717377f1" prot="public" static="no">
        <name>RMUPLOADKIT_FRAMEWORK_VERSION_1</name>
        <initializer>0100</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="15" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="15" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_1b8d06af0a80b9b5af13f24654feddf6c" prot="public" static="no">
        <name>RMUPLOADKIT_FRAMEWORK_VERSION_2</name>
        <initializer>0200</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="16" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="16" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_1bdb6a1606fc6f10c32a5022795665120" prot="public" static="no">
        <name>RMUPLOADKIT_FRAMEWORK_VERSION_3</name>
        <initializer>0300</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="17" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="17" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_14e026af30889a34c327683466bbc3fc1" prot="public" static="no">
        <name>RMUPLOADKIT_FRAMEWORK_VERSION_MIN_REQUIRED</name>
        <initializer>RMUPLOADKIT_FRAMEWORK_VERSION_3</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="20" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="20" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_11ba1ac22b3486bfd2b1b5c2a1974721e" prot="public" static="no">
        <name>RMUPLOADKIT_FRAMEWORK_VERSION_MAX_ALLOWED</name>
        <initializer>RMUPLOADKIT_FRAMEWORK_VERSION_3</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="24" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="24" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="_r_m_upload_availability_8h_1e31a551c01ff670f8f43cd784cad54cf" prot="public" static="no">
        <name>AVAILABLE_RMUPLOADKIT_VERSION_3_AND_LATER</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" line="32" bodyfile="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h" bodystart="32" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>RMUploadAvailability.h</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>RMUploadKit</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Created<sp/>by<sp/>Keith<sp/>Duncan<sp/>on<sp/>08/09/2010.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="comment">//<sp/><sp/>Copyright<sp/>2010<sp/>Realmac<sp/>Software.<sp/>All<sp/>rights<sp/>reserved.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="preprocessor">#import<sp/><Cocoa/Cocoa.h></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11" refid="_r_m_upload_availability_8h_16a1c6e282e372fbe9d3172507ff7e34c" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_DEPRECATED_ATTRIBUTE<sp/>__attribute__((deprecated))</highlight></codeline>
<codeline lineno="12" refid="_r_m_upload_availability_8h_11f9abab0173c9135cc1240d3a5ea1570" refkind="member"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_UNAVAILABLE_ATTRIBUTE<sp/>__attribute__((unavailable))</highlight></codeline>
<codeline lineno="13" refid="_r_m_upload_availability_8h_1b75c3f483cef6ad944611d087e0c3597" refkind="member"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_WEAK_IMPORT_ATTRIBUTE<sp/>__attribute__((weak_import))</highlight></codeline>
<codeline lineno="14"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15" refid="_r_m_upload_availability_8h_1ea5d12a8298162b057431e1c717377f1" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_1<sp/>0100</highlight></codeline>
<codeline lineno="16" refid="_r_m_upload_availability_8h_1b8d06af0a80b9b5af13f24654feddf6c" refkind="member"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_2<sp/>0200</highlight></codeline>
<codeline lineno="17" refid="_r_m_upload_availability_8h_1bdb6a1606fc6f10c32a5022795665120" refkind="member"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_3<sp/>0300</highlight></codeline>
<codeline lineno="18"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_MIN_REQUIRED</highlight></codeline>
<codeline lineno="20" refid="_r_m_upload_availability_8h_14e026af30889a34c327683466bbc3fc1" refkind="member"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_MIN_REQUIRED<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_3</highlight></codeline>
<codeline lineno="21"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
<codeline lineno="22"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_MAX_ALLOWED</highlight></codeline>
<codeline lineno="24" refid="_r_m_upload_availability_8h_11ba1ac22b3486bfd2b1b5c2a1974721e" refkind="member"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_MAX_ALLOWED<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_3</highlight></codeline>
<codeline lineno="25"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
<codeline lineno="26"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_MAX_ALLOWED<sp/><<sp/>RMUPLOADKIT_FRAMEWORK_VERSION_3</highlight></codeline>
<codeline lineno="28"><highlight class="preprocessor"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#define<sp/>AVAILABLE_RMUPLOADKIT_VERSION_3_AND_LATER<sp/><sp/><sp/><sp/><sp/>UNAVAILABLE_ATTRIBUTE</highlight></codeline>
<codeline lineno="29"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#elif<sp/>RMUPLOADKIT_VERSION_MIN_REQUIRED<sp/><<sp/>RMUPLOADKIT_VERSION_3</highlight></codeline>
<codeline lineno="30"><highlight class="preprocessor"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#define<sp/>AVAILABLE_RMUPLOADKIT_VERSION_3_AND_LATER<sp/><sp/><sp/><sp/><sp/>WEAK_IMPORT_ATTRIBUTE</highlight></codeline>
<codeline lineno="31"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#else</highlight></codeline>
<codeline lineno="32" refid="_r_m_upload_availability_8h_1e31a551c01ff670f8f43cd784cad54cf" refkind="member"><highlight class="preprocessor"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#define<sp/>AVAILABLE_RMUPLOADKIT_VERSION_3_AND_LATER</highlight></codeline>
<codeline lineno="33"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
    </programlisting>
    <location file="/Users/keith/Projects/Source/RMUpload/documentation/RMUploadKit.sdk/Library/Frameworks/RMUploadKit.framework/Versions/A/Headers/RMUploadAvailability.h"/>
  </compounddef>
</doxygen>


text:
var njord = require('njord');
var url = require('url');

var Client = module.exports = function(root,credentials,callback) {

	var session = njord.session(root);

	session.get('api',function(err,data) {

		//Get the API info
		var json = null;

		try{json = JSON.parse(data);} catch(ex) {callback(ex);}

		if (json) {

			session.api = json;

			if(credentials && credentials.login && credentials.username && credentials.password) {

				//Login needed for API access
				session.login(credentials.login,credentials.username,credendials.password,function(err){
					err?callback(err):callback(null,session);
				});

			} else {

				//No login needed
				callback(null,session);

			}

		}

	});

};


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.07.27 at 08:11:57 PM EEST
//

package uk.org.siri.siri;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * Type for access control.
 *
 *
Java class for GeneralMessageCapabilityAccessControlStructure complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="GeneralMessageCapabilityAccessControlStructure">
 *   <complexContent>
 *     <extension base="{http://www.siri.org.uk/siri}CapabilityAccessControlStructure">
 *       <sequence>
 *         <element name="CheckInfoChannelRef" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GeneralMessageCapabilityAccessControlStructure", propOrder = {
    "checkInfoChannelRef"
})
public class GeneralMessageCapabilityAccessControlStructure
    extends CapabilityAccessControlStructure
{

    @XmlElement(name = "CheckInfoChannelRef", defaultValue = "true")
    protected boolean checkInfoChannelRef;

    /**
     * Gets the value of the checkInfoChannelRef property.
     *
     */
    public boolean isCheckInfoChannelRef() {
        return checkInfoChannelRef;
    }

    /**
     * Sets the value of the checkInfoChannelRef property.
     *
     */
    public void setCheckInfoChannelRef(boolean value) {
        this.checkInfoChannelRef = value;
    }

}


text:
package com.github.fichtner.crackgpg.gnupg;

public interface PassphraseChecker {

	boolean checkPassphrase(char[] pass);

}


text:
package workbench.db;

import java.sql.SQLException;

/**
 *
 * @author Thomas Kellerer
 */
public class NoConnectionException
	extends SQLException
{

	public NoConnectionException(String reason)
	{
		super(reason);
	}

}


text:
package org.sagebionetworks.web.client.widget.entity.controller;

import org.sagebionetworks.web.client.utils.Callback;
import com.google.gwt.user.client.ui.IsWidget;

public interface ProvenanceEntry extends IsWidget {

	public void setRemoveCallback(Callback removalCallback);

	public void setAnchorTarget(String targetURL);
}


text:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="fill_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <ImageView
                    android:id="@+id/img_background_top"
                    android:src="@drawable/sample_large"
                    android:scaleType="centerCrop"
                    android:layout_width="fill_parent"
                    android:layout_height="160dp"
                    android:background="#231233"/>

                <View
                    android:src="@drawable/ic_launcher"
                    android:layout_width="fill_parent"
                    android:layout_height="160dp"
                    android:background="@color/yellow"/>
            </LinearLayout>

            <com.makeramen.RoundedImageView
                xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/img_attendee"
                android:src="@drawable/sample_large"
                android:layout_width="110dp"
                android:layout_height="110dp"
                android:layout_centerInParent="true"
                android:scaleType="centerCrop"
                app:corner_radius="5dp"
                app:border_width="2dp"
                app:border_color="@color/yellow"
                app:mutate_background="true"
                app:oval="false"/>

            <LinearLayout
                android:layout_centerHorizontal="true"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:paddingBottom="12dp"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAllCaps="true"
                        android:textColor="@color/white"
                        android:textStyle="bold"
                        android:textSize="20sp"
                        android:layout_marginBottom="4dp"
                        android:text="HAIFA BALUYOS"/>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/white"
                        android:text="Executive Director at Developers Connect"/>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/white"
                        android:text="\@haifacarina"/>

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/white"
                        android:text="http://www.haifacarina.com"/>
                </LinearLayout>
            </LinearLayout>
        </RelativeLayout>

        <TextView
            android:id="@+id/txt_location"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/green"
            android:textSize="16sp"
            android:layout_marginTop="10dp"
            android:typeface="monospace"
            android:text="Location"/>

        <View
            android:src="@drawable/ic_launcher"
            android:layout_width="250dp"
            android:layout_height="1dp"
            android:layout_marginTop="6dp"
            android:background="@color/gray"/>

        <TextView
            android:id="@+id/txt_address"
            android:layout_width="300dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="18sp"
            android:layout_marginTop="10dp"
            android:text="Manila, Philippines"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/green"
            android:textSize="16sp"
            android:layout_marginTop="10dp"
            android:typeface="monospace"
            android:text="E-mail Address & Contact Information"/>

        <View
            android:src="@drawable/ic_launcher"
            android:layout_width="250dp"
            android:layout_height="1dp"
            android:layout_marginTop="6dp"
            android:background="@color/gray"/>

        <TextView
            android:id="@+id/txt_email_and_contact"
            android:layout_width="300dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="16sp"
            android:layout_marginTop="10dp"
            android:text="haifa@devcon.ph . +63 916 4644 275"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/green"
            android:textSize="16sp"
            android:layout_marginTop="10dp"
            android:typeface="monospace"
            android:text="About Haifa"/>

        <View
            android:src="@drawable/ic_launcher"
            android:layout_width="250dp"
            android:layout_height="1dp"
            android:layout_marginTop="6dp"
            android:background="@color/gray"/>

        <TextView
            android:layout_width="300dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="16sp"
            android:layout_marginTop="10dp"
            android:text="Haifa is currently managing the organization's direction Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vitae libero at lorem dictum interdum quis sed nunc. Aliquam at dolor eget sem fringilla semper. Nam nunc ex, lacinia."/>
    </LinearLayout>
</ScrollView>


text:
<!DOCTYPE html>

<title>
Feedback Form
</title>

<form id="form1" name="form1" class="wufoo topLabel page" accept-charset="UTF-8" autocomplete="off" enctype="multipart/form-data" method="post" novalidate
      action="https://bernizee.wufoo.com/forms/zry15ua1k4n54t/#public">

Feedback Form

This is my form. Please fill it out. It's awesome!

Your name

<input id="Field1" name="Field1" type="text" class="field text medium" value="" maxlength="255" tabindex="1" onkeyup=""       placeholder="Michael J. Fox" />

Your Email

<input id="Field2" name="Field2" type="text" class="field text medium" value="" maxlength="255" tabindex="2" onkeyup=""       placeholder="pimpdaddy@yahoo.com" />

Comments

<textarea id="Field3"
name="Field3"
class="field textarea medium"
spellcheck="true"
rows="10" cols="50"

tabindex="3"
onkeyup=""
placeholder="Tell me I'm beautiful"
       ></textarea>

<input id="saveForm" name="saveForm" class="btTxt submit"
    type="submit" value="Submit"/>

Do Not Fill This Out
<textarea name="comment" id="comment" rows="1" cols="1"></textarea>
<input type="hidden" id="idstamp" name="idstamp" value="fKJ6ffglaTds6f/OskzOPQrDvGnaHDtzIAA8FtA/HKc=" />

</form>


text:
<?php
declare(strict_types = 1);

/**
 * Routes
 */
$router = new Zortje\MVC\Routing\Router();
$router->connect('\/cars', \Zortje\MVC\Tests\Controller\Fixture\CarsController::class, 'index');

return $router;


text:
<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            new JMS\AopBundle\JMSAopBundle(),
            new JMS\DiExtraBundle\JMSDiExtraBundle($this),
            new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),

            new FOS\UserBundle\FOSUserBundle(),
            new Sonata\jQueryBundle\SonatajQueryBundle(),
			new Sonata\BlockBundle\SonataBlockBundle(),
            new Sonata\AdminBundle\SonataAdminBundle(),
            new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle($this),
            new FOS\RestBundle\FOSRestBundle(),

            new JDA\CoreBundle\JDACoreBundle(),
            new Zeega\UserBundle\ZeegaUserBundle(),
            new Zeega\DataBundle\ZeegaDataBundle(),
            new Zeega\AdminBundle\ZeegaAdminBundle(),
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"
              android:paddingBottom="@dimen/activity_vertical_margin"
              android:paddingLeft="@dimen/activity_horizontal_margin"
              android:paddingRight="@dimen/activity_horizontal_margin"
              android:paddingTop="@dimen/activity_vertical_margin">

    <TextView
        android:id="@+id/tv_show"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"/>

    <Button
        android:text="Button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/btn_test"/>
</LinearLayout>


text:
//
//  Copyright (c) 2015 Artyom Beilis (Tonkikh)
//  Copyright (c) 2020 Alexander Grund
//
//  Distributed under the Boost Software License, Version 1.0. (See
//  accompanying file LICENSE or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_NOWIDE_UTF8_CODECVT_HPP_INCLUDED
#define BOOST_NOWIDE_UTF8_CODECVT_HPP_INCLUDED

#include <boost/nowide/replacement.hpp>
#include <boost/nowide/utf/utf.hpp>
#include <cstdint>
#include <locale>

namespace boost {
namespace nowide {

    static_assert(sizeof(std::mbstate_t) >= 2, "mbstate_t is to small to store an UTF-16 codepoint");
    namespace detail {
        // Avoid including cstring for std::memcpy
        inline void copy_uint16_t(void* dst, const void* src)
        {
            unsigned char* cdst = static_cast<unsigned char*>(dst);
            const unsigned char* csrc = static_cast<const unsigned char*>(src);
            cdst[0] = csrc[0];
            cdst[1] = csrc[1];
        }
        inline std::uint16_t read_state(const std::mbstate_t& src)
        {
            std::uint16_t dst;
            copy_uint16_t(&dst, &src);
            return dst;
        }
        inline void write_state(std::mbstate_t& dst, const std::uint16_t src)
        {
            copy_uint16_t(&dst, &src);
        }
    } // namespace detail

#if defined _MSC_VER && _MSC_VER < 1700
// MSVC do_length is non-standard it counts wide characters instead of narrow and does not change mbstate
#define BOOST_NOWIDE_DO_LENGTH_MBSTATE_CONST
#endif

    /// std::codecvt implementation that converts between UTF-8 and UTF-16 or UTF-32
    ///
    /// @tparam CharSize Determines the encoding: 2 for UTF-16, 4 for UTF-32
    ///
    /// Invalid sequences are replaced by #BOOST_NOWIDE_REPLACEMENT_CHARACTER
    /// A trailing incomplete sequence will result in a return value of std::codecvt::partial
    template<typename CharType, int CharSize = sizeof(CharType)>
    class utf8_codecvt;

    /// Specialization for the UTF-8 <-> UTF-16 variant of the std::codecvt implementation
    template<typename CharType>
    class BOOST_SYMBOL_VISIBLE utf8_codecvt<CharType, 2> : public std::codecvt<CharType, char, std::mbstate_t>
    {
    public:
        static_assert(sizeof(CharType) >= 2, "CharType must be able to store UTF16 code point");

        utf8_codecvt(size_t refs = 0) : std::codecvt<CharType, char, std::mbstate_t>(refs)
        {}

    protected:
        typedef CharType uchar;

        std::codecvt_base::result do_unshift(std::mbstate_t& s, char* from, char* /*to*/, char*& next) const override
        {
            if(detail::read_state(s) != 0)
                return std::codecvt_base::error;
            next = from;
            return std::codecvt_base::ok;
        }
        int do_encoding() const noexcept override
        {
            return 0;
        }
        int do_max_length() const noexcept override
        {
            return 4;
        }
        bool do_always_noconv() const noexcept override
        {
            return false;
        }

        int do_length(std::mbstate_t
#ifdef BOOST_NOWIDE_DO_LENGTH_MBSTATE_CONST
                      const
#endif
                        & std_state,
                      const char* from,
                      const char* from_end,
                      size_t max) const override
        {
            std::uint16_t state = detail::read_state(std_state);
#ifndef BOOST_NOWIDE_DO_LENGTH_MBSTATE_CONST
            const char* save_from = from;
#else
            size_t save_max = max;
#endif
            while(max > 0 && from < from_end)
            {
                const char* prev_from = from;
                std::uint32_t ch = utf::utf_traits<char>::decode(from, from_end);
                if(ch == utf::illegal)
                {
                    ch = BOOST_NOWIDE_REPLACEMENT_CHARACTER;
                } else if(ch == utf::incomplete)
                {
                    from = prev_from;
                    break;
                }
                max--;
                if(ch > 0xFFFF)
                {
                    if(state == 0)
                    {
                        from = prev_from;
                        state = 1;
                    } else
                    {
                        state = 0;
                    }
                }
            }
#ifndef BOOST_NOWIDE_DO_LENGTH_MBSTATE_CONST
            detail::write_state(std_state, state);
            return static_cast<int>(from - save_from);
#else
            return static_cast<int>(save_max - max);
#endif
        }

        std::codecvt_base::result do_in(std::mbstate_t& std_state,
                                        const char* from,
                                        const char* from_end,
                                        const char*& from_next,
                                        uchar* to,
                                        uchar* to_end,
                                        uchar*& to_next) const override
        {
            std::codecvt_base::result r = std::codecvt_base::ok;

            // mbstate_t is POD type and should be initialized to 0 (i.a. state = stateT())
            // according to standard. We use it to keep a flag 0/1 for surrogate pair writing
            //
            // if 0 no code above >0xFFFF observed, of 1 a code above 0xFFFF observed
            // and first pair is written, but no input consumed
            std::uint16_t state = detail::read_state(std_state);
            while(to < to_end && from < from_end)
            {
                const char* from_saved = from;

                uint32_t ch = utf::utf_traits<char>::decode(from, from_end);

                if(ch == utf::illegal)
                {
                    ch = BOOST_NOWIDE_REPLACEMENT_CHARACTER;
                } else if(ch == utf::incomplete)
                {
                    from = from_saved;
                    r = std::codecvt_base::partial;
                    break;
                }
                // Normal codepoints go directly to stream
                if(ch <= 0xFFFF)
                {
                    *to++ = static_cast<CharType>(ch);
                } else
                {
                    // for  other codepoints we do following
                    //
                    // 1. We can't consume our input as we may find ourself
                    //    in state where all input consumed but not all output written,i.e. only
                    //    1st pair is written
                    // 2. We only write first pair and mark this in the state, we also revert back
                    //    the from pointer in order to make sure this codepoint would be read
                    //    once again and then we would consume our input together with writing
                    //    second surrogate pair
                    ch -= 0x10000;
                    std::uint16_t vh = static_cast<std::uint16_t>(ch >> 10);
                    std::uint16_t vl = ch & 0x3FF;
                    std::uint16_t w1 = vh + 0xD800;
                    std::uint16_t w2 = vl + 0xDC00;
                    if(state == 0)
                    {
                        from = from_saved;
                        *to++ = static_cast<CharType>(w1);
                        state = 1;
                    } else
                    {
                        *to++ = static_cast<CharType>(w2);
                        state = 0;
                    }
                }
            }
            from_next = from;
            to_next = to;
            if(r == std::codecvt_base::ok && (from != from_end || state != 0))
                r = std::codecvt_base::partial;
            detail::write_state(std_state, state);
            return r;
        }

        std::codecvt_base::result do_out(std::mbstate_t& std_state,
                                         const uchar* from,
                                         const uchar* from_end,
                                         const uchar*& from_next,
                                         char* to,
                                         char* to_end,
                                         char*& to_next) const override
        {
            std::codecvt_base::result r = std::codecvt_base::ok;
            // mbstate_t is POD type and should be initialized to 0 (i.a. state = stateT())
            // according to standard. We assume that sizeof(mbstate_t) >=2 in order
            // to be able to store first observed surrogate pair
            //
            // State: state!=0 - a first surrogate pair was observed (state = first pair),
            // we expect the second one to come and then zero the state
            ///
            std::uint16_t state = detail::read_state(std_state);
            while(to < to_end && from < from_end)
            {
                std::uint32_t ch = 0;
                if(state != 0)
                {
                    // if the state indicates that 1st surrogate pair was written
                    // we should make sure that the second one that comes is actually
                    // second surrogate
                    std::uint16_t w1 = state;
                    std::uint16_t w2 = *from;
                    // we don't forward from as writing may fail to incomplete or
                    // partial conversion
                    if(0xDC00 <= w2 && w2 <= 0xDFFF)
                    {
                        std::uint16_t vh = w1 - 0xD800;
                        std::uint16_t vl = w2 - 0xDC00;
                        ch = ((uint32_t(vh) << 10) | vl) + 0x10000;
                    } else
                    {
                        ch = BOOST_NOWIDE_REPLACEMENT_CHARACTER;
                    }
                } else
                {
                    ch = *from;
                    if(0xD800 <= ch && ch <= 0xDBFF)
                    {
                        // if this is a first surrogate pair we put
                        // it into the state and consume it, note we don't
                        // go forward as it should be illegal so we increase
                        // the from pointer manually
                        state = static_cast<std::uint16_t>(ch);
                        from++;
                        continue;
                    } else if(0xDC00 <= ch && ch <= 0xDFFF)
                    {
                        // if we observe second surrogate pair and
                        // first only may be expected we should break from the loop with error
                        // as it is illegal input
                        ch = BOOST_NOWIDE_REPLACEMENT_CHARACTER;
                    }
                }
                if(!utf::is_valid_codepoint(ch))
                {
                    r = std::codecvt_base::error;
                    break;
                }
                int len = utf::utf_traits<char>::width(ch);
                if(to_end - to < len)
                {
                    r = std::codecvt_base::partial;
                    break;
                }
                to = utf::utf_traits<char>::encode(ch, to);
                state = 0;
                from++;
            }
            from_next = from;
            to_next = to;
            if(r == std::codecvt_base::ok && (from != from_end || state != 0))
                r = std::codecvt_base::partial;
            detail::write_state(std_state, state);
            return r;
        }
    };

    /// Specialization for the UTF-8 <-> UTF-32 variant of the std::codecvt implementation
    template<typename CharType>
    class BOOST_SYMBOL_VISIBLE utf8_codecvt<CharType, 4> : public std::codecvt<CharType, char, std::mbstate_t>
    {
    public:
        utf8_codecvt(size_t refs = 0) : std::codecvt<CharType, char, std::mbstate_t>(refs)
        {}

    protected:
        typedef CharType uchar;

        std::codecvt_base::result
        do_unshift(std::mbstate_t& /*s*/, char* from, char* /*to*/, char*& next) const override
        {
            next = from;
            return std::codecvt_base::ok;
        }
        int do_encoding() const noexcept override
        {
            return 0;
        }
        int do_max_length() const noexcept override
        {
            return 4;
        }
        bool do_always_noconv() const noexcept override
        {
            return false;
        }

        int do_length(std::mbstate_t
#ifdef BOOST_NOWIDE_DO_LENGTH_MBSTATE_CONST
                      const
#endif
                        & /*state*/,
                      const char* from,
                      const char* from_end,
                      size_t max) const override
        {
#ifndef BOOST_NOWIDE_DO_LENGTH_MBSTATE_CONST
            const char* start_from = from;
#else
            size_t save_max = max;
#endif

            while(max > 0 && from < from_end)
            {
                const char* save_from = from;
                std::uint32_t ch = utf::utf_traits<char>::decode(from, from_end);
                if(ch == utf::incomplete)
                {
                    from = save_from;
                    break;
                } else if(ch == utf::illegal)
                {
                    ch = BOOST_NOWIDE_REPLACEMENT_CHARACTER;
                }
                max--;
            }
#ifndef BOOST_NOWIDE_DO_LENGTH_MBSTATE_CONST
            return from - start_from;
#else
            return save_max - max;
#endif
        }

        std::codecvt_base::result do_in(std::mbstate_t& /*state*/,
                                        const char* from,
                                        const char* from_end,
                                        const char*& from_next,
                                        uchar* to,
                                        uchar* to_end,
                                        uchar*& to_next) const override
        {
            std::codecvt_base::result r = std::codecvt_base::ok;

            while(to < to_end && from < from_end)
            {
                const char* from_saved = from;

                uint32_t ch = utf::utf_traits<char>::decode(from, from_end);

                if(ch == utf::illegal)
                {
                    ch = BOOST_NOWIDE_REPLACEMENT_CHARACTER;
                } else if(ch == utf::incomplete)
                {
                    r = std::codecvt_base::partial;
                    from = from_saved;
                    break;
                }
                *to++ = ch;
            }
            from_next = from;
            to_next = to;
            if(r == std::codecvt_base::ok && from != from_end)
                r = std::codecvt_base::partial;
            return r;
        }

        std::codecvt_base::result do_out(std::mbstate_t& /*std_state*/,
                                         const uchar* from,
                                         const uchar* from_end,
                                         const uchar*& from_next,
                                         char* to,
                                         char* to_end,
                                         char*& to_next) const override
        {
            std::codecvt_base::result r = std::codecvt_base::ok;
            while(to < to_end && from < from_end)
            {
                std::uint32_t ch = 0;
                ch = *from;
                if(!utf::is_valid_codepoint(ch))
                {
                    ch = BOOST_NOWIDE_REPLACEMENT_CHARACTER;
                }
                int len = utf::utf_traits<char>::width(ch);
                if(to_end - to < len)
                {
                    r = std::codecvt_base::partial;
                    break;
                }
                to = utf::utf_traits<char>::encode(ch, to);
                from++;
            }
            from_next = from;
            to_next = to;
            if(r == std::codecvt_base::ok && from != from_end)
                r = std::codecvt_base::partial;
            return r;
        }
    };

} // namespace nowide
} // namespace boost

#endif


text:
<!--
http://www.apache.org/licenses/LICENSE-2.0.txt

Copyright 2015 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Tribe

Tribe is the name of the clustering feature in Snap.  When it is enabled, snapd instances can join to one another through an `agreement`. When an action is taken by one snapd instance that is a member of an agreement, that action will be carried out by all other members of the agreement. When a new snapd joins an existing agreement it will retrieve plugins and tasks from the members of the agreement.

## Usage
This walkthrough assumes you have downloaded a Snap release as described in [Getting Started](../README.md#getting-started).

### Starting the first snapd in tribe mode

Start the first node:
```
$ snapd --tribe -t 0
```

Only `--tribe` and some trust level (`-t 0`) is required to start tribe. This will result in defaults for all other parameters:
* Default `tribe-node-name` will be the same as your hostname
* Default `tribe-seed` is port 6000
* Default `tribe-addr` and `tribe-port` are the same as `snapd` and `tribe-seed` (ex. 127.0.0.1:6000)

See `snapd -h` for all the possible flags.

### Creating an initial agreement

Members of a tribe only share configuration once they join an agreement. To create your first agreement:
```
$ snapctl agreement create all-nodes
Name 	    Number of Members 	 plugins 	 tasks
all-nodes 	0 			         0 		     0
```

Join our running snapd into this agreement:
```
$ snapctl agreement join all-nodes `hostname`
Name 	    Number of Members 	 plugins 	 tasks
all-nodes 	1 			         0   		 0
```

### Joining other snapd into an existing tribe
Since tribe is implemented on top of a gossip based protocol there is no "master." All other nodes who join a tribe by communicating with any existing member.

Start another instance of snapd to join to our existing tribe. The local IP address is 192.168.136.176 in our example. Note that we need a few more parameters to avoid conflicting ports on a single system:
```
$ snapd --tribe -t 0 --tribe-port 6001 --api-port 8182 --tribe-node-name secondnodename --tribe-seed 192.168.136.176:6000
```

Both snapd instances will see each other in their member list:
```
$ snapctl member list
Name
secondnodename
firstnode
```

This member needs to join the agreement:
```
$ snapctl agreement join all-nodes secondnodename
Name 		 Number of Members 	 plugins 	 tasks
all-nodes 	 2       			 0 		     0
```

From this point forward, any plugins or tasks you load will load into both members of this agreement.

## Examples

*Starting a 4 node cluster and listing members*
![tribe-start-list-members](http://i.giphy.com/xTk9ZZFdTeIFBFZgPu.gif)

*Note: Once the cluster is started subsequent new nodes can choose to establish
membership through **any** node as there is no "master".*

*Creating an agreement and joining members to it*
![tribe-create-join-agreement](http://i.giphy.com/d2YTZ5P1N0Gh4WJ2.gif)

In the example below an agreement has been created and all members of the
cluster have joined it.  After loading a collector and publishing
plugin and starting a task on one node we demonstrate that the plugins and
tasks are now running on all of the other nodes in the agreement.

*Loading plugins and starting a task on a node participating in an agreement*
![tribe-load-start](http://i.giphy.com/3o8doZ9e9MX6ZOH4Iw.gif)


text:
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
import { ClinicDashboardCacheService } from 'src/app/clinic-dashboard/services/clinic-dashboard-cache.service';
import { filter, map, switchMap } from 'rxjs/operators';
import { of } from 'rxjs';

@Component({
  selector: 'app-dqa-reports',
  templateUrl: './dqa-reports.component.html',
  styleUrls: ['./dqa-reports.component.css']
})
export class DqaReportsComponent implements OnInit {
  public title = 'DQA Report';
  public navigationEnd: any;
  public routePathParam: any;
  public multipleLocation = false;
  public dqaReportTypes: any = require('./dqa-reports.json');
  constructor(
    private router: Router,
    public clinicDashboardCacheService: ClinicDashboardCacheService,
    private route: ActivatedRoute
  ) {}

  ngOnInit() {
    this.route.data.subscribe((url) => {
      if (url.multipleLocation) {
        this.multipleLocation = url.multipleLocation;
      }
    });
  }

  public navigateToReport(reportName: any) {
    if (this.multipleLocation) {
      this.router.navigate(['dqa-filter'], {
        relativeTo: this.route,
        queryParams: {
          reportId: reportName.id
        }
      });
    } else {
      this.route.parent.parent.params.subscribe((params) => {
        const locationUuid = params['location_uuid'];
        console.log(locationUuid);
        this.router.navigate(['dqa-report-patientlist'], {
          relativeTo: this.route,
          queryParams: {
            reportId: reportName.id,
            locationUuids: params['location_uuid']
          }
        });
      });
    }
  }
}