text:
<?php
if ( ! defined( 'ABSPATH' ) ) {
	die( '-1' );
}

require_once vc_path_dir( 'SHORTCODES_DIR', 'vc-column.php' );

/**
 * Class WPBakeryShortCode_Vc_Gitem_Col
 */
class WPBakeryShortCode_Vc_Gitem_Col extends WPBakeryShortCode_Vc_Column {
	public $nonDraggableClass = 'vc-non-draggable-column';

	/**
	 * @param $width
	 * @param $i
	 * @return string
	 * @throws \Exception
	 */
	public function mainHtmlBlockParams( $width, $i ) {
		$sortable = ( vc_user_access_check_shortcode_all( $this->shortcode ) ? ' wpb_sortable ' : ' ' . $this->nonDraggableClass . ' ' );

		return 'data-element_type="' . $this->settings['base'] . '" data-vc-column-width="' . wpb_vc_get_column_width_indent( $width[ $i ] ) . '" class="wpb_vc_column wpb_' . $this->settings['base'] . $sortable . $this->templateWidth() . ' wpb_content_holder"' . $this->customAdminBlockParams();
	}

	/**
	 * @return string
	 */
	public function outputEditorControlAlign() {
		$alignment = array(
			array(
				'name' => 'left',
				'label' => esc_html__( 'Left', 'js_composer' ),
			),
			array(
				'name' => 'center',
				'label' => esc_html__( 'Center', 'js_composer' ),
			),
			array(
				'name' => 'right',
				'label' => esc_html__( 'Right', 'js_composer' ),
			),
		);
		$output = '';
		foreach ( $alignment as $data ) {
			$attr = esc_attr( $data['name'] );
			$output .= sprintf( '', esc_attr( $attr ), $attr, esc_html( $data['label'] ), $attr );
		}

		return $output . '';
	}
}


text:
<?xml version="1.0"?>
<!--

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.lilyproject</groupId>
  <artifactId>lily-hbaseindex-impl</artifactId>
  <name>Lily: HBase Index: Impl</name>

  <parent>
    <groupId>org.lilyproject</groupId>
    <artifactId>lily-hbaseindex</artifactId>
    <version>2.8-SNAPSHOT</version>
    <relativePath>../</relativePath>
  </parent>

  <build>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.lilyproject</groupId>
      <artifactId>lily-hbase-client</artifactId>
    </dependency>

    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-core-asl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.lilyproject</groupId>
      <artifactId>lily-util</artifactId>
    </dependency>

    <dependency>
      <groupId>org.lilyproject</groupId>
      <artifactId>lily-hbase-util</artifactId>
    </dependency>

    <dependency>
      <groupId>org.lilyproject</groupId>
      <artifactId>lily-hbaseindex-base</artifactId>
    </dependency>

    <dependency>
      <groupId>org.lilyproject</groupId>
      <artifactId>lily-hadoop-test-fw</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

    <dependency>
      <groupId>com.gotometrics.orderly</groupId>
      <artifactId>orderly</artifactId>
    </dependency>

  </dependencies>

</project>

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>
<html <?=$this->theme->getClassAttributeFor("html","no-js")?> lang='<?=$lang?>'>

<meta charset='utf-8' />
<meta name='viewport' content='width=device-width initial-scale=1' />
<title><?=$title . $title_append?></title>
<?php if(isset($favicon)): ?><link rel='icon' href='<?=$this->url->asset($favicon)?>'/><?php endif; ?>
<?php foreach($stylesheets as $stylesheet): ?>
<link rel='stylesheet' type='text/css' href='<?=$this->url->asset($stylesheet)?>'/>
<?php endforeach; ?>
<?php if(isset($style)): ?><?php endif; ?>

<div id='wrapper' <?=$this->theme->getClassAttributeFor("wrapper")?>>

<?php if(isset($topheader)) echo $topheader?>
<?php $this->views->render('topheader')?>

<?php if(isset($header)) echo $header?>
<?php $this->views->render('header')?>

<?php if ($this->views->hasContent('navbar')) : ?>

<?php $this->views->render('navbar')?>

<?php endif; ?>

<?php if ($this->views->hasContent('flash')) : ?>

<?php $this->views->render('flash')?>

<?php endif; ?>

<?php if ($this->views->hasContent('featured-1', 'featured-2', 'featured-3')) : ?>

<?php $this->views->render('featured-1')?>

<?php $this->views->render('featured-2')?>

<?php $this->views->render('featured-3')?>

<?php endif; ?>

<div id='wrap-main' <?=$this->theme->getClassAttributeFor("wrap-main")?>>

<?php if ($this->views->hasContent('main')) : ?>
	<div id='main' <?=$this->theme->getClassAttributeFor("main")?>><?php $this->views->render('main')?>

<?php endif; ?>

<?php if ($this->views->hasContent('sidebar')) : ?>
	<div id='sidebar' <?=$this->theme->getClassAttributeFor("sidebar")?>><?php $this->views->render('sidebar')?>

<?php endif; ?>

<?php if ($this->views->hasContent('main-extended')) : ?>
	<div id='main-extended' <?=$this->theme->getClassAttributeFor("main-extended")?>><?php $this->views->render('main-extended')?>

<?php endif; ?>

<?php if ($this->views->hasContent('sidebar-reduced')) : ?>
	<div id='sidebar-reduced' <?=$this->theme->getClassAttributeFor("sidebar-reduced")?>><?php $this->views->render('sidebar-reduced')?>

<?php endif; ?>

<?php if ($this->views->hasContent('fullpage')) : ?>
	<div id='fullpage' <?=$this->theme->getClassAttributeFor("fullpage")?>><?php $this->views->render('fullpage')?>

<?php endif; ?>

<?php if ($this->views->hasContent('triptych-1', 'triptych-2', 'triptych-3')) : ?>
<div id='wrap-triptych' <?=$this->theme->getClassAttributeFor("wrap-triptych")?>>

<?php $this->views->render('triptych-1')?>

<?php $this->views->render('triptych-2')?>

<?php $this->views->render('triptych-3')?>

<?php endif; ?>

<?php if ($this->views->hasContent('footer-col-1', 'footer-col-2', 'footer-col-3', 'footer-col-4')) : ?>
<div id='wrap-footer-col' <?=$this->theme->getClassAttributeFor("wrap-footer-col")?>>

<?php $this->views->render('footer-col-1')?>

<?php $this->views->render('footer-col-2')?>

<?php $this->views->render('footer-col-3')?>

<?php $this->views->render('footer-col-4')?>

<?php endif; ?>

<div id='footer' <?=$this->theme->getClassAttributeFor("footer")?>>
<?php if(isset($footer)) echo $footer?>
<?php $this->views->render('footer')?>

<?php if ($this->views->hasContent('stickyfooter')) : ?>
<div id='stickyfooter' <?=$this->theme->getClassAttributeFor("stickyfooter")?>>
	<?php $this->views->render('fullpage')?>

<?php endif; ?>

<?php if(isset($jquery)):?><?php endif; ?>

<?php if(isset($javascript_include)): foreach($javascript_include as $val): ?>

<?php endforeach; endif; ?>

<?php if(isset($google_analytics)): ?>

<?php endif; ?>


text:
#if NETFX_CORE
namespace HelixToolkit.UWP.Utilities
#else
namespace HelixToolkit.Wpf.SharpDX.Utilities
#endif
{
    using System;
    using System.Diagnostics;
    using System.Globalization;

    public class TokenizerHelper
    {
        private char quoteChar;
        private char argSeparator;
        private string str;
        private int strLen;
        private int charIndex;
        private int currentTokenIndex;
        private int currentTokenLength;
        private bool foundSeparator;

        /// <summary>
        /// Constructor for TokenizerHelper which accepts an IFormatProvider.
        /// If the IFormatProvider is null, we use the thread's IFormatProvider info.
        /// We will use ',' as the list separator, unless it's the same as the
        /// decimal separator.  If it *is*, then we can't determine if, say, "23,5" is one
        /// number or two.  In this case, we will use ";" as the separator.
        /// </summary>
        /// <param name="str"> The string which will be tokenized. </param>
        /// <param name="formatProvider"> The IFormatProvider which controls this tokenization. </param>
        public TokenizerHelper(string str, IFormatProvider formatProvider)
        {
            char numberSeparator = GetNumericListSeparator(formatProvider);
            this.Initialize(str, '\'', numberSeparator);
        }

        /// <summary>
        /// Initialize the TokenizerHelper with the string to tokenize,
        /// the char which represents quotes and the list separator.
        /// </summary>
        /// <param name="str"> The string to tokenize. </param>
        /// <param name="quoteChar"> The quote char. </param>
        /// <param name="separator"> The list separator. </param>
        public TokenizerHelper(string str, char quoteChar, char separator)
        {
            this.Initialize(str, quoteChar, separator);
        }

        /// <summary>
        /// Initialize the TokenizerHelper with the string to tokenize,
        /// the char which represents quotes and the list separator.
        /// </summary>
        /// <param name="str"> The string to tokenize. </param>
        /// <param name="quoteChar"> The quote char. </param>
        /// <param name="separator"> The list separator. </param>
        private void Initialize(string str, char quoteChar, char separator)
        {
            this.str = str;
            this.strLen = str == null ? 0 : str.Length;
            this.currentTokenIndex = -1;
            this.quoteChar = quoteChar;
            this.argSeparator = separator;

            // immediately forward past any whitespace so
            // NextToken() logic always starts on the first
            // character of the next token.
            while (this.charIndex < this.strLen)
            {
                if (!Char.IsWhiteSpace(this.str, this.charIndex))
                {
                    break;
                }

                ++this.charIndex;
            }
        }

        public string GetCurrentToken()
        {
            // if no current token, return null
            if (this.currentTokenIndex < 0)
            {
                return null;
            }

            return this.str.Substring(this.currentTokenIndex, this.currentTokenLength);
        }

        /// <summary>
        /// Throws an exception if there is any non-whitespace left un-parsed.
        /// </summary>
        public void LastTokenRequired()
        {
            if (this.charIndex != this.strLen)
            {
                throw new InvalidOperationException("TokenizerHelperExtraDataEncountered");
            }
        }

        /// <summary>
        /// Advances to the NextToken
        /// </summary>
        /// <returns>true if next token was found, false if at end of string</returns>
        public bool NextToken()
        {
            return NextToken(false);
        }

        /// <summary>
        /// Advances to the NextToken, throwing an exception if not present
        /// </summary>
        /// <returns>The next token found</returns>
        public string NextTokenRequired()
        {
            if (!NextToken(false))
            {
                throw new InvalidOperationException("TokenizerHelperPrematureStringTermination");
            }

            return GetCurrentToken();
        }

        /// <summary>
        /// Advances to the NextToken, throwing an exception if not present
        /// </summary>
        /// <returns>The next token found</returns>
        public string NextTokenRequired(bool allowQuotedToken)
        {
            if (!NextToken(allowQuotedToken))
            {
                throw new InvalidOperationException("TokenizerHelperPrematureStringTermination");
            }

            return GetCurrentToken();
        }

        /// <summary>
        /// Advances to the NextToken
        /// </summary>
        /// <returns>true if next token was found, false if at end of string</returns>
        public bool NextToken(bool allowQuotedToken)
        {
            // use the currently-set separator character.
            return NextToken(allowQuotedToken, this.argSeparator);
        }

        /// <summary>
        /// Advances to the NextToken.  A separator character can be specified
        /// which overrides the one previously set.
        /// </summary>
        /// <returns>true if next token was found, false if at end of string</returns>
        public bool NextToken(bool allowQuotedToken, char separator)
        {
            this.currentTokenIndex = -1; // reset the currentTokenIndex
            this.foundSeparator = false; // reset

            // If we're at end of the string, just return false.
            if (this.charIndex >= this.strLen)
            {
                return false;
            }

            char currentChar = this.str[this.charIndex];

            Debug.Assert(!Char.IsWhiteSpace(currentChar), "Token started on Whitespace");

            // setup the quoteCount
            int quoteCount = 0;

            // If we are allowing a quoted token and this token begins with a quote,
            // set up the quote count and skip the initial quote
            if (allowQuotedToken &&
                currentChar == this.quoteChar)
            {
                quoteCount++; // increment quote count
                ++this.charIndex; // move to next character
            }

            int newTokenIndex = this.charIndex;
            int newTokenLength = 0;

            // loop until hit end of string or hit a , or whitespace
            // if at end of string ust return false.
            while (this.charIndex < this.strLen)
            {
                currentChar = this.str[this.charIndex];

                // if have a QuoteCount and this is a quote
                // decrement the quoteCount
                if (quoteCount > 0)
                {
                    // if anything but a quoteChar we move on
                    if (currentChar == this.quoteChar)
                    {
                        --quoteCount;

                        // if at zero which it always should for now
                        // break out of the loop
                        if (0 == quoteCount)
                        {
                            ++this.charIndex; // move past the quote
                            break;
                        }
                    }
                }
                else if ((Char.IsWhiteSpace(currentChar)) || (currentChar == separator))
                {
                    if (currentChar == separator)
                    {
                        this.foundSeparator = true;
                    }
                    break;
                }

                ++this.charIndex;
                ++newTokenLength;
            }

            // if quoteCount isn't zero we hit the end of the string
            // before the ending quote
            if (quoteCount > 0)
            {
                throw new InvalidOperationException("TokenizerHelperMissingEndQuote");
            }

            ScanToNextToken(separator); // move so at the start of the nextToken for next call

            // finally made it, update the _currentToken values
            this.currentTokenIndex = newTokenIndex;
            this.currentTokenLength = newTokenLength;

            if (this.currentTokenLength < 1)
            {
                throw new InvalidOperationException("TokenizerHelperEmptyToken");
            }

            return true;
        }

        // helper to move the _charIndex to the next token or to the end of the string
        private void ScanToNextToken(char separator)
        {
            // if already at end of the string don't bother
            if (this.charIndex < this.strLen)
            {
                char currentChar = this.str[this.charIndex];

                // check that the currentChar is a space or the separator.  If not
                // we have an error. this can happen in the quote case
                // that the char after the quotes string isn't a char.
                if (!(currentChar == separator) &&
                    !Char.IsWhiteSpace(currentChar))
                {
                    throw new InvalidOperationException("TokenizerHelperExtraDataEncountered");
                }

                // loop until hit a character that isn't
                // an argument separator or whitespace.
                // !!!Todo: if more than one argSet throw an exception
                int argSepCount = 0;
                while (this.charIndex < this.strLen)
                {
                    currentChar = this.str[this.charIndex];

                    if (currentChar == separator)
                    {
                        this.foundSeparator = true;
                        ++argSepCount;
                        this.charIndex++;

                        if (argSepCount > 1)
                        {
                            throw new InvalidOperationException("TokenizerHelperEmptyToken");
                        }
                    }
                    else if (Char.IsWhiteSpace(currentChar))
                    {
                        ++this.charIndex;
                    }
                    else
                    {
                        break;
                    }
                }

                // if there was a separatorChar then we shouldn't be
                // at the end of string or means there was a separator
                // but there isn't an arg

                if (argSepCount > 0 && this.charIndex >= this.strLen)
                {
                    throw new InvalidOperationException("TokenizerHelperEmptyToken");
                }
            }
        }

        // Helper to get the numeric list separator for a given IFormatProvider.
        // Separator is a comma [,] if the decimal separator is not a comma, or a semicolon [;] otherwise.
        public static char GetNumericListSeparator(IFormatProvider provider)
        {
            char numericSeparator = ',';

            // Get the NumberFormatInfo out of the provider, if possible
            // If the IFormatProvider doesn't not contain a NumberFormatInfo, then
            // this method returns the current culture's NumberFormatInfo.
            NumberFormatInfo numberFormat = NumberFormatInfo.GetInstance(provider);

            Debug.Assert(null != numberFormat);

            // Is the decimal separator is the same as the list separator?
            // If so, we use the ";".
            if ((numberFormat.NumberDecimalSeparator.Length > 0) && (numericSeparator == numberFormat.NumberDecimalSeparator[0]))
            {
                numericSeparator = ';';
            }

            return numericSeparator;
        }

        public bool FoundSeparator
        {
            get
            {
                return this.foundSeparator;
            }
        }
    }
}


text:
package timecloud;

import java.util.logging.Level;
import java.util.logging.Logger;
import timecloud.controller.database.DatabaseController;
import timecloud.controller.database.DatabaseControllerSQLiteImpl;
import timecloud.controller.episode.EpisodeController;
import timecloud.controller.episode.EpisodeControllerImpl;
import timecloud.controller.file.data.cod.CodDataFileController;
import timecloud.controller.file.data.cod.CodDataFileControllerImpl;
import timecloud.controller.file.data.emergency.EmergencyDataFileController;
import timecloud.controller.file.data.emergency.EmergencyDataFileControllerImpl;
import timecloud.controller.request.RequestController;
import timecloud.controller.request.RequestControllerImpl;
import timecloud.controller.transfer.TransferController;
import timecloud.controller.transfer.TransferControllerImpl;
import timecloud.dao.episode.EpisodeDAO;
import timecloud.dao.episode.EpisodeDaoImpl;
import timecloud.dao.request.RequestDAO;
import timecloud.dao.request.RequestDaoImpl;
import timecloud.dao.transfer.TransferDAO;
import timecloud.dao.transfer.TransferDaoImpl;

/**
 * This is the startup class for the TimeCloud program
 *
 * @author Pieter Van Eeckhout
 */
public class TimeCloud {

    /**
     *
     * Startup method of TimeCloud
     *
     * @param args the command line arguments (not used)
     */
    public static void main(String[] args) {
        try {
            DatabaseController databaseController = new DatabaseControllerSQLiteImpl("C:\\TEMP\\TimeCloud2");
            EpisodeDAO episodeDao = new EpisodeDaoImpl(databaseController);
            TransferDAO transferDao = new TransferDaoImpl(databaseController);
            RequestDAO requestDao = new RequestDaoImpl(databaseController);
            EpisodeController episodeController = new EpisodeControllerImpl(episodeDao);
            TransferController transferController = new TransferControllerImpl(transferDao);
            RequestController requestController = new RequestControllerImpl(requestDao);
            EmergencyDataFileController emergencyDataFileController = new EmergencyDataFileControllerImpl(episodeDao, transferDao);
            CodDataFileController codDataFileController = new CodDataFileControllerImpl(requestDao);
            emergencyDataFileController.addObserver(episodeController);
            emergencyDataFileController.addObserver(transferController);
            codDataFileController.addObserver(requestController);

            String path = "D:\\Pieter Van Eechout\\Dropbox\\Database voor data masterproef\\Kwantitatief onderzoek masterproef\\Data spoed\\";
            String emergencyFiles[] = {"Opnames op periode 03.03-10.03.xls","Opnames op periode 10.03 -17.03.xls","Opnames op periode 17.02 -03.04.xls","Opnames op periode 17.03 tot 02.04.xls","Opnames op periode 07.03 -22.04.xls"};
            String codFiles[] = {"Spoed wachten op COD versie ACMM_2014jantotapril.xls"};

            emergencyDataFileController.readEmergencyDataFile(path, emergencyFiles);
            codDataFileController.readCodDataFile(path, codFiles);

        } catch (Exception ex) {//here we do want to catch the all
            Logger.getLogger(TimeCloud.class.getName()).log(Level.SEVERE, null, ex);
            System.err.println(ex.getMessage());
        }
    }

}


text:
<?php slot('sa_sidemenu'); ?>
<?php
$list = array();
foreach ($categories as $key => $value)
{
  if (count($value))
  {
    $list[$key] = link_to(__($categoryCaptions[$key]), '@member_config?category='.$key);
  }
}
op_include_parts('pageNav', 'pageNav', array('list' => $list, 'current' => $categoryName));
?>

<?php
$list = array();

if (saConfig::get('enable_connection'))
{
  $list[] = link_to(__('Connecting with External Application'), '@connection_list');
}

if (saConfig::get('enable_jsonapi'))
{
  $list[] = link_to(__('JSON API Configuration'), '@member_config_jsonapi');
}

if (saConfig::get('enable_openid'))
{
  $list[] = link_to(__('OpenID Configuration'), '@saenid_list');
}

if ($list)
{
  sa_include_parts('pageNav', 'connection', array('list' => $list));
}
?>

<?php
$list = array(link_to(__('Delete your %1% account', array('%1%' => $sa_config['sns_name'])), '@member_delete'));
op_include_parts('pageNav', 'navForDelete', array('list' => $list));
?>
<?php end_slot(); ?>

<?php if ($categoryName && $form->count() > 1): // except CSRF token field ?>
<?php sa_include_form($categoryName.'Form', $form, array('title' => __($categoryCaptions[$categoryName]), 'url' => url_for('@member_config?category='.$categoryName))) ?>
<?php elseif ($categoryName && 1 === $form->count()) : ?>
<?php sa_include_box('configInformation', __('There is no available settings.'), array('title' => __($categoryCaptions[$categoryName]))); ?>
<?php else: ?>
<?php sa_include_box('configInformation', __('Please select the item that wants to be set from the menu.'), array('title' => __('Change Settings'))); ?>
<?php endif; ?>


text:
void addPhysicsAnimation(pybind11::module& m);

#endif  // SRC_PYTHON_PHYSICS_ANIMATION_H_


text:
packager = FoodCourt::Packager.new()
packager.configure
deploy_dir = packager.compile

package :run_chef_solo do
  noop do
    pre :install, 'chef-solo -c /etc/chef/solo.rb -j /etc/chef/dna.json'
  end
end

package :update_dna_config do
  transfer "#{deploy_dir}/dna.json", '/tmp/dna.json' do
    pre :install, "mkdir -p /etc/chef"
    post :install, 'mv /tmp/dna.json /etc/chef/dna.json'
  end
  transfer "#{deploy_dir}/solo.rb", '/tmp/solo.rb' do
    pre :install, "mkdir -p /etc/chef"
    post :install, 'mv /tmp/solo.rb /etc/chef/solo.rb'
  end
end

package :update_cookbooks do
  transfer "#{deploy_dir}/site-cookbooks.tar.gz", "/tmp/site-cookbooks.tar.gz" do
    pre :install, "mkdir -p /var/chef"
    # pre :install, "rm -rf #{packager.config[:file_cache_path]}/site-cookbooks"
    post :install, "tar -zxvf /tmp/site-cookbooks.tar.gz -C #{packager.config[:file_cache_path]}"
  end

  noop do
    packager.config[:cookbooks].each do |book, path|
      cookbook_path = "#{packager.config[:file_cache_path]}/#{book}"
      pre :install, "rm -rf #{cookbook_path}"
      pre :install, "mkdir -p #{cookbook_path}"
      pre :install, "wget --no-check-certificate -O #{packager.config[:file_cache_path]}/#{book}.tar.gz #{path}"
      pre :install, "tar zxvf #{packager.config[:file_cache_path]}/#{book}.tar.gz --strip-components=1 -C #{cookbook_path}"
    end
  end
end

package :update_chef do
  requires :update_dna_config
  requires :update_cookbooks
  requires :run_chef_solo
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  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. See accompanying LICENSE file.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>kerby-tool</artifactId>
        <groupId>org.apache.kerby</groupId>
        <version>2.0.3-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>has-tool</artifactId>
    <name>HAS Tool</name>

    <dependencies>
        <dependency>
            <groupId>org.apache.kerby</groupId>
            <artifactId>has-client</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kerby</groupId>
            <artifactId>has-server</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kerby</groupId>
            <artifactId>has-common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kerby</groupId>
            <artifactId>kdc-tool</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jline</groupId>
            <artifactId>jline</artifactId>
            <version>${jline.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>${jsch.version}</version>
        </dependency>
    </dependencies>

</project>


text:
\chapter{Memory}
\section{Overview}
In most computers  memory is used for storage of programs and data.
In many microcomputers peripheral elements are  also interfaced to the memory busses,
so that reading or writing certain locations actually controls the peripherals.
This obviates the need for special I/O instructions and control lines.
The technique is called {\em memory mapping}.
It is useful where the composition  of systems varies widely, as different peripherals can be easily memory mapped.
Example peripherals include a display controller, a disc controller, Ethernet communications link, keyboard decoder...etc.

Since the only instruction available upon the Ultimate RISC is a memory to memory move, {\em all} functional elements of the system must be memory mapped, including the computer's main registers (table~\ref{table:memory}).
While this makes the control unit simple, part of the burden of complexity is passed to memory, remaining to extract a price on performance.

\begin{table}
\centering
\begin{tabular}{||lrll||}
\hline
\hline

Unit & Address	&	Name & 	 Function\\
\hline
Execution Unit  & & &\\
Write Only &  & &\\
& 0	 & PC		& program counter \\
& 1	  & SKIP	& skip register\\
& 2	 & X		& X index register \\
& 3	 & Y		& Y index register\\
& 4--7 & & duplicates of the above\\
 \hline
ALU: & &  &\\
Writing & & &\\
& 8--F	 & Carry & $Carry \leftarrow data_{0}$\\
& 10	 & CLR	& $Acc \leftarrow 0$\\
& 11	 & SUBR	& $Acc \leftarrow data - Acc$\\
& 12	 & SUB	& $Acc \leftarrow Acc - data$\\
& 13	 & ADD 	& $Acc \leftarrow Acc + data$\\
& 14  	 & XOR  & $Acc \leftarrow Acc \oplus data$\\
& 15	 & OR 	& $Acc \leftarrow Acc \vee data$\\
& 16	 & AND	& $Acc \leftarrow Acc \wedge data$\\
& 17	 & SET 	& $Acc \leftarrow$ \$FFFFFFFF\\
& 18--31 &  	& 10--17 followed by  a  one bit rotate right\\
\hline
ALU: & & &\\
Reading & & &\\
& 8--F  & Acc & Accumulator\\
& 10 & Z & Zero Flag\\
& 11 & N & Negative Flag\\
& 12 & V & Overflow Flag (not supported)\\
& 13 & C & Carry Flag\\
& 14--31 & & 10--13 repeated\\
\hline
Memory: & & &\\
bidirectional & & &\\
& 2000  & RAM		& Random Access Memory\\
& 3FFF &   &\\
\hline
\hline
\end{tabular}

\caption{Memory Map}
\label{table:memory}
\end{table}

\section{Address Decoding}

The memory of the computer needs to be informed when a memory access is required. It must be told the direction of the access, the address to be
used, and, on a write operation, the data which it must write.

During a read cycle it will return either the data stored at that location, or a signal indicating the address was invalid.

Some write operations  trigger one or more signals to different units of the computer, to update internal registers.

A means is needed  of interpreting the address and control signals to generate the required outputs. This is called  {\em address decoding}.

The first decision to be made when designing the address decoder was
the access protocol. A {\em synchronous} memory relies upon the access being completed a certain time after it begins, whereas an {\em asynchronous} memory requires the computer to wait for an acknowledgement signal.
I decided to implement  synchronous  memory, which was simpler but did rely upon the speed of memory being known.  The fifteen
address bits and a {\bf r/$\overline{w}$} signal are used to indicate the location and
direction of the access.
A further signal, {\bf memory select} ({\bf ms}) is used to
actually request a memory access.

To write to an address the computer loads the {\bf address} register with the address
and enables the output on the {\bf data} register. When both are known to
be valid  {\bf ms} is asserted with {\bf r/$\overline{w}$} low, and decode
begins. The signals must remain until it can be guaranteed that the
write will be completed.
 This means  a write operation must include a delay  to allow for ALU operations.

\begin{figure}
\vspace{20cm}
\caption{Memory Access Protocols}
\label{fig:memread}
\end{figure}

To read an address the protocol is similar except the {\bf r/$\overline{w}$} line is set high
and the {\bf data} register is not output onto the bus;  at the end of the read
either the {\bf data} or {\bf instruction} register is loaded with the value on the
data bus.
\subsection{Address Decode Implementation}

Most addresses are  decoded using EPLDS, rather than PALS. This
is slower but provides for  later expansion of memory.
 One EPLD is  used
for decoding the simple signals which can be asserted throughout the
cycle ---the loading of   Execution Unit registers, and the reading of the Accumulator and  condition flags.

A further EPLD is  used for the generation of the one-off signals which
load the {\bf ACC} and {\bf CC} registers after a function evaluation.
It also controls the source of the count signal of the {\bf PC}.
 This EPLD
is clocked to enable it to keep track of time during a write operation, and  contains a finite state machine.

The time to access the Random Access Memory is longer than for  other units, so in order to eliminate unacceptable decoding delays, the $\overline{write}$ and $\overline{Oe}$ signals for this are generated using hard wired logic. This  has a propagation delay of under ten nano-seconds.

To ensure there are no glitches during the decode, I found that the direction of the access must be changed prior to the assertion of {\bf ms}. Problems were caused when the control unit EPLD generated some outputs before others.

\section{Random Access Memory}

The  area of Random Access Memory  needed to be  fast and easy to use.
This is why I decided from the outset to use Static RAM rather than Dynamic RAM, which while cheaper and denser was slower and much harder to interface to.
Deciding how much Static RAM to use, and at what speed  was a major source of problems,  due to cost and
availability considerations.
I had  originally envisaged that the computer would
have a full 128kB memory from four 32k*8 Static RAM ICs.
To increase the  projected speed of the computer I decided to
 use very fast memories, but  being more expensive I had to have a
 smaller amount.
 The suppliers R\&R advertised 16k*4 SRAMS with 25~nS access time, eight of which would have been ideal,
especially with a cost of only \pounds 5.50 each. After much telephoning it
became clear they did not have any in stock.  Another supplier did claim to have these memories, but
\pounds 15 each was too expensive.

Rather than rely on promises of availability I based my design on 8k*8
memories of 45~nS.
Four of these provide 8192 words,
which  places a tight limit upon the size of code which can be executed.


text:
var helper = {};

import secureRandom from 'secure-random';

import {Long} from 'bytebuffer';

import { Signature } from "../../ecc";
import { ops } from "../../serializer";
import {Apis} from "gxbjs-ws";

helper.unique_nonce_entropy = null;
helper.unique_nonce_uint64=function() {
    var entropy = helper.unique_nonce_entropy = ((() => {

            if (helper.unique_nonce_entropy === null) {
                //console.log('... secureRandom.randomUint8Array(1)[0]',secureRandom.randomUint8Array(1)[0])
                return parseInt(secureRandom.randomUint8Array(1)[0]);
            } else {
                return ++helper.unique_nonce_entropy % 256;
            }
    })()
    );
    var long = Long.fromNumber(Date.now());
    //console.log('unique_nonce_uint64 date\t',ByteBuffer.allocate(8).writeUint64(long).toHex(0))
    //console.log('unique_nonce_uint64 entropy\t',ByteBuffer.allocate(8).writeUint64(Long.fromNumber(entropy)).toHex(0))
    long = long.shiftLeft(8).or(Long.fromNumber(entropy));
    //console.log('unique_nonce_uint64 shift8\t',ByteBuffer.allocate(8).writeUint64(long).toHex(0))
    return long.toString();
};

/* Todo, set fees */
helper.to_json=function( tr, broadcast = false ) {
    return (function(tr, broadcast){
        var tr_object = ops.signed_transaction.toObject(tr);
        if (broadcast) {
            var net = Apis.instance().network_api();
            console.log('... tr_object', JSON.stringify(tr_object));
            return net.exec("broadcast_transaction", [tr_object]);
        } else {
            return tr_object;
        }
    }
    )(tr, broadcast);
};

helper.signed_tr_json=function(tr, private_keys){
    var tr_buffer = ops.transaction.toBuffer(tr);
    tr = ops.transaction.toObject(tr);
    tr.signatures = (() => {
        var result = [];
        for (var i = 0; 0 < private_keys.length ? i < private_keys.length : i > private_keys.length; 0 < private_keys.length ? i++ : i++) {
            var private_key = private_keys[i];
            result.push(Signature.signBuffer( tr_buffer, private_key ).toHex());
        }
        return result;
    })();
    return tr;
};

helper.expire_in_min=function(min){
    return Math.round(Date.now() / 1000) + (min*60);
};

helper.seconds_from_now=function(timeout_sec){
    return Math.round(Date.now() / 1000) + timeout_sec;
};

/**
    Print to the console a JSON representation of any object in
    @graphene/serializer { types }
*/
helper.template=function(serializer_operation_type_name, debug = {use_default: true, annotate: true}){
    var so = type[serializer_operation_type_name];
    if (!so) {
        throw new Error(`unknown serializer_operation_type ${serializer_operation_type_name}`);
    }
    return so.toObject(undefined, debug);
};

helper.new_operation=function(serializer_operation_type_name){
    var so = type[serializer_operation_type_name];
    if (!so) {
        throw new Error(`unknown serializer_operation_type ${serializer_operation_type_name}`);
    }
    var object = so.toObject(undefined, {use_default: true, annotate: true});
    return so.fromObject(object);
};

helper.instance=function(ObjectId){
    return ObjectId.substring("0.0.".length);
};

export default helper;


text:
var should = require('should');
var Botkit = require('../');
var path = require('path');
var tmpdir = require('os').tmpdir();
var fs = require('fs');
var winston = require('winston');

var token = process.env.TOKEN;

describe('Test', function() {
    it('should have a token', function(done) {
        should.exist(token);
        done();
    });

    it('should have Botkit instance', function(done) {
        should.exist(Botkit);
        should.exist(Botkit.core);
        should.exist(Botkit.slackbot);
        done();
    });
});

describe('Botkit', function() {
    this.timeout(5000);
    it('should return a package version number', function(done){
        var controller = Botkit.slackbot({debug: false});
        should.exist(controller.version());
        done();
    });

    it('should start and then stop', function(done) {
        var controller = Botkit.slackbot({debug: false});
        var openIsCalled = false;

        controller.on('rtm_open', function(bot) {
            should.exist(bot);
            openIsCalled = true;
        });

        controller.on('rtm_close', function(bot) {
            should.exist(bot);
            openIsCalled.should.be.true;
            controller.shutdown();
            done();
        });

        controller
            .spawn({
                token: token
            })
            .startRTM(function(err, bot, payload) {
                (err === null).should.be.true;
                should.exist(bot);
                bot.closeRTM();
            });
    });

    it('should have fail with false token', function(done) {
        this.timeout(5000);

        var controller = Botkit.slackbot({debug: false});

        controller
            .spawn({
                token: '1234'
            })
            .startRTM(function(err, bot, payload) {
                should.exist(err);

                controller.shutdown();
                done();
            });
    });
});

describe('Log', function() {
    it('should use an external logging provider', function(done) {
        var logFile = path.join(tmpdir, 'botkit.log');
        var logger = new winston.Logger({
            transports: [
                new (winston.transports.File)({ filename: logFile })
            ]
        });

        logger.cli();

        var controller = Botkit.slackbot({
                debug: true,
                logger: logger
            });

        controller
            .spawn({
                token: '1234'
            })
            .startRTM(function(err, bot, payload) {
                should.exist(err);

                controller.shutdown();

                fs.readFile(logFile, 'utf8', function(err, res) {
                    (err === null).should.be.true;
                    should.exist(res);
                    done();
                });
            });
    });
});


text:
<meta charset="UTF-8">
<title>DataViewActivity.showSearchDialog - </title>
<link rel="stylesheet" href="../../style.css">

com.epimorphics.android.myrivers.activities / DataViewActivity / showSearchDialog

showSearchDialog

fun showSearchDialog(): void

Displays a dialog box informing user of the search conditions


text:
namespace chromecast {
namespace {

// How often zx::clock is polled in seconds.
const unsigned int kPollPeriodSeconds = 1;

zx_handle_t GetUtcClockHandle() {
  zx_handle_t clock_handle = zx_utc_reference_get();
  DCHECK(clock_handle != ZX_HANDLE_INVALID);
  return clock_handle;
}

}  // namespace

TimeSyncTrackerFuchsia::TimeSyncTrackerFuchsia(
    scoped_refptr<base::SingleThreadTaskRunner> task_runner)
  : task_runner_(std::move(task_runner)),
    utc_clock_(GetUtcClockHandle()),
    weak_factory_(this) {
  DCHECK(task_runner_);
  weak_this_ = weak_factory_.GetWeakPtr();
}

TimeSyncTrackerFuchsia::~TimeSyncTrackerFuchsia() = default;

void TimeSyncTrackerFuchsia::OnNetworkConnected() {
  if (!is_polling_ && !is_time_synced_) {
    is_polling_ = true;
    task_runner_->PostTask(
        FROM_HERE,
        base::BindOnce(&TimeSyncTrackerFuchsia::Poll, weak_this_));
  }
}

bool TimeSyncTrackerFuchsia::IsTimeSynced() const {
  return is_time_synced_;
}

void TimeSyncTrackerFuchsia::Poll() {
  DCHECK(task_runner_->BelongsToCurrentThread());
  DCHECK(is_polling_);

  zx_clock_details_v1_t details;
  zx_status_t status = utc_clock_->get_details(&details);
  ZX_CHECK(status == ZX_OK, status) << "zx_clock_get_details";

  is_time_synced_ =
    details.backstop_time != details.ticks_to_synthetic.synthetic_offset;
  DVLOG(2) << __func__ << ": backstop_time=" << details.backstop_time
           << ", synthetic_offset=" << details.ticks_to_synthetic.synthetic_offset
           << ", synced=" << is_time_synced_;

  if (!is_time_synced_) {
    task_runner_->PostDelayedTask(
        FROM_HERE, base::BindOnce(&TimeSyncTrackerFuchsia::Poll, weak_this_),
        base::Seconds(kPollPeriodSeconds));
    return;
  }

  is_polling_ = false;
  Notify();
}

}  // namespace chromecast


text:
// Package serviceconfig defines types and methods for operating on gRPC
// service configs.
//
// # Experimental
//
// Notice: This package is EXPERIMENTAL and may be changed or removed in a
// later release.
package serviceconfig

// Config represents an opaque data structure holding a service config.
type Config interface {
	isServiceConfig()
}

// LoadBalancingConfig represents an opaque data structure holding a load
// balancing config.
type LoadBalancingConfig interface {
	isLoadBalancingConfig()
}

// ParseResult contains a service config or an error.  Exactly one must be
// non-nil.
type ParseResult struct {
	Config Config
	Err    error
}


text:
import {connect} from 'react-redux';
import {createPost} from '../../actions/posts';
import NewPostForm from '../../components/new_post_form/new_post_form';

function mapStateToProps({auth}) {
  const {user} = auth;

  return {user};
}

function mapDispatchToProps(dispatch) {
  return {
    createPost: (postData) => {
      dispatch(createPost(postData));
    }
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(NewPostForm);


text:
<?php

namespace TrackerBundle\Entity;

interface HomePageListableInterface
{
    /**
     * @return string
     */
    public function getRoute();

    /**
     * @return string
     */
    public function getCaption();
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Kiwi.GameObjects.Textfield - Kiwi.js</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">

            API Docs for: 1.0.1

APIs

Classes

Modules

            <input type="search" id="api-filter" placeholder="Type to filter APIs">

Kiwi.Animations.Animation

Kiwi.Animations.Sequence

Kiwi.Animations.Tween

Kiwi.Animations.Tweens.Easing.Back

Kiwi.Animations.Tweens.Easing.Bounce

Kiwi.Animations.Tweens.Easing.Circular

Kiwi.Animations.Tweens.Easing.Cubic

Kiwi.Animations.Tweens.Easing.Elastic

Kiwi.Animations.Tweens.Easing.Exponential

Kiwi.Animations.Tweens.Easing.Linear

Kiwi.Animations.Tweens.Easing.Quadratic

Kiwi.Animations.Tweens.Easing.Quartic

Kiwi.Animations.Tweens.Easing.Quintic

Kiwi.Animations.Tweens.Easing.Sinusoidal

Kiwi.Animations.Tweens.TweenManager

Kiwi.Camera

Kiwi.CameraManager

Kiwi.Component

Kiwi.ComponentManager

Kiwi.Components.AnimationManager

Kiwi.Components.ArcadePhysics

Kiwi.Components.Box

Kiwi.Components.Input

Kiwi.Components.Sound

Kiwi.Entity

Kiwi.Files.DataLibrary

Kiwi.Files.File

Kiwi.Files.FileStore

Kiwi.Files.Loader

Kiwi.Game

Kiwi.GameManager

Kiwi.GameObjects.Sprite

Kiwi.GameObjects.StaticImage

Kiwi.GameObjects.Textfield

Kiwi.GameObjects.Tilemap.TileMap

Kiwi.GameObjects.Tilemap.TileMapLayer

Kiwi.GameObjects.Tilemap.TileType

Kiwi.Geom.AABB

Kiwi.Geom.Circle

Kiwi.Geom.Intersect

Kiwi.Geom.IntersectResult

Kiwi.Geom.Line

Kiwi.Geom.Matrix

Kiwi.Geom.Point

Kiwi.Geom.Ray

Kiwi.Geom.Rectangle

Kiwi.Geom.Transform

Kiwi.Geom.Vector2

Kiwi.Group

Kiwi.HUD.HUDComponents.Counter

Kiwi.HUD.HUDComponents.Time

Kiwi.HUD.HUDComponents.WidgetInput

Kiwi.HUD.HUDDisplay

Kiwi.HUD.HUDManager

Kiwi.HUD.HUDWidget

Kiwi.HUD.Widget.Bar

Kiwi.HUD.Widget.BasicScore

Kiwi.HUD.Widget.Button

Kiwi.HUD.Widget.Icon

Kiwi.HUD.Widget.IconBar

Kiwi.HUD.Widget.Menu

Kiwi.HUD.Widget.MenuItem

Kiwi.HUD.Widget.TextField

Kiwi.HUD.Widget.Time

Kiwi.IChild

Kiwi.Input.Finger

Kiwi.Input.InputManager

Kiwi.Input.Key

Kiwi.Input.Keyboard

Kiwi.Input.Keycodes

Kiwi.Input.Mouse

Kiwi.Input.MouseCursor

Kiwi.Input.Pointer

Kiwi.Input.Touch

Kiwi.PluginManager

Kiwi.Renderers.CanvasRenderer

Kiwi.Renderers.GLArrayBuffer

Kiwi.Renderers.GLElementArrayBuffer

Kiwi.Renderers.GLRenderManager

Kiwi.Renderers.GLTextureManager

Kiwi.Renderers.GLTextureWrapper

Kiwi.Renderers.Renderer

Kiwi.Renderers.TextureAtlasRenderer

Kiwi.Shaders.ShaderManager

Kiwi.Shaders.ShaderPair

Kiwi.Shaders.TextureAtlasShader

Kiwi.Signal

Kiwi.SignalBinding

Kiwi.Sound.Audio

Kiwi.Sound.AudioLibrary

Kiwi.Sound.AudioManager

Kiwi.Stage

Kiwi.State

Kiwi.StateConfig

Kiwi.StateManager

Kiwi.System.Bootstrap

Kiwi.System.Device

Kiwi.Textures.SingleImage

Kiwi.Textures.SpriteSheet

Kiwi.Textures.TextureAtlas

Kiwi.Textures.TextureLibrary

Kiwi.Time.Clock

Kiwi.Time.ClockManager

Kiwi.Time.MasterClock

Kiwi.Time.Timer

Kiwi.Time.TimerEvent

Kiwi.Utils.Canvas

Kiwi.Utils.Common

Kiwi.Utils.GameMath

Kiwi.Utils.RandomDataGenerator

Kiwi.Utils.RequestAnimationFrame

Kiwi.Utils.Version

Animations

Components

Easing

Files

GameObjects

Geom

HUD

HUDComponents

Input

Kiwi

Renderers

Shaders

Sound

System

Textures

Tilemap

Time

Tweens

Utils

Widget

        Show:

            <input type="checkbox" id="api-show-inherited" checked>
            Inherited

            <input type="checkbox" id="api-show-protected">
            Protected

            <input type="checkbox" id="api-show-private">
            Private

            <input type="checkbox" id="api-show-deprecated">
            Deprecated

Kiwi.GameObjects.Textfield Class

            Extends Kiwi.Entity

            Defined in: src\gameobjects\Textfield.ts:10

            Module: GameObjects

            Parent Module: Kiwi

Textfield is a GameObject that is used when you are wanting to render text onto the current State. The Textfield is not designed to have any interaction with other GameObjects and as such it does not have many (if any) components or even a width/height.

Constructor

Kiwi.GameObjects.Textfield

            (

                        state

                        text

                        [x=0]

                        [y=0]

                        [color='#000000']

                        [size=32]

                        [weight='normal']

                        [fontFamily='sans-serif']

)

            Textfield

                Defined in

        src\gameobjects\Textfield.ts:10

Parameters:

                        state
                        Kiwi.State

The state that this Textfield belongs to

                        text
                        String

The text that is contained within this textfield.

                        [x=0]
                        Number
                        optional

The new x coordinate from the Position component

                        [y=0]
                        Number
                        optional

The new y coordinate from the Position component

                        [color='#000000']
                        String
                        optional

The color of the text.

                        [size=32]
                        Number
                        optional

The size of the text in pixels.

                        [weight='normal']
                        String
                        optional

The weight of the text.

                        [fontFamily='sans-serif']
                        String
                        optional

The font family that is to be used when rendering.

Returns:

                        Textfield:

This Game Object.

Index

Methods

Properties

Item Index

Methods

                                _renderText

                                destroy

                                objType

                                render

                                renderGL

                                update

Properties

                                _active

                                _alpha

                                _baseline

                                _canvas

                                _cellIndex

                                _clock

                                _ctx

                                _exists

                                _fontColor

                                _fontFamily

                                _fontSize

                                _fontWeight

                                _inputEnabled

                                _parent

                                _tempDirty

                                _text

                                _textAlign

                                _visible

                                _willRender

                                active

                                alpha

                                atlas

                                cellIndex

                                clock

                                color

                                components

                                dirty

                                exists

                                fontFamily

                                fontSize

                                fontWeight

                                game

                                height

                                id

                                inputEnabled

                                name

                                parent

                                rotation

                                rotPointX

                                rotPointY

                                scaleX

                                scaleY

                                state

                                text

                                TEXT_ALIGN_CENTER

                                    static

                                TEXT_ALIGN_LEFT

                                    static

                                TEXT_ALIGN_RIGHT

                                    static

                                transform

                                visibility

                                width

                                willRender

                                x

                                y

Methods

_renderText

        ()

        private

                Defined in

        src\gameobjects\Textfield.ts:278

This method is used to render the text to an offscreen-canvas which is held in a TextureAtlas (which is generated upon the instanitation of this class).
This is so that the canvas doesn't render it every frame as it can be costly and so that it can be used in WebGL with the TextureAtlasRenderer.

destroy

            (

                        [immediate=false]

)

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:514

Used to completely destroy this entity and of its components. Used for garbage collection and developers can also use it as needed.

Parameters:

                        [immediate=false]
                        Boolean
                        optional

If the object should be immediately removed or if it should be removed at the end of the next update loop.

objType

        ()

            String

        public

Inherited from

                Kiwi.Entity

            but overwritten in

        src\gameobjects\Textfield.ts:60

Returns the type of object that this is

Returns:

                        String:

render

            (

                        UNKNOWN

)

        public

Inherited from

                Kiwi.Entity

            but overwritten in

        src\gameobjects\Textfield.ts:334

Called by the Layer to which this Game Object is attached

Parameters:

                        UNKNOWN
                        Kiwi.Camera

renderGL

            (

                        gl

                        camera

                        params

)

        public

Inherited from

                Kiwi.Entity

            but overwritten in

        src\gameobjects\Textfield.ts:384

Renders the GameObject using WebGL.

Parameters:

                        gl
                        WebGLRenderingContext

                        camera
                        Kiwi.Camera

                        params
                        Object

update

        ()

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:478

This isn't called until the Entity has been added to a Group or a State.
Note: If added to a Group, who is not 'active' (so the Groups update loop doesn't run) then each member will not execute either.

Properties

_active

    Boolean

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:356

An active Entity is one that has its update method called by its parent.

Default: true

_alpha

    Number

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:181

The alpha of this entity.

_baseline

    String

        private

                Defined in

        src\gameobjects\Textfield.ts:123

The baseline of the text to be rendered.

_canvas

    HTMLCanvasElement.

        private

                Defined in

        src\gameobjects\Textfield.ts:254

The canvas element which the text is rendered onto.

_cellIndex

    Number

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:254

Holds the current cell that is being used by the entity.

Default: 0

_clock

    Kiwi.Clock

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:424

The clock that this entity use's for time based calculations. This generated by the state on instatiation.

_ctx

    CanvasRenderingContext2D

        private

                Defined in

        src\gameobjects\Textfield.ts:262

The context for the canvas element. Used whilst rendering text.

_exists

    Boolean

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:335

If an Entity no longer exists it is cleared for garbage collection or pool re-allocation

_fontColor

    String

        private

                Defined in

        src\gameobjects\Textfield.ts:96

The color of the text.

Default: '#000000'

_fontFamily

    String

        private

                Defined in

        src\gameobjects\Textfield.ts:105

The font family that is to be rendered.

Default: 'sans-serif'

_fontSize

    Number

        private

                Defined in

        src\gameobjects\Textfield.ts:87

The size of the font.

Default: 32

_fontWeight

    String

        private

                Defined in

        src\gameobjects\Textfield.ts:78

The weight of the font.

Default: 'normal'

_inputEnabled

    Boolean

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:402

Controls if this Entity is input enabled or not (i.e. responds to touch/mouse events)

_parent

    Kiwi.Group

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:55

The group that this entity belongs to. If added onto the state then this is the state.

_tempDirty

    Boolean

                Defined in

        src\gameobjects\Textfield.ts:270

If the temporary canvas is dirty and needs to be re-rendered. Only used when the text field rendering is being optimised.

_text

    String

        private

                Defined in

        src\gameobjects\Textfield.ts:70

The text that is to be rendered.

_textAlign

    String

        private

                Defined in

        src\gameobjects\Textfield.ts:114

The alignment of the text. This can either be 'left', 'right' or 'center'

Default: 'center'

_visible

    Boolean

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:205

A boolean that indicates whether or not this entity is visible or not. Note that is does not get set to false if the alpha is 0.

Default: true

_willRender

    Boolean

        private

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:379

Controls whether render is automatically called by the parent.

Default: true

active

    Boolean

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:365

Toggles the active state of this Entity. An Entity that is active has its update method called by its parent.
This method should be over-ridden to handle specific dom/canvas/webgl implementations.

alpha

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:189

Alpha of this entity. A number between 0 (invisible) and 1 (completely visible).

atlas

    Kiwi.Textures.TextureAtlas

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:246

The texture atlas that is to be used on this entity.

cellIndex

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:263

Used as a reference to a single Cell in the atlas that is to be rendered.
E.g. If you had a spritesheet with 3 frames/cells and you wanted the second frame to be displayed you would change this value to 1

Default: 0

clock

    Kiwi.Time.Clock

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:432

The Clock used to update this all of this Entities components (defaults to the Game MasterClock)

color

    String

        public

                Defined in

        src\gameobjects\Textfield.ts:146

The color of the font that is contained in this textfield.

components

    Kiwi.ComponentManager

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:294

The Component Manager

dirty

    Boolean

        private

Inherited from

                Kiwi.Entity

            but overwritten in

        src\core\Entity.ts:445

A value used by components to control if the Entity needs re-rendering

exists

    Boolean

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:343

Toggles the existence of this Entity. An Entity that no longer exists can be garbage collected or re-allocated in a pool.

fontFamily

    String

        public

                Defined in

        src\gameobjects\Textfield.ts:190

The font family that is being used to render the text.

fontSize

    Number

        public

                Defined in

        src\gameobjects\Textfield.ts:175

The size on font when being displayed onscreen.

fontWeight

    String

        public

                Defined in

        src\gameobjects\Textfield.ts:161

The weight of the font.

game

    Game

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:302

The game this Entity belongs to

height

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:237

The height of the entity in pixels.

Default: 0

id

    String

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:318

A unique identifier for this Entity within the game used internally by the framework. See the name property for a friendly version.

inputEnabled

    Boolean

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:410

Controls if this Entity is input enabled or not (i.e. responds to touch/mouse events)
This method should be over-ridden to handle specific game object implementations.

name

    String

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:326

A name for this Entity. This is not checked for uniqueness within the Game, but is very useful for debugging

Default: ''

parent

    Group

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:63

The group that this entity belongs to/is a child of once added to one. If added onto the state then this is the state.

Sub-properties:

                    val
                    Kiwi.Group

rotation

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:132

Rotation of this Entity. This is just aliased to the transform property.

rotPointX

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:145

The rotation point on the x-axis. This is just aliased to the rotPointX on the transform object.

rotPointY

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:158

The rotation point on the y-axis. This is just aliased to the rotPointY on the transform object.

scaleX

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:105

Scale X of this Entity. This is just aliased to the transform property.

scaleY

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:118

Scale Y coordinate of this Entity. This is just aliased to the transform property.

state

    State

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:310

The state this Entity belongs to (either the current game state or a persistent world state)

text

    String

        public

                Defined in

        src\gameobjects\Textfield.ts:131

The text that you would like to appear in this textfield.

TEXT_ALIGN_CENTER

    String

        public

        final

        static

                Defined in

        src\gameobjects\Textfield.ts:205

A static property that contains the string to center align the text.

TEXT_ALIGN_LEFT

    String

        public

        final

        static

                Defined in

        src\gameobjects\Textfield.ts:225

A static property that contains the string to left align the text.

TEXT_ALIGN_RIGHT

    String

        public

        final

        static

                Defined in

        src\gameobjects\Textfield.ts:215

A static property that contains the string to right align the text.

transform

    Kiwi.Geom.Transform

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:47

Represents the position, scale, rotation and registration of this Entity.

visibility

    Boolean

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:214

Set the visiblity of this entity. True or False.

Default: true

width

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:228

The width of the entity in pixels.

Default: 0

willRender

    Boolean

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:388

Toggles if this Entity will be rendered.

Default: true

x

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:78

X coordinate of this Entity. This is just aliased to the transform property.

y

    Number

        public

Inherited from
                Kiwi.Entity:

        src\core\Entity.ts:91

Y coordinate of this Entity. This is just aliased to the transform property.


text:
function PointDefenseDrone(resources, overrides) {
  Entity.call(this, resources, overrides);
  this.width = 32;
  this.height = 32;
  this.sprite = this.sprites.flash1;

  this.shadow.on = true;
  this.shadow.size = { x: 4, y: 4 };
  this.shadow.shape = "circle";

  this.sounds = { build: "beep" };
  this.game.audio.play(this.sounds.build, 0.9);

  this.alignment = "friendly";
  this.friendlyPierceChance = 0.9;
  this.enemyPierceChance = 0;

  this.orbitRadius = 72;
  this.angularVelocity = 2;

  this.weapon = new MachineGun(this, {
    bulletLifespan: 5,
    damage: 0.5,
    fireRate: 2,
    recoilMultiplier: 0,
    volume: 0.1,
    bulletSpeedVariance: 5,
    flashWidth: 4,
    flashHeight: 7,
    flashOffset: 16
  });
  this.weapon.sounds.fire = "shoot1";
  this.deferSource = this.game.player;

  this.target = null;
}

PointDefenseDrone.prototype = new Entity();

PointDefenseDrone.prototype.constructor = PointDefenseDrone;

PointDefenseDrone.prototype.tick = function() {
  this.rad += 1;
  var rad = Util.deg2rad(this.rad % 360) * this.angularVelocity;
  var pos = Util.aheadPosition(
    this.game.player.x,
    this.game.player.y,
    rad,
    this.orbitRadius
  );
  this.x = pos.x;
  this.y = pos.y;
  this.rotation = rad;

  if (this.age % 2 === 0) {
    if (
      Util.isDefined(this.game.player.nearestEnemy) &&
      this.game.player.distanceToNearestEnemy < 200 &&
      !this.game.player.nearestEnemy.markedForDeletion
    ) {
      this.lookAt(this.game.player.nearestEnemy);
      this.weapon.fireAt(this.game.player.nearestEnemy);
    }
  }
};


text:
from smallinvoice.commons import ObjectWithPositions, BaseJsonEncodableObject, BaseService

class Invoice(ObjectWithPositions):
    def __init__(self, client_id, client_address_id, currency, date, due,
                 language):
        self.client_id = client_id
        self.client_address_id = client_address_id
        self.currency = currency
        self.date = date
        self.due = due
        self.language = language

class Payment(BaseJsonEncodableObject):
    def __init__(self, amount, date, payment_type):
        self.amount = amount
        self.date = date
        self.type = payment_type

class InvoiceState(BaseJsonEncodableObject):
    DRAFT = 0
    SENT = 1
    PAID = 2
    REMINDER = 3

    def __init__(self, status):
        self.status = status

class InvoiceService(BaseService):
    name = 'invoice'

    def payment(self, invoice_id, payment):
        return self.client.request_with_method('invoice/payment/id/%s' % (invoice_id,),
                                               data=payment)


text:
<?php

/**
 * TestSuite class for Selenium 1 tests
 *
 * @package    PHPUnit_Selenium
 * @author     Giorgio Sironi <info@giorgiosironi.com>
 * @copyright  2010-2013 Sebastian Bergmann <sebastian@phpunit.de>
 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
 * @version    Release: @package_version@
 * @link       http://www.phpunit.de/
 * @since      Class available since Release 1.2.0
 */
class PHPUnit_Extensions_SeleniumTestSuite extends PHPUnit_Framework_TestSuite
{
    /**
     * Overriding the default: Selenium suites are always built from a TestCase class.
     * @var boolean
     */
    protected $testCase = TRUE;

    /**
     * Making the method public.
     */
    public function addTestMethod(ReflectionClass $class, ReflectionMethod $method)
    {
        return parent::addTestMethod($class, $method);
    }

    /**
     * @param string $className     extending PHPUnit_Extensions_SeleniumTestCase
     * @return PHPUnit_Extensions_SeleniumTestSuite
     */
    public static function fromTestCaseClass($className)
    {
        $suite = new self();
        $suite->setName($className);

        $class            = new ReflectionClass($className);
        $classGroups      = PHPUnit_Util_Test::getGroups($className);
        $staticProperties = $class->getStaticProperties();
        if (isset($staticProperties['browsers'])) {
            $browsers = $staticProperties['browsers'];
        } else if (is_callable("{$className}::browsers")) {
            $browsers = $className::browsers();
        } else {
            $browsers = null;
        }

        //BC: renamed seleneseDirectory -> selenesePath
        if (!isset($staticProperties['selenesePath']) && isset($staticProperties['seleneseDirectory'])) {
            $staticProperties['selenesePath'] = $staticProperties['seleneseDirectory'];
        }

        // Create tests from Selenese/HTML files.
        if (isset($staticProperties['selenesePath']) &&
            (is_dir($staticProperties['selenesePath']) || is_file($staticProperties['selenesePath']))) {

            if (is_dir($staticProperties['selenesePath'])) {
                $files = array_merge(
                  self::getSeleneseFiles($staticProperties['selenesePath'], '.htm'),
                  self::getSeleneseFiles($staticProperties['selenesePath'], '.html')
                );
            } else {
                $files[] = realpath($staticProperties['selenesePath']);
            }

            // Create tests from Selenese/HTML files for multiple browsers.
            if ($browsers) {
                foreach ($browsers as $browser) {
                    $browserSuite = PHPUnit_Extensions_SeleniumBrowserSuite::fromClassAndBrowser($className, $browser);

                    foreach ($files as $file) {
                        self::addGeneratedTestTo($browserSuite,
                          new $className($file, array(), '', $browser),
                          $classGroups
                        );
                    }

                    $suite->addTest($browserSuite);
                }
            }
            else {
                // Create tests from Selenese/HTML files for single browser.
                foreach ($files as $file) {
                    self::addGeneratedTestTo($suite,
                                              new $className($file),
                                              $classGroups);
                }
            }
        }

        // Create tests from test methods for multiple browsers.
        if ($browsers) {
            foreach ($browsers as $browser) {
                $browserSuite = PHPUnit_Extensions_SeleniumBrowserSuite::fromClassAndBrowser($className, $browser);
                foreach ($class->getMethods() as $method) {
                    $browserSuite->addTestMethod($class, $method);
                }
                $browserSuite->setupSpecificBrowser($browser);

                $suite->addTest($browserSuite);
            }
        }
        else {
            // Create tests from test methods for single browser.
            foreach ($class->getMethods() as $method) {
                $suite->addTestMethod($class, $method);
            }
        }

        return $suite;
    }

    private static function addGeneratedTestTo(PHPUnit_Framework_TestSuite $suite, PHPUnit_Framework_TestCase $test, $classGroups)
    {
        list ($methodName, ) = explode(' ', $test->getName());
        $test->setDependencies(
              PHPUnit_Util_Test::getDependencies(get_class($test), $methodName)
        );
        $suite->addTest($test, $classGroups);
    }

    /**
     * @param  string $directory
     * @param  string $suffix
     * @return array
     */
    private static function getSeleneseFiles($directory, $suffix)
    {
        $facade = new File_Iterator_Facade;

        return $facade->getFilesAsArray($directory, $suffix);
    }

}


text:
"""Imports for Python API.

This file is MACHINE GENERATED! Do not edit.
Generated by: tensorflow/tools/api/generator/create_python_api.py script.
"""
from tensorflow.python.saved_model.signature_def_utils import build_signature_def
from tensorflow.python.saved_model.signature_def_utils import classification_signature_def
from tensorflow.python.saved_model.signature_def_utils import is_valid_signature
from tensorflow.python.saved_model.signature_def_utils import predict_signature_def
from tensorflow.python.saved_model.signature_def_utils import regression_signature_def


text:
**Aloads** is a bunch of cool and fun preloaders for you to use in your projects.

[Check out all the preloaders here!](https://awedoo.github.io/aloads/)

## License
**Aloads** is licensed under the MIT license. (http://opensource.org/licenses/MIT)

## Contributing
Pull requests are the way to go here. I apologise in advance for the slow action on pull requests and issues. I only have one rule for submitting a pull request: let us see a demo of submitted preloaders in a [pen](http://codepen.io). That is important.


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>each_uninstantiated_variable (AI::CSP::Problem)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />

# File ai/csp/problem.rb, line 37
        def each_uninstantiated_variable
            @variables.each { |variable|
                yield variable unless variable.instantiated?
            }
        end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
org.gwoptics.graphics.graph2D (Javadocs: gwoptics)
</TITLE>

<META NAME="date" CONTENT="2013-09-04">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
    Package
      Class
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package org.gwoptics.graphics.graph2D

Interface Summary

IGraph2D
This interface is used to pass to an IGraph2DTrace object.

Class Summary

Axis2D
 Axis2D is a straight forward object for drawing 2D axes.

Graph2D
 Graph2D is a collection of Axis2D objects and IGraphTrace's.

Enum Summary

Axis2D.Alignment
Encapsulates the 3 alignment constants already present in the PConstants
 interface.

LabelPos
This enum is used by the Axis2D object to decide whether the axis laebls
 should be plotted at the beginning, middle, end of the axis, or outside the
 plotting area.

      Overview
    Package
      Class
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

processing library gwoptics by Daniel Brown and Andreas Freise. (c) 2009 onwards


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/content_sample"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context=".SampleActivity"
    tools:showIn="@layout/activity_sample">

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

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

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

</LinearLayout>


text:
namespace IdentityServer.Config
{
    using IdentityServer3.Core.Models;
    using System.Collections.Generic;

    public static class Scopes
    {
        public static List<Scope> Get()
        {
            return new List<Scope>
            {
                StandardScopes.OpenId,
                StandardScopes.Profile,
                StandardScopes.Email,

                new Scope
                {
                    Name = "api",

                    DisplayName = "Access to API",
                    Description = "This will grant you access to the API",

                    ScopeSecrets = new List<Secret>
                    {
                        new Secret("api-secret".Sha256())
                    },

                    Type = ScopeType.Resource
                }
            };
        }
    }
}


text:
option( COVERAGE "Build with gprov information" OFF )

if( COVERAGE )
	if( NOT CLANG AND NOT GCC )
		if( NOT LCOV )
			message( FATAL_ERROR "coverage not available outside of gcc and clang" )
		endif( NOT LCOV )
	endif( NOT CLANG AND NOT GCC )

	find_program( GCOV
		gcov
		/usr/bin
		/usr/local/bin
		/usr/pkg/bin
		/usr/sfw/bin
		/usr/xpg6/bin
		/usr/xpg4/bin
		/opt/csw/bin
	)

	find_program( LCOV
		lcov
		/usr/bin
		/usr/local/bin
		/usr/pkg/bin
		/usr/sfw/bin
		/usr/xpg6/bin
		/usr/xpg4/bin
		/opt/csw/bin
	)

	find_program( GENHTML
		genhtml
		/usr/bin
		/usr/local/bin
		/usr/pkg/bin
		/usr/sfw/bin
		/usr/xpg6/bin
		/usr/xpg4/bin
		/opt/csw/bin
	)

	find_program( FIND
		find
		/bin
		/usr/bin
		/usr/local/bin
		/usr/pkg/bin
		/usr/sfw/bin
		/usr/xpg6/bin
		/usr/xpg4/bin
		/opt/csw/bin
	)

	if( NOT LCOV )
		message( FATAL_ERROR "Could not find lcov" )
	endif( NOT LCOV )

	if( NOT GENHTML )
		message( FATAL_ERROR "Could not find genhtml" )
	endif( NOT GENHTML )

	if( NOT GCOV )
		message( FATAL_ERROR "Could not find gcov" )
	endif( NOT GCOV )

	if( NOT FIND )
		message( FATAL_ERROR "Could not find find" )
	endif( NOT FIND )

	set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -Wno-error -fprofile-arcs -ftest-coverage" )
	set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage" )

	add_custom_target( coverage
		COMMAND lcov --zerocounters --directory .
		COMMAND lcov --capture --initial --directory . --output-file wsh
		COMMAND ${CMAKE_MAKE_PROGRAM} test
		COMMAND lcov --no-checksum --directory . --capture --output-file wsh.info
		COMMAND genhtml -o .. wsh.info
	)

	file( GLOB_RECURSE lcov_files ${CMAKE_CURRENT_SOURCE_DIR}/*.html ${CMAKE_CURRENT_SOURCE_DIR}/*.css ${CMAKE_CURRENT_SOURCE_DIR}/*.png )
	add_custom_target( coverage_clean
		COMMAND rm ${lcov_files}
	)

endif( COVERAGE )


text:
package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	strfmt "github.com/go-openapi/strfmt"

	"github.com/go-openapi/swag"
)

// GeoCoordinates geo coordinates
// swagger:model GeoCoordinates
type GeoCoordinates struct {

	// The latitude of the point on earth in decimal form
	Latitude *float32 `json:"latitude,omitempty"`

	// The longitude of the point on earth in decimal form
	Longitude *float32 `json:"longitude,omitempty"`
}

// Validate validates this geo coordinates
func (m *GeoCoordinates) Validate(formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *GeoCoordinates) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *GeoCoordinates) UnmarshalBinary(b []byte) error {
	var res GeoCoordinates
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}


text:
namespace AdventureWorks.Repository.Main
{
    public interface IReadWriteRepository<T> : IRepository<T>, IEditableRepository<T>
    {
    }
}


text:
package com.netflix.ribbon;

import com.netflix.hystrix.HystrixExecutableInfo;

/**
 * Response object from {@link RequestWithMetaData} that contains the content
 * and the meta data from execution.
 *
 * @author Allen Wang
 *
 * @param <T> Data type of the returned object
 */
public abstract class RibbonResponse<T> {
    public abstract T content();

    public abstract HystrixExecutableInfo<?> getHystrixInfo();
}


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Gama.Cooperacion.Wpf.ViewModels;
using System.Windows.Data;

namespace Gama.Cooperacion.Wpf.Converters
{
    public class ActividadViewToViewModelConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var view = value as FrameworkElement;
            if (view == null)
                return null;

            var viewModel = view.DataContext as EditarActividadViewModel;
            if (viewModel == null)
                return null;

            return viewModel;
        }
    }
}


text:
export const freshAnswer = opts => ({
  isOther: false,
  text: '',
  hasGoToStep: false,
  goToStepByNum: '',
  isLink: false,
  link: '',
  isLinkNew: false,
  linkNew: '',
  isConcern: false,
  concern: '',
  ...opts,
})

export const freshStep = opts => ({
  title: '',
  description: '',
  notes: '',
  type: 'radio',
  inputPlaceholder: '',
  answers: [freshAnswer()],
  flashSpeed: '',
  flashStepNum: '',
  ...opts,
})

export const updateVariableReferencesAfterAddStep = (str, sIdx) =>
  str.replace(/\${(.*?)}/g, (...args) => {
    const key = args[1]
    if (key[0] === 's') {
      const stepNum = Number(key.slice(1))
      if (stepNum > sIdx) {
        return '${' + `s${stepNum + 1}` + '}' // eslint-disable-line no-useless-concat
      }
    }
    return '${' + key + '}' // eslint-disable-line prefer-template
  })

export const updateVariableReferencesAfterRemoveStep = (str, sIdx) =>
  str.replace(/\${(.*?)}/g, (...args) => {
    const key = args[1]
    if (key[0] === 's') {
      const stepNum = Number(key.slice(1))
      if (stepNum === sIdx) {
        throw new Error(`cant remove step that has dependencies: ${sIdx}`)
      }
      if (stepNum > sIdx) {
        return '${' + `s${stepNum - 1}` + '}' // eslint-disable-line no-useless-concat
      }
    }
    return '${' + key + '}' // eslint-disable-line prefer-template
  })

export const updateLogicalJumpsAfterAddStep = (sIdx, nextSteps) =>
  nextSteps.map(step => {
    if (step.title) {
      step.title = updateVariableReferencesAfterAddStep(step.title, sIdx)
    }
    if (step.description) {
      step.description = updateVariableReferencesAfterAddStep(
        step.description,
        sIdx,
      )
    }
    if (step.inputPlaceholder) {
      step.inputPlaceholder = updateVariableReferencesAfterAddStep(
        step.inputPlaceholder,
        sIdx,
      )
    }
    step.answers = step.answers.map(a => {
      if (a.hasGoToStep && Number(a.goToStepByNum) > sIdx) {
        a.goToStepByNum = String(Number(a.goToStepByNum) + 1)
      }
      if (a.text) {
        a.text = updateVariableReferencesAfterAddStep(a.text, sIdx)
      }
      return a
    })
    if (step.hasGoToStep && Number(step.goToStepByNum) > sIdx) {
      step.goToStepByNum = String(Number(step.goToStepByNum) + 1)
    }
    return step
  })

export const updateLogicalJumpsAfterRemoveStep = (sIdx, nextSteps) =>
  nextSteps.map(step => {
    if (step.title) {
      step.title = updateVariableReferencesAfterRemoveStep(step.title, sIdx)
    }
    if (step.description) {
      step.description = updateVariableReferencesAfterRemoveStep(
        step.description,
        sIdx,
      )
    }
    if (step.inputPlaceholder) {
      step.inputPlaceholder = updateVariableReferencesAfterRemoveStep(
        step.inputPlaceholder,
        sIdx,
      )
    }
    step.answers = step.answers.map((a, aIdx) => {
      if (a.hasGoToStep && Number(a.goToStepByNum) > sIdx) {
        a.goToStepByNum = String(Number(a.goToStepByNum) - 1)
      }
      if (a.hasGoToStep && Number(a.goToStepByNum) === sIdx) {
        throw new Error(
          `cant remove step that has dependencies: ${step.title} answer ${aIdx}`,
        )
      }
      if (a.text) {
        a.text = updateVariableReferencesAfterRemoveStep(a.text, sIdx)
      }
      return a
    })
    if (step.hasGoToStep && Number(step.goToStepByNum) > sIdx) {
      step.goToStepByNum = String(Number(step.goToStepByNum) - 1)
    }
    if (step.hasGoToStep && Number(step.goToStepByNum) === sIdx) {
      throw new Error(`cant remove step that has dependencies: ${step.title}`)
    }
    return step
  })

export const getValidationWarnings = state =>
  [].concat(
    ...state.steps
      .reduce(
        (acc, step, sIdx) =>
          acc.concat(
            step.title && strToValidationErrors(step.title),
            step.description && strToValidationErrors(step.description),
            step.notes && strToValidationErrors(step.notes),
            step.inputPlaceholder &&
              strToValidationErrors(step.inputPlaceholder),
            step.answers && step.answers.map(a => validateAnswer(a, sIdx)),
          ),
        [],
      )
      .filter(i => i),
  )

export const strToValidationErrors = str =>
  str.match(/\${[^(s|echo|he|him|his|h)](.*?)}/g)

export const cleanEmptyValues = state => {
  // clear empty values
  state.steps = state.steps.map(step => {
    if (!step.type.match(/radio|checkbox|flash/)) {
      step.answers = []
      return step
    }
    step.answers = step.answers.map(a => {
      if (!a.text) {
        delete a.text
      }
      if (!a.hasGoToStep) {
        delete a.hasGoToStep
        delete a.goToStepByNum
      }
      if (!a.isLink) {
        delete a.isLink
        delete a.link
      }
      if (!a.isLinkNew) {
        delete a.linkNew
      }
      return a
    })
    return step
  })
  return state
}

function validateAnswer(a, sIdx) {
  if (!a.text) {
    return `[step ${sIdx}] - answer without text`
  }
  return strToValidationErrors(a.text)
}


text:
package ri

import (
	"fmt"
)

/* MakeTexture Convert an image in a standard picture file whise name is picturename */
func (r *Ri) MakeTexture(picturename, texturename RtString, swrap, twrap RtToken, filterfunc RtFilterFunc, swidth, twidth RtFloat, parameterlist ...Rter) error {

	var out = []Rter{picturename, texturename, swrap, twrap, filterfunc, swidth, twidth, PARAMETERLIST}
	out = append(out, parameterlist...)

	return r.writef("MakeTexture", out...)
}

func (r *Ri) MakeTextureV(args, tokens, values []Rter) error {

	out := make([]Rter, 0)
	out = append(out, args...)
	out = append(out, PARAMETERLIST)
	out = append(out, Mix(tokens, values)...)

	return r.writef("MakeTexture", out...)
}

/* MakeLatLongEnvironment */
func (r *Ri) MakeLatLongEnvironment(picturename, texturename RtString, filterfunc RtFilterFunc, swidth, twidth RtFloat, parameterlist ...Rter) error {

	var out = []Rter{picturename, texturename, filterfunc, swidth, twidth, PARAMETERLIST}
	out = append(out, parameterlist...)

	return r.writef("MakeLatLongEnvironment", out...)
}

func (r *Ri) MakeLatLongEnvironmentV(args, tokens, values []Rter) error {

	out := make([]Rter, 0)
	out = append(out, args...)
	out = append(out, PARAMETERLIST)
	out = append(out, Mix(tokens, values)...)

	return r.writef("MakeLatLongEnvironment", out...)
}

/* MakeCubeFaceEnviroment */
func (r *Ri) MakeCubeFaceEnvironment(px, nx, py, ny, pz, nz, texturename RtString, fov RtFloat, filterfunc RtFilterFunc, swidth, twidth RtFloat, parameterlist ...Rter) error {

	var out = []Rter{px, nx, py, ny, pz, nz, texturename, fov, filterfunc, swidth, twidth, PARAMETERLIST}
	out = append(out, parameterlist...)

	return r.writef("MakeCubeFaceEnvironment", out...)
}

func (r *Ri) MakeCubeFaceEnvironmentV(args, tokens, values []Rter) error {

	out := make([]Rter, 0)
	out = append(out, args...)
	out = append(out, PARAMETERLIST)
	out = append(out, Mix(tokens, values)...)

	return r.writef("MakeCubeFaceEnvironment", out...)
}

/* MakeShadow */
func (r *Ri) MakeShadow(picturename, texturename RtString, parameterlist ...Rter) error {

	var out = []Rter{picturename, texturename, PARAMETERLIST}
	out = append(out, parameterlist...)

	return r.writef("MakeShadow", out...)
}

func (r *Ri) MakeShadowV(args, tokens, values []Rter) error {

	out := make([]Rter, 0)
	out = append(out, args...)
	out = append(out, PARAMETERLIST)
	out = append(out, Mix(tokens, values)...)

	return r.writef("MakeShadow", out...)
}

/* ArchiveRecord */
func (r *Ri) ArchiveRecord(typeof RtToken, format RtString, args ...interface{}) error {

	var err error

	switch string(typeof) {
	case "comment":

		err = r.writef("#", RtName(fmt.Sprintf(string(format), args...)))
		break
	case "structure":

		err = r.writef("##", RtName(fmt.Sprintf(string(format), args...)))
		break
	case "verbatim":

		err = r.writef("Verbatim", RtName(fmt.Sprintf(string(format), args...)))
		break
	}

	return err
}

func (r *Ri) ArchiveRecordV(args, tokens, values []Rter) error {
	/* FIXME */
	return nil
}

/* ReadArchive */
func (r *Ri) ReadArchive(name RtToken, callback RtArchiveCallbackFunc, parameterlist ...Rter) error {
	/* FIXME, take care of callback ? */
	var out = []Rter{name, PARAMETERLIST}
	out = append(out, parameterlist...)

	return r.writef("ReadArchive", out...)
}

func (r *Ri) ReadArchiveV(args, tokens, values []Rter) error {
	/* FIXME */
	return nil
}


text:
/**
 * @author behrang
 * @file
 * @date Oct 17, 2015
 * @details Image interface class
 */

#ifndef _IMAGE_TYPES_HPP_
#define _IMAGE_TYPES_HPP_

#define OUT

typedef float float32;
typedef double float64;
typedef unsigned char uint8;

/**
 * @details This class can be used for interfacing from other programming languages such as Python.
 * @tparam T    data type of the image elements
 */
template <class T>
struct Imterface
{
    T *data;
    int channels;
    int width;
    int height;
    int xStride;
    int yStride;
    int typeId;
};

template<class T>
struct ImageTypeTrait
{
    static int const value = -1;
};
template<> struct ImageTypeTrait<float32> { static int const value = 0; };
template<> struct ImageTypeTrait<uint8> { static int const value = 1; };
template<> struct ImageTypeTrait<float64> { static int const value = 2; };
template<> struct ImageTypeTrait<int> { static int const value = 3; };

template<typename T>
bool typeCheck(const Imterface<T>& im)
{
    return ImageTypeTrait<T>::value == im.typeId;
}

typedef Imterface<float32> Imterface_f32;

#endif


text:
package org.apache.samza.table.batching;

import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.function.Supplier;
import org.apache.samza.table.ReadWriteTable;
import org.junit.Assert;
import org.junit.Test;

import static java.lang.Thread.sleep;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyList;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class TestBatchProcessor {

  public static class TestCreate {
    @Test
    public void testCreate() {
      final ReadWriteTable<Integer, Integer> table = mock(ReadWriteTable.class);
      final BatchProcessor<Integer, Integer> batchProcessor = createBatchProcessor(table,
          3, Integer.MAX_VALUE);

      // The batch processor initially has no operation.
      Assert.assertEquals(0, batchProcessor.size());
      batchProcessor.processUpdateOperation(new PutOperation<>(1, 1));
      // The batch processor now has one operation.
      Assert.assertEquals(1, batchProcessor.size());
    }
  }

  public static class TestUpdatesAndLookup {
    @Test
    public void testUpdateAndLookup() {
      final ReadWriteTable<Integer, Integer> table = mock(ReadWriteTable.class);
      final BatchProcessor<Integer, Integer> batchProcessor =
          createBatchProcessor(table, Integer.MAX_VALUE, Integer.MAX_VALUE);

      int numberOfPuts = 10;
      for (int i = 0; i < numberOfPuts; i++) {
        batchProcessor.processUpdateOperation(new PutOperation<>(i, i));
      }

      // verify that the number of addBatch operations is correct.
      Assert.assertEquals(numberOfPuts, batchProcessor.size());

      // Verify that the value is correct for each key.
      for (int i = 0; i < numberOfPuts; i++) {
        final Operation<Integer, Integer> operation = batchProcessor.getLastUpdate(i);
        Assert.assertEquals(i, operation.getKey().intValue());
        Assert.assertEquals(i, operation.getValue().intValue());
      }
    }
  }

  public static class TestBatchTriggered {
    @Test
    public void testBatchOperationTriggeredByBatchSize() {
      final int maxBatchSize = 3;
      final CountDownLatch batchCompletionTriggerLatch = new CountDownLatch(1);
      final Supplier<Void> tableUpdateSupplier = () -> {
        try {
          batchCompletionTriggerLatch.await();
        } catch (InterruptedException e) {
          // ignore
        }
        return null;
      };

      final ReadWriteTable<Integer, Integer> table = mock(ReadWriteTable.class);
      when(table.putAllAsync(anyList())).thenReturn(CompletableFuture.supplyAsync(tableUpdateSupplier));

      final BatchProcessor<Integer, Integer> batchProcessor =
          createBatchProcessor(table, maxBatchSize, Integer.MAX_VALUE);

      List<CompletableFuture<Void>> futureList = new ArrayList<>();
      // One batch will be created and sent to the remote table after the for-loop.
      for (int i = 0; i < maxBatchSize; i++) {
        futureList.add(batchProcessor.processUpdateOperation(new PutOperation<>(i, i)));
      }

      for (int i = 0; i < maxBatchSize; i++) {
        Assert.assertFalse(futureList.get(i).isDone());
      }
      Assert.assertEquals(0, batchProcessor.size());

      // Complete the async call to the underlying table
      batchCompletionTriggerLatch.countDown();
      // The latch should eventually trigger completion to the future returned by the batch processor
      CompletableFuture
          .allOf(futureList.toArray(new CompletableFuture[0]))
          .join();
    }

    @Test
    public void testBatchOperationTriggeredByTimer() {
      final int maxBatchDelayMs = 100;
      final int putOperationCount = 100;

      final ReadWriteTable<Integer, Integer> table = mock(ReadWriteTable.class);
      when(table.putAllAsync(any())).thenReturn(CompletableFuture.completedFuture(null));
      when(table.deleteAllAsync(anyList())).thenReturn(CompletableFuture.completedFuture(null));

      final BatchProcessor<Integer, Integer> batchProcessor =
          createBatchProcessor(table, Integer.MAX_VALUE, maxBatchDelayMs);

      for (int i = 0; i < putOperationCount; i++) {
        batchProcessor.processUpdateOperation(new PutOperation<>(i, i));
      }

      // There's one batch with infinite maximum size, it has 100ms maximum delay.
      Assert.assertEquals(putOperationCount, batchProcessor.size());

      try {
        sleep(maxBatchDelayMs * 2);
      } catch (InterruptedException e) {
        // ignore
      }

      // After the timer fired, a new batch will be created.
      Assert.assertEquals(0, batchProcessor.size());
    }
  }

  private static BatchProcessor<Integer, Integer> createBatchProcessor(ReadWriteTable<Integer, Integer> table,
      int maxSize, int maxDelay) {
    final BatchProvider<Integer, Integer> batchProvider = new CompactBatchProvider<Integer, Integer>()
        .withMaxBatchDelay(Duration.ofMillis(maxDelay)).withMaxBatchSize(maxSize);
    final BatchHandler<Integer, Integer> batchHandler = new TableBatchHandler<>(table);
    final BatchMetrics batchMetrics = mock(BatchMetrics.class);
    return new BatchProcessor<>(batchMetrics, batchHandler, batchProvider, () -> 0, Executors.newSingleThreadScheduledExecutor());
  }
}


text:
/*
 * Antonin Bas (antonin@barefootnetworks.com)
 *
 */

#ifndef BM_BM_SIM_BIGNUM_H_
#define BM_BM_SIM_BIGNUM_H_

// will need to implement this ourselves if we do not use Boost
#include <boost/multiprecision/gmp.hpp>

#include <gmp.h>

namespace bm {

namespace bignum {

  using boost::multiprecision::gmp_int;
  using boost::multiprecision::number;

  using Bignum = number<gmp_int>;

  inline size_t export_bytes(char *dst, size_t size, const Bignum &src) {
    size_t count;
    mpz_export(dst, &count, 1, size, 1, 0, src.backend().data());
    return count;
  }

  inline size_t export_size_in_bytes(const Bignum &src) {
    return (mpz_sizeinbase(src.backend().data(), 2) + 7) / 8;
  }

  inline void import_bytes(Bignum *dst, const char *src, size_t size) {
    mpz_import(dst->backend().data(), 1, 1, size, 1, 0, src);
  }

  inline int test_bit(const Bignum &v, size_t index) {
    return mpz_tstbit(v.backend().data(), index);
  }

  inline void clear_bit(Bignum *v, size_t index) {
    return mpz_clrbit(v->backend().data(), index);
  }

}  // namespace bignum

}  // namespace bm

#endif  // BM_BM_SIM_BIGNUM_H_