text:
<?php

session_start();

if ($_SESSION['user'] <> NULL)
{
    include './conexion.php';
    $conn = dbConnect();
    //datos={"usuID":inputCed, "usuCont":inputCont, "usuNick":inputNick, "usuRoles":inputRols};

    @$userid = $_SESSION['userid'];
    @$useremail = $_POST['usuEmail'];
    @$userContex = (int)$_SESSION['acacontext'];

    ///// VERIFICACION DE LA EXISTENCIA DEL NOMBRE DE USUARIO
            $sql2 = 'CALL CONTACTODeleteEmail(:pperson)';
            $stmt2 = $conn->prepare($sql2);
            $stmt2-> bindParam(':pperson', $userid, PDO::PARAM_STR);

            if (($stmt2->execute())=== TRUE)
            {
                $sql3 = 'CALL CONTACTOInsertEmail(:pperson, :pemail)';
                $stmt3 = $conn->prepare($sql3);
                $stmt3-> bindParam(':pperson', $userid, PDO::PARAM_STR);
                $stmt3-> bindParam(':pemail', $useremail, PDO::PARAM_STR);

                if (($stmt3->execute())=== TRUE)
                {

                    //// RESPUESTA POSITIVA DEL SERVIDOR
                    $data=array('msj'=>'Se ha ingresado el nuevo usuario correctamente' ,'estado'=>'ok');
                    echo json_encode($data, JSON_FORCE_OBJECT);

                }
                else
                {
                    $data=array('msj'=>'Error de acceso a los datos del sistema, contacte con servicio tecnico.' ,'estado'=>'ko');
                    echo json_encode($data, JSON_FORCE_OBJECT);
                }
            }
            else
            {
                $data=array('msj'=>'Error de acceso a los datos del sistema, contacte con servicio tecnico.' ,'estado'=>'ko');
                echo json_encode($data, JSON_FORCE_OBJECT);
            }
}
else
            {
                $data=array('msj'=>'No existe una sesion activa basta para acceder a esta funcion.' ,'estado'=>'ko');
                echo json_encode($data, JSON_FORCE_OBJECT);
            }

?>


text:
<?php
/**
 * @package StartupAPI
 * @subpackage Analytics\CohortAnalysis
 */
require_once(__DIR__ . '/admin.php');

$selectedactivityid = null;

if (array_key_exists('activityid', $_REQUEST) && is_numeric($_REQUEST['activityid'])) {
	$selectedactivityid = $_REQUEST['activityid'];
}

$ADMIN_SECTION = 'cohorts';

$BREADCRUMB_EXTRA = null;
if (array_key_exists($selectedactivityid, UserConfig::$activities)) {
	$BREADCRUMB_EXTRA = UserConfig::$activities[$selectedactivityid][0];
}
require_once(__DIR__ . '/header.php');
?>

		<form class="form-horizontal" action="" name="activities" style="margin: 1em 0">

					Select activity

					<select name="activityid" onchange="document.activities.submit();">
						<option value="any">-- any activity --</option>
						<?php
// sorting by point-value of activities
						uksort(UserConfig::$activities, function($a, $b) {
									if (UserConfig::$activities[$a][1] > UserConfig::$activities[$b][1]) {
										return -1;
									} else if (UserConfig::$activities[$a][1] < UserConfig::$activities[$b][1]) {
										return 1;
									}

									return strcmp(UserConfig::$activities[$a][0], UserConfig::$activities[$b][0]);
								});

						$stats = User::getActivityStatistics();

						foreach (UserConfig::$activities as $id => $activity) {
							if (!array_key_exists($id, $stats)) {
								continue;
							}
							?>
							<option value="<?php echo $id ?>"<?php echo $selectedactivityid == $id ? ' selected="yes"' : '' ?>><?php echo $activity[0] ?> (<?php echo $activity[1] ?> points)</option>
						<?php } ?>
					</select>

					<?php
					$boxes = !array_key_exists('boxes', $_REQUEST) || $_REQUEST['boxes'] !== 'set';
					$zoom = array_key_exists('zoom', $_REQUEST);
					?>
					<input type="hidden" name="boxes" value="set"/>

						<input type="checkbox" id="boxes" name="boxes"<?php if ($boxes) { ?> checked<?php } ?> onchange="document.activities.submit();"/>
						<?php if (!$boxes && $zoom) { ?><input type="hidden" name="zoom" value="on"/><?php } ?>
						Show Boxes

						<input type="checkbox"<?php if ($boxes) { ?> id="zoom" name="zoom"<?php } else { ?> disabled<?php } ?><?php if ($boxes && $zoom) { ?> checked<?php } ?> onchange="document.activities.submit();"/>
						Zoom in

					Drop users into cohorts

					<select name="cohorts" onchange="document.activities.submit();">
						<?php
						$requested_cohort_provider = null;
						if (array_key_exists('cohorts', $_REQUEST)) {
							$requested_cohort_provider = $_REQUEST['cohorts'];
						}

						$cohort_provider = null;
						foreach (UserConfig::$cohort_providers as $provider) {
							$id = $provider->getID();

							$selected = false;
							if ($id == $requested_cohort_provider) {
								$cohort_provider = $provider;
								$selected = true;
							}
							?><option value="<?php echo UserTools::escape($id) ?>"<?php if ($selected) { ?> selected="yes"<?php } ?>>
								<?php echo UserTools::escape($provider->getTitle()) ?>
							</option><?php
						}

						if (is_null($cohort_provider)) {
							$cohort_provider = UserConfig::$cohort_providers[0];
						}

						$actperiodtype = 'Month';
						$actperiodlength = 30;

						if (array_key_exists('periodlength', $_REQUEST)) {
							if ($_REQUEST['periodlength'] == 'monthly') {
								$actperiodtype = 'Month';
								$actperiodlength = 30;
							}
							if ($_REQUEST['periodlength'] == 'weekly') {
								$actperiodtype = 'Week';
								$actperiodlength = 7;
							}
							if ($_REQUEST['periodlength'] == 'daily') {
								$actperiodtype = 'Day';
								$actperiodlength = 1;
							}
						}
							?>
					</select>

					Aggregate

					<input type="radio" name="periodlength" value="monthly"<?php if ($actperiodlength == 30) { ?> checked="yes"<?php } ?> onchange="document.activities.submit();"/> Monthly
					<input type="radio" name="periodlength" value="weekly"<?php if ($actperiodlength == 7) { ?> checked="yes"<?php } ?> onchange="document.activities.submit();"/> Weekly
					<input type="radio" name="periodlength" value="daily"<?php if ($actperiodlength == 1) { ?> checked="yes"<?php } ?> onchange="document.activities.submit();"/> Daily

		</form>

	<?php
	$cohort_lookup = array();

	$cohorts = $cohort_provider->getCohorts();
	foreach ($cohorts as $cohort) {
		$cohort_lookup[$cohort->getID()] = $cohort;
	}

	$aggregates = $cohort_provider->getActivityRate($selectedactivityid, $actperiodlength);

	$minactperiod = 0;
	$maxactperiod = $minactperiod;

	$maxvalue = 0;
	foreach (array_keys($aggregates) as $cohort_id) {
		foreach (array_keys($aggregates[$cohort_id]) as $actperiod) {
			if ($actperiod < $minactperiod) {
				continue;
			}

			if ($actperiod > $maxactperiod) {
				$maxactperiod = $actperiod;
			}

			$rate = $aggregates[$cohort_id][$actperiod] / $cohort_lookup[$cohort_id]->getTotal();

			if ($rate > $maxvalue) {
				$maxvalue = $rate;
			}
		}
	}

	$total = 0;

	if (!is_null($aggregates)) {

		$squaresize = 70;
		?>

				<?php echo $cohort_provider->getDimensionTitle() ?>
				<?php
				for ($period = $minactperiod; $period <= $maxactperiod; $period++) {
					?>	<?php echo $actperiodtype . ' ' . $period ?>	<?php
		}
				?>

			<?php
			$total_cohorts = count($cohorts);
			for ($cohort_number = 0; $cohort_number < $total_cohorts; $cohort_number += 1) {
				$cohort = $cohorts[$cohort_number];
				$total_cohort_users = $cohort->getTotal();
				?>
<?php echo $cohort->getTitle() ?>	<?php
		for ($actperiod = $minactperiod; $actperiod <= $maxactperiod; $actperiod++) {
			$cohort_id = $cohort->getID();
					?><?php
			if (array_key_exists($cohort_id, $aggregates)
					&& array_key_exists($actperiod, $aggregates[$cohort_id])) {
				$rate = $aggregates[$cohort_id][$actperiod] / $total_cohort_users;

				$ratepercent = round($rate * 100, 2);
				if ($zoom) {
					$boxsize = ceil(sqrt($squaresize * $squaresize * $rate / $maxvalue));
				} else {
					$boxsize = ceil(sqrt($squaresize * $squaresize * $rate));
				}
						?><div class="outerbox"<?php echo $boxes ? 'title="' . $ratepercent . '% (' . $aggregates[$cohort_id][$actperiod] . ' out of total ' . $total_cohort_users . ' users in this cohort)"' : ''; ?>><?php
				if ($boxes) {
							?>
										<div class="innerbox" style="width: <?php echo $boxsize ?>px; height: <?php echo $boxsize ?>px">

										<?php
									}
									?>
<?php echo $ratepercent ?>%<?php
					if ($cohort_provider->canCompareToPreviousCohort()
							&& $cohort_number < (count($cohorts) - 1)) {
						$prevrate = 0;
						$next_cohort = $cohorts[$cohort_number + 1];
						$next_cohort_id = $next_cohort->getID();

						if (array_key_exists($next_cohort_id, $aggregates) &&
								array_key_exists($actperiod, $aggregates[$next_cohort_id])) {
							$prevrate = $aggregates[$next_cohort_id][$actperiod]
									/ $next_cohort->getTotal();
						}

						$diff = $rate - $prevrate;

						if ($diff > 0) {
											?>
+<?php echo round($diff * 100, 2) ?>%
<?php
					} else if ($diff < 0) {
											?>
<?php echo round($diff * 100, 2) ?>%
<?php
					}
				}
									?>
<?php echo $aggregates[$cohort_id][$actperiod] ?> / <?php echo $total_cohort_users ?>

								<?php
							} else {
								?>
<?php
#			echo '0';
			}
							?>	<?php
			}
						?>
<?php
			}
					?>

		<?php
	}
	?>

<?php
require_once(__DIR__ . '/footer.php');

redpajama_set_name: RedPajamaGithub


text:
TODO
----
- syntactic sugar for other testfkws:
  * Mocha
  * QUnit

* Performance if the browser-tab is in the background:
  - In chrome, executing ui tests via testacular is slow if
    the browser-tab is in the background (i.e. another tab is open and focused).

* Better error handling:
  - error event listener for general errors in iframes
  - how to report? On the next call to ready/inject/...?


text:
package org.nextrtc.examples.videochat_with_rest;

import javax.websocket.server.ServerEndpoint;

import org.nextrtc.signalingserver.api.NextRTCEndpoint;
import org.nextrtc.signalingserver.codec.MessageDecoder;
import org.nextrtc.signalingserver.codec.MessageEncoder;

@ServerEndpoint(value = "/signaling",//
decoders = MessageDecoder.class,//
encoders = MessageEncoder.class)
public class MyEndpoint extends NextRTCEndpoint {
}


text:
#pragma once

#include "TokenStream.h"

namespace antlr4 {

  /**
   * This implementation of {@link TokenStream} loads tokens from a
   * {@link TokenSource} on-demand, and places the tokens in a buffer to provide
   * access to any previous token by index.
   *
   *

   * This token stream ignores the value of {@link Token#getChannel}. If your
   * parser requires the token stream filter tokens to only those on a particular
   * channel, such as {@link Token#DEFAULT_CHANNEL} or
   * {@link Token#HIDDEN_CHANNEL}, use a filtering token stream such a
   * {@link CommonTokenStream}.

   */
  class ANTLR4CPP_PUBLIC BufferedTokenStream : public TokenStream {
  public:
    BufferedTokenStream(TokenSource *tokenSource);
    BufferedTokenStream(const BufferedTokenStream& other) = delete;

    BufferedTokenStream& operator = (const BufferedTokenStream& other) = delete;

    virtual TokenSource* getTokenSource() const override;
    virtual size_t index() override;
    virtual ssize_t mark() override;

    virtual void release(ssize_t marker) override;
    virtual void reset();
    virtual void seek(size_t index) override;

    virtual size_t size() override;
    virtual void consume() override;

    virtual Token* get(size_t i) const override;

    /// Get all tokens from start..stop inclusively.
    virtual std::vector<Token *> get(size_t start, size_t stop);

    virtual size_t LA(ssize_t i) override;
    virtual Token* LT(ssize_t k) override;

    /// Reset this token stream by setting its token source.
    virtual void setTokenSource(TokenSource *tokenSource);
    virtual std::vector<Token *> getTokens();
    virtual std::vector<Token *> getTokens(size_t start, size_t stop);

    ///
    /// Given a start and stop index, return a List of all tokens in
    ///  the token type BitSet.  Return null if no tokens were found.  This
    ///  method looks at both on and off channel tokens.
    ///
    virtual std::vector<Token *> getTokens(size_t start, size_t stop, const std::vector<size_t> &types);
    virtual std::vector<Token *> getTokens(size_t start, size_t stop, size_t ttype);

    /// Collect all tokens on specified channel to the right of
    ///  the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or
    ///  EOF. If channel is -1, find any non default channel token.
    virtual std::vector<Token *> getHiddenTokensToRight(size_t tokenIndex, ssize_t channel);

    ///
    /// Collect all hidden tokens (any off-default channel) to the right of
    ///  the current token up until we see a token on DEFAULT_TOKEN_CHANNEL
    ///  or EOF.
    ///
    virtual std::vector<Token *> getHiddenTokensToRight(size_t tokenIndex);

    ///
    /// Collect all tokens on specified channel to the left of
    ///  the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.
    ///  If channel is -1, find any non default channel token.
    ///
    virtual std::vector<Token *> getHiddenTokensToLeft(size_t tokenIndex, ssize_t channel);

    ///
    /// Collect all hidden tokens (any off-default channel) to the left of
    ///  the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.
    ///
    virtual std::vector<Token *> getHiddenTokensToLeft(size_t tokenIndex);

    virtual std::string getSourceName() const override;
    virtual std::string getText() override;
    virtual std::string getText(const misc::Interval &interval) override;
    virtual std::string getText(RuleContext *ctx) override;
    virtual std::string getText(Token *start, Token *stop) override;

    /// Get all tokens from lexer until EOF.
    virtual void fill();

  protected:
    /**
     * The {@link TokenSource} from which tokens for this stream are fetched.
     */
    TokenSource *_tokenSource;

    /**
     * A collection of all tokens fetched from the token source. The list is
     * considered a complete view of the input once {@link #fetchedEOF} is set
     * to {@code true}.
     */
    std::vector<std::unique_ptr<Token>> _tokens;

    /**
     * The index into {@link #tokens} of the current token (next token to
     * {@link #consume}). {@link #tokens}{@code [}{@link #p}{@code ]} should be
     * {@link #LT LT(1)}.
     *
     *
This field is set to -1 when the stream is first constructed or when
     * {@link #setTokenSource} is called, indicating that the first token has
     * not yet been fetched from the token source. For additional information,
     * see the documentation of {@link IntStream} for a description of
     * Initializing Methods.

     */
    // ml: since -1 requires to make this member signed for just this single aspect we use a member _needSetup instead.
    //     Use bool isInitialized() to find out if this stream has started reading.
    size_t _p;

    /**
     * Indicates whether the {@link Token#EOF} token has been fetched from
     * {@link #tokenSource} and added to {@link #tokens}. This field improves
     * performance for the following cases:
     *
     *

     *
{@link #consume}: The lookahead check in {@link #consume} to prevent
     * consuming the EOF symbol is optimized by checking the values of
     * {@link #fetchedEOF} and {@link #p} instead of calling {@link #LA}.

     *
{@link #fetch}: The check to prevent adding multiple EOF symbols into
     * {@link #tokens} is trivial with this field.

     *

     */
    bool _fetchedEOF;

    ///
    /// Make sure index {@code i} in tokens has a token.
    ///
    /// <returns> {@code true} if a token is located at index {@code i}, otherwise
    ///    {@code false}. </returns>
    /// <seealso cref= #get(int i) </seealso>
    virtual bool sync(size_t i);

    ///
    /// Add {@code n} elements to buffer.
    ///
    /// <returns> The actual number of elements added to the buffer. </returns>
    virtual size_t fetch(size_t n);

    virtual Token* LB(size_t k);

    /// Allowed derived classes to modify the behavior of operations which change
    /// the current stream position by adjusting the target token index of a seek
    /// operation. The default implementation simply returns {@code i}. If an
    /// exception is thrown in this method, the current stream index should not be
    /// changed.
    ///

    /// For example, <seealso cref="CommonTokenStream"/> overrides this method to ensure that
    /// the seek target is always an on-channel token.
    ///
    /// <param name="i"> The target token index. </param>
    /// <returns> The adjusted target token index. </returns>
    virtual ssize_t adjustSeekIndex(size_t i);
    void lazyInit();
    virtual void setup();

    /**
     * Given a starting index, return the index of the next token on channel.
     * Return {@code i} if {@code tokens[i]} is on channel. Return the index of
     * the EOF token if there are no tokens on channel between {@code i} and
     * EOF.
     */
    virtual ssize_t nextTokenOnChannel(size_t i, size_t channel);

    /**
     * Given a starting index, return the index of the previous token on
     * channel. Return {@code i} if {@code tokens[i]} is on channel. Return -1
     * if there are no tokens on channel between {@code i} and 0.
     *
     *

     * If {@code i} specifies an index at or after the EOF token, the EOF token
     * index is returned. This is due to the fact that the EOF token is treated
     * as though it were on every channel.

     */
    virtual ssize_t previousTokenOnChannel(size_t i, size_t channel);

    virtual std::vector<Token *> filterForChannel(size_t from, size_t to, ssize_t channel);

    bool isInitialized() const;

  private:
    bool _needSetup;
    void InitializeInstanceFields();
  };

} // namespace antlr4


text:
<?php

// C:\xampp\htdocs\entities\src\Acme\DemoBundle/Resources/views\Secured\hello.html.twig
return array (
);


text:
<?php
/**
 * Email Addresses (plain)
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-addresses.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see 	    http://docs.woothemes.com/document/template-structure/
 * @author 		WooThemes
 * @package 	WooCommerce/Templates/Emails/Plain
 * @version     2.2.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

echo "\n" . strtoupper( __( 'Billing address', 'woocommerce' ) ) . "\n\n";
echo preg_replace( '#<br\s*/?>#i', "\n", $order->get_formatted_billing_address() ) . "\n";

if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && ( $shipping = $order->get_formatted_shipping_address() ) ) {
	echo "\n" . strtoupper( __( 'Shipping address', 'woocommerce' ) ) . "\n\n";
	echo preg_replace( '#<br\s*/?>#i', "\n", $shipping ) . "\n";
}


text:
-- phpMyAdmin SQL Dump
-- version 3.2.2-rc1
-- http://www.phpmyadmin.net
--
-- Počítač: localhost
-- Vygenerováno: Sobota 18. května 2013, 10:24
-- Verze MySQL: 5.1.66
-- Verze PHP: 5.3.3-7+squeeze15

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES cp1250 */;

--
-- Databáze: `savannah_meliorannis`
--

-- --------------------------------------------------------

--
-- Struktura tabulky `archiv_branek`
--

CREATE TABLE IF NOT EXISTS `archiv_branek` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_archiv_uziv` int(11) NOT NULL DEFAULT '0',
  `ID_veky` int(11) NOT NULL DEFAULT '0',
  `privacy` int(11) NOT NULL DEFAULT '0',
  `datum` int(11) NOT NULL DEFAULT '0',
  `cisloBrany` int(11) NOT NULL DEFAULT '0',
  `pred` text COLLATE utf8_czech_ci NOT NULL,
  `po` text COLLATE utf8_czech_ci NOT NULL,
  `boj` text COLLATE utf8_czech_ci NOT NULL,
  `kouzla` text COLLATE utf8_czech_ci NOT NULL,
  `stit` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  `OT` int(11) NOT NULL DEFAULT '0',
  `povolani` set('Alchymista','Barbar','Druid','Hraničář','Iluzionista','Klerik','Mág','Nekromant','Theurg','Válečník','Amazonka','Vědma') COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  `presvedceni` set('D','Z','N') COLLATE utf8_czech_ci NOT NULL DEFAULT 'D',
  `ztraty_utok` double NOT NULL DEFAULT '0',
  `ztraty_obrana` double NOT NULL DEFAULT '0',
  `sila` int(11) NOT NULL DEFAULT '0',
  `komentar` text COLLATE utf8_czech_ci NOT NULL,
  `popisek` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  `upkeepy_pred` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '0|0|0|0|0|0',
  `upkeepy_po` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '0|0|0|0|0|0',
  PRIMARY KEY (`ID`),
  KEY `ID_archiv_uziv` (`ID_archiv_uziv`),
  KEY `ID_veky` (`ID_veky`),
  KEY `cisloBrany` (`cisloBrany`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6228 ;

-- --------------------------------------------------------

--
-- Struktura tabulky `archiv_statusy`
--

CREATE TABLE IF NOT EXISTS `archiv_statusy` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `barva` varchar(7) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  `cislo` int(11) NOT NULL DEFAULT '0',
  `text` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=5 ;

-- --------------------------------------------------------

--
-- Struktura tabulky `archiv_uzivatele`
--

CREATE TABLE IF NOT EXISTS `archiv_uzivatele` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `status` int(11) NOT NULL DEFAULT '0',
  `login` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  `heslo` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  `nick` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `login` (`login`),
  UNIQUE KEY `nick` (`nick`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=863 ;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


text: python vector_add.py


text:
import sys, os, argparse
from plumbum.cmd import awk, fping

SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))

sys.path.append(os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)))

import utils

sys.path.append(os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, "job_runner")))

import redis_utils

def cluster_utils(command, coordinator_db):
    nodes = coordinator_db.known_nodes

    if command == "live":
        shell_command = fping["-a"]
        for node in nodes:
            shell_command = shell_command[node]
        shell_command = shell_command | awk['{print $1}']
        live_nodes = shell_command()
        live_nodes = live_nodes.encode("ascii")
        live_nodes = live_nodes.strip().split("\n")
        live_nodes = filter(lambda x : len(x) > 0, live_nodes)

        nodes = live_nodes

    internal_ips = []
    for node in nodes:
        internal_ips.append(coordinator_db.redis_client.hget("internal_ip", node))
    internal_ips = ",".join(internal_ips)

    print internal_ips

def main():

    parser = argparse.ArgumentParser(
        description="Cluster utility program for getting IP addresses")
    utils.add_redis_params(parser)
    parser.add_argument(
        "command", help="Utility command. Valid commands: all, live")
    args = parser.parse_args()

    coordinator_db = redis_utils.CoordinatorDB(
        args.redis_host, args.redis_port, args.redis_db)

    assert args.command in ["all", "live"]

    return cluster_utils(args.command, coordinator_db)

if __name__ == "__main__":
    sys.exit(main())


text:
package org.jaggeryjs.jaggery.tools;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.jaggeryjs.jaggery.core.ScriptReader;
import org.jaggeryjs.jaggery.core.manager.CommandLineManager;
import org.jaggeryjs.jaggery.core.manager.CommonManager;
import org.jaggeryjs.scriptengine.engine.JaggeryContext;
import org.jaggeryjs.scriptengine.engine.RhinoEngine;
import org.mozilla.javascript.ScriptableObject;

import java.io.*;

/**
 * Jaggery CommnadLineExecutor - this will parse file URLs or expressions by
 * runtime Jaggery engine
 */
final class CommandLineExecutor {

    private static PrintStream out = System.out;
    private static String DEFAULT_TENANTDOMAIN = "carbon.super";

    private CommandLineExecutor() {
        //disable external instantiation
    }

    /**
     * Parse Jaggery scripts resides in the file path
     *
     * @param fileURL url of the file
     */

	@SuppressFBWarnings("PATH_TRAVERSAL_IN")
    static void parseJaggeryScript(final String fileURL) {
		FileInputStream fstream = null;
        try{
            //Initialize the Rhino context
            RhinoEngine.enterGlobalContext();
            fstream = new FileInputStream(fileURL);
            final RhinoEngine engine = CommandLineManager.getCommandLineEngine();
            final ScriptableObject scope = engine.getRuntimeScope();
            //initialize JaggeryContext
            final JaggeryContext jaggeryContext = new JaggeryContext();
            jaggeryContext.setTenantDomain(DEFAULT_TENANTDOMAIN);
            jaggeryContext.setEngine(engine);
            jaggeryContext.setScope(scope);
            jaggeryContext.addProperty(CommonManager.JAGGERY_OUTPUT_STREAM, System.out);
            RhinoEngine.putContextProperty("jaggeryContext", jaggeryContext);
            //Parsing the script
            final Reader source = new ScriptReader(new BufferedInputStream(fstream));
            out.println("\n");
            ShellUtilityService.initializeUtilityServices();
            engine.exec(source, scope, null);
            ShellUtilityService.destroyUtilityServices();
            out.flush();
            out.println("\n");
        } catch (Exception e) {
            out.println("\n");
            out.println("Error: " + e.getMessage());
            out.println("\n");
        } finally {
			if (fstream != null){
				try {
					fstream.close();
				} catch (IOException ignored) {
				}
			}
		}

    }

    /**
     * Parse Jaggery expressions
     *
     * @param expression Jaggery expression string
     */
    static void parseJaggeryExpression(final String expression) {
        try {
            //Initialize the Rhino context
            RhinoEngine.enterGlobalContext();
            final RhinoEngine engine = CommandLineManager.getCommandLineEngine();
            final ScriptableObject scope = engine.getRuntimeScope();
            //initialize JaggeryContext
            final JaggeryContext jaggeryContext = new JaggeryContext();
            jaggeryContext.setTenantDomain("ca");
            jaggeryContext.setEngine(engine);
            jaggeryContext.setScope(scope);
            jaggeryContext.addProperty(CommonManager.JAGGERY_OUTPUT_STREAM, out);
            RhinoEngine.putContextProperty("jaggeryContext", jaggeryContext);
            //Parsing the script
            ShellUtilityService.initializeUtilityServices();
            engine.exec(new StringReader(expression), scope, null);
            ShellUtilityService.destroyUtilityServices();
            out.flush();
        } catch (Exception e) {
            out.println("Error: " + e.getMessage());
        }
    }
}


text:
require "test_helper"

class GovspeakLinkTest < Minitest::Test
  test "embedded link with link provided" do
    link = {
      content_id: "5572fee5-f38f-4641-8ffa-64fed9230ad4",
      url: "https://www.gov.uk/example",
      title: "Example page",
    }
    govspeak = "[embed:link:5572fee5-f38f-4641-8ffa-64fed9230ad4]"
    rendered = Govspeak::Document.new(govspeak, links: link).to_html
    expected = %r{Example page}
    assert_match(expected, rendered)
  end

  test "embedded link with markdown title" do
    link = {
      content_id: "5572fee5-f38f-4641-8ffa-64fed9230ad4",
      url: "https://www.gov.uk/example",
      title: "**Example page**",
    }
    govspeak = "[embed:link:5572fee5-f38f-4641-8ffa-64fed9230ad4]"
    rendered = Govspeak::Document.new(govspeak, links: link).to_html
    expected = %r{Example page}
    assert_match(expected, rendered)
  end

  test "embedded link with external url" do
    link = {
      content_id: "5572fee5-f38f-4641-8ffa-64fed9230ad4",
      url: "https://www.example.com/",
      title: "Example website",
    }
    govspeak = "[embed:link:5572fee5-f38f-4641-8ffa-64fed9230ad4]"
    rendered = Govspeak::Document.new(govspeak, links: link).to_html
    expected = %r{Example website}
    assert_match(expected, rendered)
  end
  test "embedded link with url not provided" do
    link = {
      content_id: "e510f1c1-4862-4333-889c-8d3acd443fbf",
      title: "Example website",
    }
    govspeak = "[embed:link:e510f1c1-4862-4333-889c-8d3acd443fbf]"
    rendered = Govspeak::Document.new(govspeak, links: link).to_html
    assert_match("Example website", rendered)
  end

  test "embedded link without link object" do
    govspeak = "[embed:link:0726637c-8c66-47ad-834a-d815cbf51e0e]"
    rendered = Govspeak::Document.new(govspeak).to_html
    assert_match("", rendered)
  end
end


text:
import React, { Component } from 'react';
import * as d3 from "d3";

const innerRadius = 90;
const outerRadius = 110;
const cornerRadius = 5;

const pieGenerator = d3.pie();

class Arc extends Component {
	constructor(props) {
		super(props);
		this.state = {
			arcData: pieGenerator(props.data)
		};
	}

	componentDidMount() {
		const context = this.setContextGroup();
		this.setBackground(context);
		this.setForeground(context);
		this.addLabel(context);
	}

	setBackground(context) {
		return context
			.data(pieGenerator([1]))
			.append('path')
			.style('fill', '#e6e6e6')
			.attr('d', this.arc());
	}

	setForeground(context) {
		return context
			.selectAll("path")
			.data(this.state.arcData)
			.enter()
			.append('path')
			.style('fill', (d) => d3.color("hsl(120, 50%, " + d.index * 0.5 / 6 * 100 + "%)"))
			.attr('class', 'credit-arc')
			.attr('id', (d) => "arc_" + d.index) // Unique id for each slice
			.attr('d', this.arc());
	}

	addLabel(context) {
		return context
			.selectAll(".arcsText")
			.data(this.state.arcData)
			.enter()
			.append("text")
			.attr("class", "arcsText")
			.append("textPath")
			.attr("xlink:href", function(d) {return "#arc_"+d.index;})
			.text(function(d) {return d.value;});
	}

	arc() {
		return d3.arc()
			.innerRadius(innerRadius)
			.outerRadius(outerRadius)
			.cornerRadius(cornerRadius);
	}

	setContextGroup() {
		return d3.select(this.refs.arc)
			.append('svg')
			.attr('height', '300px')
			.attr('width', '300px')
			.attr('id', 'd3-arc')
			.append('g')
			.attr('transform', `translate(150, 150)`)
	}

	render() {
		return (

		)
	}
}

export default Arc;


text:
function fl = luflops (L, U)
%LUFLOPS compute the flop count for sparse LU factorization
%
%  Example:
%      fl = luflops (L,U)
%
%  Given a sparse LU factorization (L and U), return the flop count required
%  by a conventional LU factorization algorithm to compute it.   L and U can
%  be either sparse or full matrices.  L must be lower triangular and U must
%  be upper triangular.  Do not attempt to use this on the permuted L from
%  [L,U] = lu (A).  Instead, use [L,U,P] = lu (A) or [L,U,P,Q] = lu (A).
%
%  Note that there is a subtle undercount in this estimate.  Suppose A is
%  completely dense, but during LU factorization exact cancellation occurs,
%  causing some of the entries in L and U to become identically zero.  The
%  flop count returned by this routine is an undercount.  There is a simple
%  way to fix this (L = spones (L) + spones (tril (A))), but the fix is partial.
%  It can also occur that some entry in L is a "symbolic" fill-in (zero in
%  A, but a fill-in entry and thus must be computed), but numerically
%  zero.  The only way to get a reliable LU factorization would be to do a
%  purely symbolic factorization of A.  This cannot be done with
%  symbfact (A, 'col').
%
%  See NA Digest, Vol 00, #50, Tuesday, Dec. 5, 2000
%
% See also symbfact

%    Copyright 1998-2007, Timothy A. Davis

Lnz = full (sum (spones (L))) - 1 ;	% off diagonal nz in cols of L
Unz = full (sum (spones (U')))' - 1 ;	% off diagonal nz in rows of U
fl = 2*Lnz*Unz + sum (Lnz) ;


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('nomi', '0009_auto_20170526_1935'),
    ]

    operations = [
        migrations.AddField(
            model_name='userprofile',
            name='hall',
            field=models.IntegerField(default=1),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='room_no',
            field=models.CharField(max_length=10, null=True),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='year',
            field=models.CharField(choices=[('Y16', 'Y16'), ('Y15', 'Y15'), ('Y14', 'Y14'), ('Y13', 'Y13'), ('Y12', 'Y12'), ('Y11', 'Y11')], default='Y16', max_length=4),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='department',
            field=models.CharField(choices=[('Aerospace Engineering', 'AE'), ('Biological Sciences & Engineering', 'BSBE'), ('Chemical Engineering', 'CHE'), ('Civil Engineering', 'CE'), ('Computer Science & Engineering', 'CSE'), ('Electrical Engineering', 'EE'), ('Materials Science & Engineering', 'MSE'), ('Mechanical Engineering', 'ME'), ('Industrial & Management Engineering', 'IME'), ('Chemistry', 'CHM'), ('Mathematics & Scientific Computing', 'MTH'), ('Physics', 'PHY'), ('Earth Sciences', 'ES')], default=None, max_length=200),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='roll_no',
            field=models.IntegerField(null=True),
        ),
    ]


text: ALTER TABLE {prefix}content CHANGE `systemname` `slug` varchar(255) NOT NULL


text:
using System;
using System.Data;

namespace PCSComUtils.Admin.DS
{
	[Serializable]
	public class sys_RoleWCVO
	{
		private int mRoleWCID;
		private int mRoleID;
		private int mWorkCenterID;

		public int RoleWCID
		{
			set { mRoleWCID = value; }
			get { return mRoleWCID; }
		}
		public int RoleID
		{
			set { mRoleID = value; }
			get { return mRoleID; }
		}
		public int WorkCenterID
		{
			set { mWorkCenterID = value; }
			get { return mWorkCenterID; }
		}
	}
}


text:
package java.nio.file;

/**
 * An event or a repeated event for an object that is registered with a {@link
 * WatchService}.
 *
 *
 An event is classified by its {@link #kind() kind} and has a {@link
 * #count() count} to indicate the number of times that the event has been
 * observed. This allows for efficient representation of repeated events. The
 * {@link #context() context} method returns any context associated with
 * the event. In the case of a repeated event then the context is the same for
 * all events.
 *
 *
 Watch events are immutable and safe for use by multiple concurrent
 * threads.
 *
 * @param   <T>     The type of the context object associated with the event
 *
 * @since 1.7
 */

public interface WatchEvent<T> {

    /**
     * An event kind, for the purposes of identification.
     *
     * @since 1.7
     * @see StandardWatchEventKinds
     */
    public static interface Kind<T> {
        /**
         * Returns the name of the event kind.
         *
         * @return the name of the event kind
         */
        String name();

        /**
         * Returns the type of the {@link WatchEvent#context context} value.
         *
         *
         * @return the type of the context value
         */
        Class<T> type();
    }

    /**
     * An event modifier that qualifies how a {@link Watchable} is registered
     * with a {@link WatchService}.
     *
     *
 This release does not define any standard modifiers.
     *
     * @since 1.7
     * @see Watchable#register
     */
    public static interface Modifier {
        /**
         * Returns the name of the modifier.
         *
         * @return the name of the modifier
         */
        String name();
    }

    /**
     * Returns the event kind.
     *
     * @return  the event kind
     */
    Kind<T> kind();

    /**
     * Returns the event count. If the event count is greater than {@code 1}
     * then this is a repeated event.
     *
     * @return  the event count
     */
    int count();

    /**
     * Returns the context for the event.
     *
     *
 In the case of {@link StandardWatchEventKinds#ENTRY_CREATE ENTRY_CREATE},
     * {@link StandardWatchEventKinds#ENTRY_DELETE ENTRY_DELETE}, and {@link
     * StandardWatchEventKinds#ENTRY_MODIFY ENTRY_MODIFY} events the context is
     * a {@code Path} that is the {@link Path#relativize relative} path between
     * the directory registered with the watch service, and the entry that is
     * created, deleted, or modified.
     *
     * @return  the event context; may be {@code null}
     */
    T context();
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClientDependency.Core.FileRegistration.Providers;

namespace ClientDependency.Core
{
	internal class ProviderDependencyList
	{
		internal ProviderDependencyList(BaseFileRegistrationProvider provider)
		{
			Provider = provider;
            Dependencies = new List<IClientDependencyFile>();
		}

		internal bool ProviderIs(BaseFileRegistrationProvider provider)
		{
			return Provider.Name == provider.Name;
		}

		internal void AddDependencies(IEnumerable<IClientDependencyFile> list)
		{
			Dependencies.AddRange(list);
		}

		internal void AddDependency(IClientDependencyFile file)
		{
			Dependencies.Add(file);
		}

        internal List<IClientDependencyFile> Dependencies { get; private set; }
		internal BaseFileRegistrationProvider Provider { get; private set; }
	}
}


text:
/*
 * Knetik Platform API Documentation latest
 * This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.
 *
 * OpenAPI spec version: latest
 * Contact: support@knetik.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.knetikcloud.model;

import java.util.Objects;

/**
 * Operator
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-03-14T12:03:43.231-04:00")
public class Operator {

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    return true;
  }

  @Override
  public int hashCode() {
    return Objects.hash();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Operator {\n");

    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}


text:
/*
 * HomeReducer
 *
 * The reducer takes care of our data. Using actions, we can change our
 * application state.
 * To add a new action, add it to the switch statement in the reducer function
 *
 * Example:
 * case YOUR_ACTION_CONSTANT:
 *   return state.set('yourStateVariable', true);
 */
 /* disable eslint for storage */
 /* eslint-disable */
 import { fromJS } from 'immutable';
 import { colors } from 'global-colors';
 import { markers } from 'global-markers';

 import {
   CHANGE_SLIDER_IMAGE_AUTO,
   NEXT_SLIDER_IMAGE,
   NEXT_SLIDER_IMAGE_AUTO,
   PREV_SLIDER_IMAGE,
   CHANGE_DETAIL_PANEL_USER,
   CHANGE_DETAIL_PANEL_AUTO,
   CHANGE_MARKER_OBJECT_USER,
   CHANGE_MARKER_OBJECT_AUTO,
   UPDATE_MARKER_MILEAGE,
   NAV_SET_SCROLL_SECTION,
 } from './constants';

 // The initial state of the App
 const initialState = fromJS({
   previoussliderobject: {},
   currentsliderobject: {},
   nextsliderobject: {},
   slidermouseover: false,
   agentinformation: {
     agentfullname: 'Jackie Jones',
     agentcellphone: '303.250.7353',
     agentcellphoneicon: markers.MOBILEPHONE,
     agentdirectphone: '303.952.3068',
     agentdirectphoneicon: markers.PHONE,
     agentemail: 'homesbyjackiejones@gmail.com',
     agentemailicon: markers.EMAIL,
     agentfacebook: 'fb.com/homeinthemountains',
     agentfacebookicon: markers.FACEBOOK,
     imagepath: './assets/img/home/jackiejonesremax.png',
   },
   metainformation: {
     title: '8 Sandau Lane, Black Hawk, Colorado, 80422 - Mountain Property For Sale',
     description: 'Mountain Property For Sale at 8 Sandau Lane, Black Hawk, Colorado, 80422 - Listed by Jackie Jones Re/Max Alliance Nederland',
     keywords: '8 Sandau Lane, Black Hawk, Colorado, 80422, residential, property, for sale, real estate, mountain, property, northern colorado, home for sale, homes, realtor, real estate agent, jackie jones, boulder, fort collins, gilpin, greeley, jamestown, pinecliffe, loveland, lyons, lafayette, windsor, berthoud, wellington, mead, longmont, nederland, niwot, estes park, johnstown, milliken, platteville',
     ogtype: 'website',
     ogurl: 'http://8sandau.homeinthemountains.com',
     gaID: 'UA-50017714-2',
   },
   propertyinformation: {
     street: '8 Sandau Lane',
     city: 'Black Hawk',
     state: 'Colorado',
     stateabbr: 'CO',
     zip: '80422',
     price: '$559,000',
     ires: '836943',
     matrix: '',
     theme: 'house',
   },
   // current feature icon types: Bed, Bath, SqFeet, Acres, Garage, Built
   propertyfeatures: [
     {
       featuretitle: 'bedrooms',
       featurevalue: '3',
       featureicon: markers.BEDROOMS,
     },
     {
       featuretitle: 'bathrooms',
       featurevalue: '2.5',
       featureicon: markers.BATHROOMS,
     },
     {
       featuretitle: 'sq. feet',
       featurevalue: '3,088',
       featureicon: markers.SQFEET,
     },
     {
       featuretitle: 'acreage',
       featurevalue: '1',
       featureicon: markers.ACERAGE,
     },
     {
       featuretitle: 'garage',
       featurevalue: '2',
       featureicon: markers.GARAGE,
     },
     {
       featuretitle: 'built',
       featurevalue: '2017',
       featureicon: markers.HOUSE,
     },
   ],
   propertydetails: {
     propertydetailcopy: 'Brand new construction ready for you to move-in! This distinctly designed mountain residence has been created with the homeowner in mind. Main level master suite with large walk-in closet commands panoramic mountain views. The open floor plan kitchen, dining & living room adjoin a large deck creating a perfect entertaining space both indoors and out. Numerous upgrades include oak flooring, alder cabinetry & LED lighting. Close to Black Hawk/Central City, Nederland, skiing & outdoor recreation.',
     propertydetailpanelindex: '',
     propertydetailcontent: [
       {
         detailclass: 'Taxes & Fees',
         detaillabel: 'Taxes',
         detailvalue: '$584',
       },
       {
         detailclass: 'Taxes & Fees',
         detaillabel: 'Tax Year',
         detailvalue: '2016',
       },
       {
         detailclass: 'Schools',
         detaillabel: 'School District',
         detailvalue: 'Bldr Valley Dist RE2',
       },
       {
         detailclass: 'Schools',
         detaillabel: 'Elementary',
         detailvalue: 'Nederland',
       },
       {
         detailclass: 'Schools',
         detaillabel: 'Middle/Jr High',
         detailvalue: 'Nederland',
       },
       {
         detailclass: 'Schools',
         detaillabel: 'Senior High',
         detailvalue: 'Nederland',
       },
       {
         detailclass: 'Design Features',
         detaillabel: '',
         detailvalue: 'Cathedral/Vaulted Ceilings',
       },
       {
         detailclass: 'Design Features',
         detaillabel: '',
         detailvalue: 'Open Floor Plan',
       },
       {
         detailclass: 'Design Features',
         detaillabel: '',
         detailvalue: 'Walk-in Closet',
       },
       {
         detailclass: 'Design Features',
         detaillabel: '',
         detailvalue: 'Washer/Dryer Hookups',
       },
       {
         detailclass: 'Design Features',
         detaillabel: '',
         detailvalue: 'Skylights',
       },
       {
         detailclass: 'Design Features',
         detaillabel: '',
         detailvalue: 'Wood Floors',
       },
       {
         detailclass: 'Inclusions',
         detaillabel: '',
         detailvalue: 'Gas Range/Oven',
       },
       {
         detailclass: 'Inclusions',
         detaillabel: '',
         detailvalue: 'Dishwasher',
       },
       {
         detailclass: 'Inclusions',
         detaillabel: '',
         detailvalue: 'Microwave',
       },
       {
         detailclass: 'Inclusions',
         detaillabel: '',
         detailvalue: 'Jetted Bath Tub',
       },
       {
         detailclass: 'Inclusions',
         detaillabel: '',
         detailvalue: 'Garage Door Opener',
       },
       {
         detailclass: 'Inclusions',
         detaillabel: '',
         detailvalue: 'Smoke Alarm(s)',
       },
       {
         detailclass: 'Outdoor Features',
         detaillabel: '',
         detailvalue: 'Deck',
       },
       {
         detailclass: 'Lot Features',
         detaillabel: '',
         detailvalue: 'Level Lot',
       },
       {
         detailclass: 'Lot Features',
         detaillabel: '',
         detailvalue: 'Sloping Lot',
       },
       {
         detailclass: 'Lot Features',
         detaillabel: '',
         detailvalue: 'Wooded Lot',
       },
       {
         detailclass: 'Lot Features',
         detaillabel: '',
         detailvalue: 'Rock Out-Croppings',
       },
       {
         detailclass: 'Lot Features',
         detaillabel: '',
         detailvalue: 'Evergreen Trees',
       },
     ],
   },
   propertyflyerinformation: {
     flyerpath: './assets/flyer/8-Sandau-Lane-Black-Hawk-Colorado-Listing-Flyer_11_17-Open-House.pdf',
   },
   slideshowimages: [
     {
       id: 0,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_01_001.jpg',
       imagedescription: 'Brand new build just completed',
     },
     {
       id: 1,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_02_003.jpg',
       imagedescription: 'Welcome home',
     },
     {
       id: 2,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_03_009.jpg',
       imagedescription: 'Abundant passive solar',
     },
     {
       id: 3,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_04_013.jpg',
       imagedescription: 'Amazing granite countertops',
     },
     {
       id: 4,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_05_015.jpg',
       imagedescription: 'Alder cabinetry with open floor plan',
     },
     {
       id: 5,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_06_017.jpg',
       imagedescription: 'Cozy up on the brisk evenings',
     },
     {
       id: 6,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_07_011.jpg',
       imagedescription: 'View from deck off living room',
     },
     {
       id: 7,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_08_032.jpg',
       imagedescription: 'Great deck for entertaining',
     },
     {
       id: 8,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_09_040.jpg',
       imagedescription: 'VIEWS, VIEWS, VIEWS',
     },
     {
       id: 9,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_10_021.jpg',
       imagedescription: 'Main level half bath',
     },
     {
       id: 10,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_11_018.jpg',
       imagedescription: 'Main level master & walk out to deck',
     },
     {
       id: 11,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_12_021.jpg',
       imagedescription: 'Master bedroom walk-in closet',
     },
     {
       id: 12,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_13_019.jpg',
       imagedescription: 'Luxury master bath with jetted tub',
     },
     {
       id: 13,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_14_027.jpg',
       imagedescription: 'Lower level family/recreation room',
     },
     {
       id: 14,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_15_026.jpg',
       imagedescription: 'Cherry stained Oak wood floors',
     },
     {
       id: 15,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_16_025.jpg',
       imagedescription: 'Lower level bedroom #2',
     },
     {
       id: 16,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_17_022.jpg',
       imagedescription: 'Lower level bedroom #3',
     },
     {
       id: 17,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_18_023.jpg',
       imagedescription: 'Lower level full bath with jetted tub',
     },
     {
       id: 18,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_19_029.jpg',
       imagedescription: 'Lower level laundry/storage area',
     },
     {
       id: 19,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_20_034.jpg',
       imagedescription: 'Rear of home with walk-out',
     },
     {
       id: 20,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_21_037.jpg',
       imagedescription: 'Close to highway for easy access',
     },
     {
       id: 21,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_22_038.jpg',
       imagedescription: 'Walk to local restaurant/bar',
     },
     {
       id: 22,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_23_042.jpg',
       imagedescription: 'Southern exposure',
     },
     {
       id: 23,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_24_040.jpg',
       imagedescription: 'Close to Nederland & Eldora',
     },
     {
       id: 24,
       imagepath: './assets/img/slideshow/Sandau_Ln_8_25_029.jpg',
       imagedescription: '1 acre parcel',
     },
   ],
   propertydirections: {
     directionscopy: 'From Nederland take CO-119 south to Wagon Wheel and turn left. Turn right on Sandau and house is on the corner.',
     currentmarkerobject: {},
     markers: [
       {
         id: 0,
         type: 'Property',
         title: 'Your New Home',
         icon: markers.HOUSE,
         position: [39.888124, -105.476991],
         anchor: [20, 20],
         labelanchor: [20, 45],
         primarycolor: `rgb(${colors.primaryred})`,
         secondarycolor: `rgb(${colors.primaryblue})`,
         zoom: 18,
         mileagetext: '',
         contentString: '',
       },
       {
         id: 1,
         type: 'Restaurant',
         title: 'Roys Last Shot',
         icon: markers.FOOD,
         position: [39.887298, -105.475346],
         anchor: [20, 20],
         labelanchor: [20, 50],
         primarycolor: `rgb(${colors.primaryred})`,
         secondarycolor: `rgb(${colors.primaryblue})`,
         zoom: 18,
         mileagetext: '',
         contentString: '',
       },
       {
         id: 2,
         type: 'Ski Resort',
         title: 'Eldora Mountain Resort',
         icon: markers.WINTER,
         position: [39.937203, -105.582568],
         anchor: [20, 20],
         labelanchor: [20, 45],
         primarycolor: `rgb(${colors.primaryred})`,
         secondarycolor: `rgb(${colors.primaryblue})`,
         zoom: 14,
         mileagetext: '',
         contentString: '',
       },
       {
         id: 3,
         type: 'School',
         title: 'Nederland Middle-High School',
         icon: markers.SCHOOL,
         position: [39.9527528, -105.525521],
         anchor: [20, 20],
         labelanchor: [20, 45],
         primarycolor: `rgb(${colors.primaryred})`,
         secondarycolor: `rgb(${colors.primaryblue})`,
         zoom: 15,
         mileagetext: '',
         contentString: '',
       },
     /*
       {
         id: 4,
         type: 'School',
         title: 'Nederland Elementary School',
         icon: 'School',
         iconpath: markers.SCHOOL,
         position: [39.969428, -105.5179872],
         anchor: [20, 20],
         labelanchor: [20, 45],
         primarycolor: `rgb(${colors.primaryred})`,
         secondarycolor: `rgb(${colors.primaryblue})`,
         zoom: 14,
         mileagetext: '',
         contentString: '',
       },
       */
     ],
   },
   mainnavigation: {
     navheight: 40,
     activescrollsection: 'PHOTOS',
   },
   calloutdetail: {
     callouttext: 'Open House - Sunday, December 3rd, 1p - 3p',
     calloutstart: new Date('November 28 2017 00:00'),
     calloutend: new Date('December 3 2017 15:00'),
   },
 });

 function homeReducer(state = initialState, action) {
   switch (action.type) {
     case CHANGE_SLIDER_IMAGE_AUTO: {
       const object = state.get('slideshowimages').filter((obj) => { return obj.get('id') === action.actionindex; }).first(); // eslint-disable-line
       const nextTgtIndex = ((object.get('id') + 1) < state.get('slideshowimages').size) ? object.get('id') + 1 : 0;
       const nextobject = state.get('slideshowimages').filter((obj) => { return obj.get('id') === nextTgtIndex; }).first(); // eslint-disable-line
       const prevTgtIndex = ((object.get('id') - 1) >= 0) ? object.get('id') - 1 : state.get('slideshowimages').size - 1;
       const prevobject = state.get('slideshowimages').filter((obj) => { return obj.get('id') === prevTgtIndex; }).first(); // eslint-disable-line
       return state
         .set('previoussliderobject', prevobject)
         .set('currentsliderobject', object)
         .set('nextsliderobject', nextobject);
     }
     case NEXT_SLIDER_IMAGE_AUTO:
     case NEXT_SLIDER_IMAGE: {
       const tgtIndex = ((state.get('currentsliderobject').get('id') + 1) < state.get('slideshowimages').size) ? state.get('currentsliderobject').get('id') + 1 : 0;
       const object = state.get('slideshowimages').filter((obj) => { return obj.get('id') === tgtIndex; }).first(); // eslint-disable-line
       const nextTgtIndex = ((object.get('id') + 1) < state.get('slideshowimages').size) ? object.get('id') + 1 : 0;
       const nextobject = state.get('slideshowimages').filter((obj) => { return obj.get('id') === nextTgtIndex; }).first(); // eslint-disable-line
       const prevTgtIndex = ((object.get('id') - 1) >= 0) ? object.get('id') - 1 : state.get('slideshowimages').size - 1;
       const prevobject = state.get('slideshowimages').filter((obj) => { return obj.get('id') === prevTgtIndex; }).first(); // eslint-disable-line
       return state
       .set('previoussliderobject', prevobject)
       .set('currentsliderobject', object)
       .set('nextsliderobject', nextobject);
     }
     case PREV_SLIDER_IMAGE: {
       const tgtIndex = ((state.get('currentsliderobject').get('id') - 1) >= 0) ? state.get('currentsliderobject').get('id') - 1 : state.get('slideshowimages').size - 1;
       const object = state.get('slideshowimages').filter((obj) => { return obj.get('id') === tgtIndex; }).first(); // eslint-disable-line
       const nextTgtIndex = ((object.get('id') + 1) < state.get('slideshowimages').size) ? object.get('id') + 1 : 0;
       const nextobject = state.get('slideshowimages').filter((obj) => { return obj.get('id') === nextTgtIndex; }).first(); // eslint-disable-line
       const prevTgtIndex = ((object.get('id') - 1) >= 0) ? object.get('id') - 1 : state.get('slideshowimages').size - 1;
       const prevobject = state.get('slideshowimages').filter((obj) => { return obj.get('id') === prevTgtIndex; }).first(); // eslint-disable-line
       return state
       .set('previoussliderobject', prevobject)
       .set('currentsliderobject', object)
       .set('nextsliderobject', nextobject);
     }
     case CHANGE_DETAIL_PANEL_AUTO:
     case CHANGE_DETAIL_PANEL_USER: {
       return state
         .setIn(['propertydetails', 'propertydetailpanelindex'], action.actionindex);
     }
     case CHANGE_MARKER_OBJECT_USER:
     case CHANGE_MARKER_OBJECT_AUTO: {
       const object = state.getIn(['propertydirections', 'markers']).filter((obj) => { return obj.get('id') === action.actionindex; }).first(); // eslint-disable-line
       const newmarkersmap = state.getIn(['propertydirections', 'markers']).map((mrk) => mrk.set('mileagetext', '----'));
       return state
         .setIn(['propertydirections', 'currentmarkerobject'], object)
         .setIn(['propertydirections', 'markers'], newmarkersmap); // eslint-disable-line
     }
     case UPDATE_MARKER_MILEAGE: {
       const receivedArray = action.actionarray;
       const newmarkersmap = state.getIn(['propertydirections', 'markers']).map((mrk, i) => mrk.set('mileagetext', receivedArray[i].distance.value === 0 ? '----' : receivedArray[i].distance.text));
       return state
         .setIn(['propertydirections', 'markers'], newmarkersmap);
     }
     case NAV_SET_SCROLL_SECTION: {
       return state
        .setIn(['mainnavigation', 'activescrollsection'], action.activesection);
     }
     default:
       return state;
   }
 }

 export default homeReducer;


text:
function res=convert2LocalSystems(mot)

res=mot;
% res=removeTranslation(res);
res.rootTranslation=res.rootTranslation-[[0;0;0] res.rootTranslation(:,1:end-1)];

posmat=cell2mat(res.jointTrajectories);
res.jointTrajectories=mat2cell(posmat-[zeros(res.njoints*3,1) posmat(:,1:end-1)],ones(res.njoints,1)*3);

% res=removeOrientation(skel,res);
quatinvmat=[[1;0;0;0] quatinv(res.rotationQuat{1}(:,1:end-1))];
res.rotationQuat{1}=quatmult(res.rotationQuat{1},quatinvmat);


text:
package org.apache.nifi.cluster.exception;

import org.apache.nifi.cluster.exception.ClusterException;

public class NoClusterCoordinatorException extends ClusterException {
    private static final long serialVersionUID = -1782098541351698293L;

    public NoClusterCoordinatorException() {
        super("Action cannot be performed because there is currently no Cluster Coordinator elected. "
            + "The request should be tried again after a moment, after a Cluster Coordinator has been automatically elected.");
    }

    public NoClusterCoordinatorException(final String message) {
        super(message);
    }
}


text:
This is a demo Python Flask app to show how to use oxd-python to perform authentication with an OpenID Provider and fetch user information.

## Deployment

### Prerequisites

1. **Client Server**

    * Python 2.7 with pip installed
    * oxd-server running in the background. [Install oxd server](https://gluu.org/docs/oxd/install/)

2. **OpenID Provider**

     * An OpenID provider like Gluu Server. [Install Gluu Server](https://gluu.org/docs/ce/3.1.1/)

### Testing OpenID Connect with the demo site

* Install oxd-python in the Client server:

```bash
git clone https://github.com/GluuFederation/oxd-python.git
cd oxd-python
python setup.py install
```

* Switch to the demosite folder

```bash
cd examples/flask_app
```

* Edit the `demosite.cfg` file. Add the URI of the OpenID Provider (OP) in the `op_host` field, e.g. `https://idp.example.com`. If `op_host` was configured during installation, this step can be skipped.

* Edit `/etc/hosts` and point `client.example.com` at the IP Address of the server where the demo app is installed, e.g. `100.100.100.100 client.example.com`

* Run the demo server

```bash
pip install flask
pip install pyOpenSSL
python demosite.py
```

Enable **basic** script on your gluu-server: Maganage Custom Scripts -> Person Authentication -> basic

Now the demosite can be accessed at [https://client.example.com:8080](https://client.example.com:8080)


text:
import { Observable, ObservableInput } from 'rxjs/Observable';
import { ObservableMock } from './observable.mock';

export class ParamsMock {
    public switchMapMethodSpy: jasmine.Spy;

    constructor(private observableMock: ObservableMock<ParamsMock>) {
    }

    setupSpies(): void {
        this.switchMapMethodSpy = spyOn(this, 'switchMap').and.callThrough();
    }

    public switchMap<T, R>(self: ObservableMock<ParamsMock>, project: (value: T, index: number) => ObservableInput<R>): ObservableMock<ParamsMock> {
        return this.observableMock;
    }
}


text:
package org.kiji.schema;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;

import org.kiji.schema.layout.impl.ColumnId;

public class TestColumnId {
  @Test
  public void testNegativeId() {
    try {
      new ColumnId(-1).toByteArray();
      fail("Should fail with IllegalArgumentException.");
    } catch (IllegalArgumentException ise) {
      assertEquals("id may not be negative", ise.getMessage());
    }
  }

  @Test
  public void testToByteArray() {
    assertArrayEquals(Bytes.toBytes("A"), new ColumnId(0).toByteArray());
    assertArrayEquals(Bytes.toBytes("B"), new ColumnId(1).toByteArray());
    assertArrayEquals(Bytes.toBytes("C"), new ColumnId(2).toByteArray());
    assertArrayEquals(Bytes.toBytes("/"), new ColumnId(63).toByteArray());
    assertArrayEquals(Bytes.toBytes("AB"), new ColumnId(64).toByteArray());
    assertArrayEquals(Bytes.toBytes("BB"), new ColumnId(65).toByteArray());
    assertArrayEquals(Bytes.toBytes("CB"), new ColumnId(66).toByteArray());
    assertArrayEquals(Bytes.toBytes("oP"), new ColumnId(1000).toByteArray());
    assertArrayEquals(Bytes.toBytes("AAB"), new ColumnId(64 * 64).toByteArray());
  }

  @Test
  public void testFromByteArray() {
    assertEquals(0, ColumnId.fromByteArray(Bytes.toBytes("A")).getId());
    assertEquals(1, ColumnId.fromByteArray(Bytes.toBytes("B")).getId());
    assertEquals(2, ColumnId.fromByteArray(Bytes.toBytes("C")).getId());
    assertEquals(63, ColumnId.fromByteArray(Bytes.toBytes("/")).getId());
    assertEquals(64, ColumnId.fromByteArray(Bytes.toBytes("AB")).getId());
    assertEquals(65, ColumnId.fromByteArray(Bytes.toBytes("BB")).getId());
    assertEquals(66, ColumnId.fromByteArray(Bytes.toBytes("CB")).getId());
    assertEquals(1000, ColumnId.fromByteArray(Bytes.toBytes("oP")).getId());
    assertEquals(64 * 64, ColumnId.fromByteArray(Bytes.toBytes("AAB")).getId());
  }
}


text:
/*
 * p2p.h
 *
 *  Created on: 29 Dec 2015
 *      Author: nick
 */

#ifndef SRC_COMMUNICATIONS_P2P_H_
#define SRC_COMMUNICATIONS_P2P_H_

#include "messaging.h"
#include "ndm.h"

void p2p_ndmSend(Messaging messaging, void*, int, int, int, NDM_Group, const char*);
void p2p_ndmRecv(Messaging messaging, void (*)(void*, NDM_Metadata), int, int, bool, NDM_Group, const char*);
#endif /* SRC_COMMUNICATIONS_P2P_H_ */


text:
package com.gopivotal.manager.redis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.Protocol;
import redis.clients.jedis.Transaction;

import java.io.UnsupportedEncodingException;
import java.util.Set;

final class JedisPoolTemplate implements JedisTemplate {

    private final JedisPool jedisPool;

    JedisPoolTemplate(JedisPool jedisPool) {
        this.jedisPool = jedisPool;
    }

    @Override
    public Set<String> getSessions(String sessionsKey) {
        try(Jedis jedis = this.jedisPool.getResource()) {
            return jedis.smembers(sessionsKey);
        }
    }

    @Override
    public void del(String sessionsKey, String key) {
        try(Jedis jedis = this.jedisPool.getResource()) {
            Transaction t = jedis.multi();
            t.srem(sessionsKey, key);
            t.del(key);
            t.exec();
        }
    }

    @Override
    public Integer count(String sessionsKey) {
        try(Jedis jedis = this.jedisPool.getResource()) {
            return jedis.scard(sessionsKey).intValue();
        }
    }

    @Override
    public byte[] get(String key) throws UnsupportedEncodingException {
        try(Jedis jedis = this.jedisPool.getResource()) {
            return jedis.get(key.getBytes(Protocol.CHARSET));
        }
    }

    @Override
    public void set(String key, String sessionsKey, byte[] session, int timeout) throws UnsupportedEncodingException {
        try(Jedis jedis = this.jedisPool.getResource()) {
            Transaction t = jedis.multi();
            t.setex(key.getBytes(Protocol.CHARSET), timeout, session);
            t.sadd(sessionsKey, key);
            t.exec();
        }
    }

    @Override
    public void clean(String sessionsKey) {
        try(Jedis jedis = this.jedisPool.getResource()) {
            Set<String> sessions = jedis.smembers(sessionsKey);
            String[] sessionsArray = sessions.toArray(new String[sessions.size()]);

            Transaction t = jedis.multi();
            t.srem(sessionsKey, sessionsArray);
            t.del(sessionsArray);
            t.exec();
        }
    }

    @Override
    public void close() {
        jedisPool.destroy();
    }
}


text:
ACCEPTED

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

#### Published in
Mycol. Res. 112(7): 776 (2008)

#### Original name
Globomycetaceae Letcher

### Remarks
null


text:
package com.mytdev.cliqui.util;

import com.mytdev.cliqui.cli.constraints.IntMaxConstraint;
import com.mytdev.cliqui.cli.constraints.IntMinConstraint;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.DocumentFilter;

/**
 *
 * @author Yann D'Isanto
 */
public final class IntegerDocumentFilter extends DocumentFilter {

    private static final Pattern INTEGER_PATTERN = Pattern.compile("\\d+");

    private final Integer min;

    private final Integer max;

    public IntegerDocumentFilter() {
        this(null, null);
    }

    public IntegerDocumentFilter(Integer min, Integer max) {
        this.min = min;
        this.max = max;
    }

    public static IntegerDocumentFilter create(IntMinConstraint minConstraint, IntMaxConstraint maxConstraint) {
        if (minConstraint != null || maxConstraint != null) {
            final int min = minConstraint != null ? minConstraint.getMin() : Integer.MIN_VALUE;
            final int max = maxConstraint != null ? maxConstraint.getMax() : Integer.MAX_VALUE;
            return new IntegerDocumentFilter(min, max);
        } else {
            return new IntegerDocumentFilter();
        }
    }

    @Override
    public void insertString(FilterBypass fb, int offset, String text,
        AttributeSet attr) throws BadLocationException {
        if (min == null && max == null) {
            if (isInt(text)) {
                super.insertString(fb, offset, text, attr);
            }
        } else if (isIntWithMinMax(fb, offset, 0, text)) {
            super.insertString(fb, offset, text, attr);
        }
    }

    @Override
    public void replace(FilterBypass fb, int offset, int length, String text,
        AttributeSet attrs) throws BadLocationException {
        if (min == null && max == null) {
            if (isInt(text)) {
                super.replace(fb, offset, length, text, attrs);
            }
        } else if (isIntWithMinMax(fb, offset, length, text)) {
            super.replace(fb, offset, length, text, attrs);

        }
    }

    private boolean isInt(String text) {
        return INTEGER_PATTERN.matcher(text).matches();
    }

    private boolean isIntWithMinMax(FilterBypass fb, int offset, int length, String string) {
        try {
            final Document document = fb.getDocument();
            final StringBuilder sb = new StringBuilder(document.getText(0, document.getLength()));
            if (length > 0) {
                sb.replace(offset, offset + length, string);
            } else {
                sb.insert(offset, string);
            }
            final String stringValue = sb.toString();
            if (stringValue.isEmpty()) {
                return true;
            }
            try {
                final int value = Integer.parseInt(stringValue);
                final int minValue = min != null ? min : Integer.MIN_VALUE;
                final int maxValue = max != null ? max : Integer.MAX_VALUE;
                return value >= minValue && value <= maxValue;
            } catch (NumberFormatException ex) {
                return false;
            }
        } catch (BadLocationException ex) {
            Logger.getLogger(IntegerDocumentFilter.class.getName()).log(Level.SEVERE, null, ex);
            return false;
        }
    }
}


text:
namespace VirtualObjects
{
    /// <summary>
    ///
    /// </summary>
    public interface IOperationsProvider
    {
        /// <summary>
        /// Creates the operations.
        /// </summary>
        /// <param name="entityInfo">The entity information.</param>
        /// <returns></returns>
        IOperations CreateOperations(IEntityInfo entityInfo);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
        <group>
            <file>file:/media/yazeed44/Data/workspace/CdpneIntroBot/src/Main.java</file>
            <file>file:/media/yazeed44/Data/workspace/CdpneIntroBot/src/CdpneIntroBot.java</file>
        </group>
    </open-files>
</project-private>


text:
<?php
namespace Craft;

abstract class BaseWidget extends BaseSavableComponentType implements IWidget
{
	// Properties
	// =========================================================================

	/**
	 * The type of component, e.g. "Plugin", "Widget", "FieldType", etc. Defined by the component type's base class.
	 *
	 * @var string
	 */
	protected $componentType = 'Widget';

	/**
	 * Whether users should be able to select more than one of this widget type.
	 *
	 * @var bool
	 */
	protected $multi = true;

	/**
	 * How many columns the widget should span, if there's enough room.
	 *
	 * @var bool
	 */
	protected $colspan = 1;

	// Public Methods
	// =========================================================================

	/**
	 * @inheritDoc IComponentType::isSelectable()
	 *
	 * @return bool
	 */
	public function isSelectable()
	{
		if ($this->multi || !craft()->dashboard->doesUserHaveWidget($this->getClassHandle()))
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	/**
	 * @inheritDoc IWidget::getTitle()
	 *
	 * @return string
	 */
	public function getTitle()
	{
		// Default to the widget name
		return $this->getName();
	}

	/**
	 * @inheritDoc IWidget::getColspan()
	 *
	 * @return int
	 */
	public function getColspan()
	{
		return $this->colspan;
	}

	/**
	 * @inheritDoc IWidget::getBodyHtml()
	 *
	 * @return string|false
	 */
	public function getBodyHtml()
	{
		return '
' .
				'' .
			'
';
	}
}


text:
"""
Auto-generated class for VdiskListItem
"""
from .EnumVdiskListItemStatus import EnumVdiskListItemStatus
from .EnumVdiskListItemType import EnumVdiskListItemType

from . import client_support

class VdiskListItem(object):
    """
    auto-generated. don't touch.
    """

    @staticmethod
    def create(id, status, type, vdiskstorage):
        """
        :type id: str
        :type status: EnumVdiskListItemStatus
        :type type: EnumVdiskListItemType
        :type vdiskstorage: str
        :rtype: VdiskListItem
        """

        return VdiskListItem(
            id=id,
            status=status,
            type=type,
            vdiskstorage=vdiskstorage,
        )

    def __init__(self, json=None, **kwargs):
        if json is None and not kwargs:
            raise ValueError('No data or kwargs present')

        class_name = 'VdiskListItem'
        create_error = '{cls}: unable to create {prop} from value: {val}: {err}'
        required_error = '{cls}: missing required property {prop}'

        data = json or kwargs

        property_name = 'id'
        val = data.get(property_name)
        if val is not None:
            datatypes = [str]
            try:
                self.id = client_support.val_factory(val, datatypes)
            except ValueError as err:
                raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
        else:
            raise ValueError(required_error.format(cls=class_name, prop=property_name))

        property_name = 'status'
        val = data.get(property_name)
        if val is not None:
            datatypes = [EnumVdiskListItemStatus]
            try:
                self.status = client_support.val_factory(val, datatypes)
            except ValueError as err:
                raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
        else:
            raise ValueError(required_error.format(cls=class_name, prop=property_name))

        property_name = 'type'
        val = data.get(property_name)
        if val is not None:
            datatypes = [EnumVdiskListItemType]
            try:
                self.type = client_support.val_factory(val, datatypes)
            except ValueError as err:
                raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
        else:
            raise ValueError(required_error.format(cls=class_name, prop=property_name))

        property_name = 'vdiskstorage'
        val = data.get(property_name)
        if val is not None:
            datatypes = [str]
            try:
                self.vdiskstorage = client_support.val_factory(val, datatypes)
            except ValueError as err:
                raise ValueError(create_error.format(cls=class_name, prop=property_name, val=val, err=err))
        else:
            raise ValueError(required_error.format(cls=class_name, prop=property_name))

    def __str__(self):
        return self.as_json(indent=4)

    def as_json(self, indent=0):
        return client_support.to_json(self, indent=indent)

    def as_dict(self):
        return client_support.to_dict(self)


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

	<meta charset="UTF-8"/>
	<meta name="keywords" content="theme, syntax coloring, highlight"/>
	<link rel="start" href="../CotEditorHelp.html"/>
	<link rel="index" href="../xpgs/xall.html"/>
	<link rel="stylesheet" href="../../Shared/sty/standard.css"/>
	<title>About themes</title>

CotEditor Help

About themes

CotEditor's theme is a collection of settings about editor's coloring.  To customize themes:

Choose CotEditor > Preferences.

Select Appearances pane.

Select the theme you want to customize from the theme list.

To use an existing theme as a guide for creating your own, select Duplicate in the action button (gear icon) instead. You can also export your own themes or import themes which are created by others.

Theme file format

CotEditor theme file must have the own extension ".cottheme" and its format is based on JSON with hex color values with # symbol.

See also

Syntax coloring objects

Appearance preferences


text:
import logging
import os
import subprocess as subprocess
import shutil
import sys
import tempfile

from telemetry.core import util
from telemetry.core.chrome import browser_backend
from telemetry.core.chrome import cros_interface
from telemetry.core.chrome import cros_util

class DesktopBrowserBackend(browser_backend.BrowserBackend):
  """The backend for controlling a locally-executed browser instance, on Linux,
  Mac or Windows.
  """
  def __init__(self, options, executable, is_content_shell, use_login,
               delete_profile_dir_after_run=True):
    super(DesktopBrowserBackend, self).__init__(
        is_content_shell=is_content_shell,
        supports_extensions=not is_content_shell,
        options=options)

    # Initialize fields so that an explosion during init doesn't break in Close.
    self._proc = None
    self._tmpdir = None
    self._tmp_output_file = None

    self._use_login = use_login

    self._executable = executable
    if not self._executable:
      raise Exception('Cannot create browser, no executable found!')

    if len(options.extensions_to_load) > 0 and is_content_shell:
      raise browser_backend.ExtensionsNotSupportedException(
          'Content shell does not support extensions.')

    self._port = util.GetAvailableLocalPort()
    self._profile_dir = None
    self._supports_net_benchmarking = True
    self._delete_profile_dir_after_run = delete_profile_dir_after_run
    self._LaunchBrowser(options)

    # For old chrome versions, might have to relaunch to have the
    # correct net_benchmarking switch.
    if self._chrome_branch_number < 1418:
      self.Close()
      self._supports_net_benchmarking = False
      self._LaunchBrowser(options)

    # TODO(achuith): Remove this (crbug.com/249480)
    if self._use_login:
      cros_util.NavigateLogin(self, cros_interface.CrOSInterface())

  def _LaunchBrowser(self, options):
    args = [self._executable]
    args.extend(self.GetBrowserStartupArgs())
    if not options.show_stdout:
      self._tmp_output_file = tempfile.NamedTemporaryFile('w', 0)
      self._proc = subprocess.Popen(
          args, stdout=self._tmp_output_file, stderr=subprocess.STDOUT)
    else:
      self._proc = subprocess.Popen(args)

    try:
      self._WaitForBrowserToComeUp()
      self._PostBrowserStartupInitialization()
    except:
      self.Close()
      raise

  def GetBrowserStartupArgs(self):
    args = super(DesktopBrowserBackend, self).GetBrowserStartupArgs()
    args.append('--remote-debugging-port=%i' % self._port)
    if not self.is_content_shell:
      args.append('--window-size=1280,1024')
      if self._supports_net_benchmarking:
        args.append('--enable-net-benchmarking')
      else:
        args.append('--enable-benchmarking')
      if not self.options.dont_override_profile:
        self._tmpdir = tempfile.mkdtemp()
        profile_dir = self._profile_dir or self.options.profile_dir
        if profile_dir:
          if self.is_content_shell:
            logging.critical('Profiles cannot be used with content shell')
            sys.exit(1)
          shutil.rmtree(self._tmpdir)
          shutil.copytree(profile_dir, self._tmpdir)
        args.append('--user-data-dir=%s' % self._tmpdir)
      if self._use_login:
        ext_path = os.path.join(os.path.dirname(__file__), 'chromeos_login_ext')
        args.extend(['--login-manager', '--login-profile=user',
                     '--stub-cros', '--login-screen=login',
                     '--auth-ext-path=%s' % ext_path])
    return args

  def SetProfileDirectory(self, profile_dir):
    # Make sure _profile_dir hasn't already been set.
    assert self._profile_dir is None

    if self.is_content_shell:
      logging.critical('Profile creation cannot be used with content shell')
      sys.exit(1)

    self._profile_dir = profile_dir

  @property
  def pid(self):
    if self._proc:
      return self._proc.pid
    return None

  @property
  def profile_directory(self):
    return self._tmpdir

  def IsBrowserRunning(self):
    return self._proc.poll() == None

  def GetStandardOutput(self):
    assert self._tmp_output_file, "Can't get standard output with show_stdout"
    self._tmp_output_file.flush()
    try:
      with open(self._tmp_output_file.name) as f:
        return f.read()
    except IOError:
      return ''

  def __del__(self):
    self.Close()

  def Close(self):
    super(DesktopBrowserBackend, self).Close()

    if self._proc:

      def IsClosed():
        if not self._proc:
          return True
        return self._proc.poll() != None

      # Try to politely shutdown, first.
      self._proc.terminate()
      try:
        util.WaitFor(IsClosed, timeout=1)
        self._proc = None
      except util.TimeoutException:
        pass

      # Kill it.
      if not IsClosed():
        self._proc.kill()
        try:
          util.WaitFor(IsClosed, timeout=5)
          self._proc = None
        except util.TimeoutException:
          self._proc = None
          raise Exception('Could not shutdown the browser.')

    if self._delete_profile_dir_after_run and \
        self._tmpdir and os.path.exists(self._tmpdir):
      shutil.rmtree(self._tmpdir, ignore_errors=True)
      self._tmpdir = None

    if self._tmp_output_file:
      self._tmp_output_file.close()
      self._tmp_output_file = None

  def CreateForwarder(self, *port_pairs):
    return browser_backend.DoNothingForwarder(*port_pairs)


text:
@interface Product ()

// Private interface goes here.

@end

@implementation Product

+ (Product *)modelObjectWithDictionary:(NSDictionary *)dict
{
    NSString *record_id = [dict objectForKey:kProductFieldId];
    Product *instance;

    //I first try to count the entities (should take less time) and load the entity only if strictly necessary (if count > 0). The Count operation should be less intensive than the Fetch, so I use it for checking the existence
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"crm_id = %@", record_id];
    NSUInteger count = [Product MR_countOfEntitiesWithPredicate:predicate];

    if (count > 0) {
        instance = [Product MR_findFirstByAttribute:@"crm_id" withValue:record_id];
        NSDateFormatter *dateTimeFormat = [[NSDateFormatter alloc] init];
        [dateTimeFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
        NSDate *time_modified = [dateTimeFormat dateFromString:[dict objectForKey:kFieldModifiedTime]];
        if ([time_modified compare:instance.crm_time_created] == NSOrderedSame) {
#if DEBUG
            NSLog(@"%@ %@ skipping %@ as modified_time is the same", NSStringFromClass([self class]), NSStringFromSelector(_cmd), record_id);
#endif
            //It's the same instance
            return instance;
        }
    }
    else{
        instance = [Product MR_createEntity];
    }

    // This check serves to make sure that a non-NSDictionary object
    // passed into the model class doesn't break the parsing.
    if([dict isKindOfClass:[NSDictionary class]]) {

        NSDateFormatter *dateTimeFormat = [[NSDateFormatter alloc] init];
        [dateTimeFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
        NSDate *time_modified = [dateTimeFormat dateFromString:[dict objectForKey:kFieldModifiedTime]];
        NSDate *time_created = [dateTimeFormat dateFromString:[dict objectForKey:kFieldCreatedTime]];
        instance.crm_time_modified = time_modified;
        instance.crm_time_created = time_created;

        //Properties defined by CRM
        instance.crm_id = [dict objectForKey:kProductFieldId];
        instance.crm_description = [dict objectForKey:kProductFieldDescription];
        instance.crm_discontinued = [NSNumber numberWithBool:[[dict objectForKey:kProductFieldDiscontinued] boolValue]];
        instance.crm_glacct = [dict objectForKey:kProductFieldGlacct];
        instance.crm_manufacturer = [dict objectForKey:kProductFieldManufacturer];
        instance.crm_mfr_part_no = [dict objectForKey:kProductFieldMfrPartNo];
        instance.crm_product_no = [dict objectForKey:kProductFieldProductNo];
        instance.crm_productcategory = [dict objectForKey:kProductFieldProductCategory];
        instance.crm_productcode = [dict objectForKey:kProductFieldProductCode];
        instance.crm_productname = [dict objectForKey:kProductFieldProductName];
        instance.crm_productsheet = [dict objectForKey:kProductFieldProductSheet];
        instance.crm_sales_end_date = dateFromString([dict objectForKey:kProductFieldSalesEndDate], @"yyyy-MM-dd");
        instance.crm_sales_start_date = dateFromString([dict objectForKey:kProductFieldSalesStartDate], @"yyyy-MM-dd");
        instance.crm_serial_no = [dict objectForKey:kProductFieldSerialNo];
        instance.crm_support_end_date = dateFromString([dict objectForKey:kProductFieldSupportEndDate], @"yyyy-MM-dd");
        instance.crm_support_start_date = dateFromString([dict objectForKey:kProductFieldSupportStartDate], @"yyyy-MM-dd");
        instance.crm_vendor_id = [[dict objectForKey:kProductFieldVendor] objectForKey:@"value"];
        instance.crm_vendor_name = [[dict objectForKey:kProductFieldVendor] objectForKey:@"name"];
        instance.crm_vendor_part_no = [dict objectForKey:kProductFieldVendorPartNo];
        instance.crm_website = [dict objectForKey:kProductFieldWebsite];

        //Add the relationship with the current service
        instance.service = [Service getActive];

    }

    return instance;
}

@end


text:
package org.apache.flink.table.runtime.typeutils;

import org.apache.flink.api.common.typeutils.SerializerTestBase;
import org.apache.flink.api.common.typeutils.base.StringSerializer;
import org.apache.flink.table.data.RawValueData;
import org.apache.flink.table.utils.RawValueDataAsserter;
import org.apache.flink.testutils.DeeplyEqualsChecker;

/** A test for the {@link RawValueDataSerializer}. */
class RawValueDataSerializerTest extends SerializerTestBase<RawValueData<String>> {
    public RawValueDataSerializerTest() {
        super(
                new DeeplyEqualsChecker()
                        .withCustomCheck(
                                (o, o2) -> o instanceof RawValueData && o2 instanceof RawValueData,
                                (o, o2, checker) ->
                                        RawValueDataAsserter.equivalent(
                                                        (RawValueData) o2,
                                                        new RawValueDataSerializer<>(
                                                                StringSerializer.INSTANCE))
                                                .matches(o)));
    }

    @Override
    protected RawValueDataSerializer<String> createSerializer() {
        return new RawValueDataSerializer<>(StringSerializer.INSTANCE);
    }

    @Override
    protected int getLength() {
        return -1;
    }

    @Override
    protected Class<RawValueData<String>> getTypeClass() {
        return (Class) RawValueData.class;
    }

    @Override
    protected RawValueData[] getTestData() {
        return new RawValueData[] {
            RawValueData.fromObject("1"),
            RawValueData.fromObject("2"),
            RawValueData.fromObject("3"),
            RawValueData.fromObject("4"),
            RawValueData.fromObject("5")
        };
    }
}


text:
/** Automatically generated file. DO NOT MODIFY */
package com.lgb.anynctaskdemo;

public final class BuildConfig {
    public final static boolean DEBUG = true;
}


text:
module Utils.Exception where

data Exception = IllformedLetPattern
               | VarNotInCtx
               | Nonlinearity
               | NonlocallyClosed
               | NonEmptyCtx
               | TypeErrorLetNotTop
               | TypeErrorLetNotTensor
               | IllformedPromote
               | TypeErrorPromoteNotBang
               | TypeErrorTypesNotEqual
               | TypeErrorAppNotImp
               | NonLinearCtx
               | TypeErrorDuplicatedFreeVar
 deriving Show


text:
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <sched.h>

#include <odp/thread.h>
#include <odp/atomic.h>
#include <odp/thrmask.h>
#include <odp_internal.h>
#include <odp/spinlock.h>
#include <odp/config.h>
#include <odp_debug_internal.h>
#include <odp/shared_memory.h>
#include <odp/align.h>
#include <odp/cpu.h>

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

typedef struct {
	thread_state_t thr[ODP_THREAD_COUNT_MAX];
	union {
		/* struct order must be kept in sync with schedule_types.h */
		struct {
			odp_thrmask_t  all;
			odp_thrmask_t  worker;
			odp_thrmask_t  control;
		};
		odp_thrmask_t sched_grp_mask[ODP_CONFIG_SCHED_GRPS];
	};
	uint32_t       num;
	uint32_t       num_worker;
	uint32_t       num_control;
	odp_spinlock_t lock;
} thread_globals_t;

/* Globals */
static thread_globals_t *thread_globals;

/* Thread local */
__thread const thread_state_t * const this_thread;

int odp_thread_init_global(void)
{
	odp_shm_t shm;
	int i;

	shm = odp_shm_reserve("odp_thread_globals",
			      sizeof(thread_globals_t),
			      ODP_CACHE_LINE_SIZE, 0);

	thread_globals = odp_shm_addr(shm);

	if (thread_globals == NULL)
		return -1;

	memset(thread_globals, 0, sizeof(thread_globals_t));
	odp_spinlock_init(&thread_globals->lock);

	for (i = 0; i < ODP_CONFIG_SCHED_GRPS; i++)
		odp_thrmask_zero(&thread_globals->sched_grp_mask[i]);

	return 0;
}

odp_thrmask_t *thread_sched_grp_mask(int index);
odp_thrmask_t *thread_sched_grp_mask(int index)
{
	return &thread_globals->sched_grp_mask[index];
}

int odp_thread_term_global(void)
{
	int ret;

	ret = odp_shm_free(odp_shm_lookup("odp_thread_globals"));
	if (ret < 0)
		ODP_ERR("shm free failed for odp_thread_globals");

	return ret;
}

static int alloc_id(odp_thread_type_t type)
{
	int thr;
	odp_thrmask_t *all = &thread_globals->all;

	if (thread_globals->num >= ODP_THREAD_COUNT_MAX)
		return -1;

	for (thr = 0; thr < ODP_THREAD_COUNT_MAX; thr++) {
		if (odp_thrmask_isset(all, thr) == 0) {
			odp_thrmask_set(all, thr);

			if (type == ODP_THREAD_WORKER) {
				odp_thrmask_set(&thread_globals->worker, thr);
				thread_globals->num_worker++;
			} else {
				odp_thrmask_set(&thread_globals->control, thr);
				thread_globals->num_control++;
			}

			thread_globals->num++;
			return thr;
		}
	}

	return -2;
}

static int free_id(int thr)
{
	odp_thrmask_t *all = &thread_globals->all;

	if (thr < 0 || thr >= ODP_THREAD_COUNT_MAX)
		return -1;

	if (odp_thrmask_isset(all, thr) == 0)
		return -1;

	odp_thrmask_clr(all, thr);

	if (thread_globals->thr[thr].type == ODP_THREAD_WORKER) {
		odp_thrmask_clr(&thread_globals->worker, thr);
		thread_globals->num_worker--;
	} else {
		odp_thrmask_clr(&thread_globals->control, thr);
		thread_globals->num_control--;
	}

	thread_globals->num--;
	return thread_globals->num;
}

int odp_thread_init_local(odp_thread_type_t type)
{
	int id;
	int cpu;

	odp_spinlock_lock(&thread_globals->lock);
	INVALIDATE(thread_globals);
	id = alloc_id(type);
	odp_spinlock_unlock(&thread_globals->lock);

	if (id < 0) {
		ODP_ERR("Too many threads\n");
		return -1;
	}
#ifdef __K1__
	cpu = __k1_get_cpu_id();
#else
	cpu = sched_getcpu();
#endif

	if (cpu < 0) {
		ODP_ERR("getcpu failed\n");
		return -1;
	}

	thread_globals->thr[id].thr  = id;
	thread_globals->thr[id].cpu  = cpu;
	thread_globals->thr[id].type = type;

	const thread_state_t **ptr = (const thread_state_t**)&this_thread;
	*ptr = &thread_globals->thr[id];
	return 0;
}

int odp_thread_term_local(void)
{
	int num;
	int id = this_thread->thr;

	odp_spinlock_lock(&thread_globals->lock);
	INVALIDATE(thread_globals);
	num = free_id(id);
	odp_spinlock_unlock(&thread_globals->lock);

	if (num < 0) {
		ODP_ERR("failed to free thread id %i", id);
		return -1;
	}

	return num; /* return a number of threads left */
}

int odp_thread_id(void)
{
	return this_thread->thr;
}

int odp_thread_count(void)
{
	return thread_globals->num;
}

int odp_thread_count_max(void)
{
	return ODP_THREAD_COUNT_MAX;
}

odp_thread_type_t odp_thread_type(void)
{
	return this_thread->type;
}

int odp_thrmask_worker(odp_thrmask_t *mask)
{
	INVALIDATE(thread_globals);
	odp_thrmask_copy(mask, &thread_globals->worker);
	return thread_globals->num_worker;
}

int odp_thrmask_control(odp_thrmask_t *mask)
{
	INVALIDATE(thread_globals);
	odp_thrmask_copy(mask, &thread_globals->control);
	return thread_globals->num_control;
}


text:
module JuCUDNN

using JuCUDA

include("../libcudnn-5/libcudnn.jl")
include("../libcudnn-5/libcudnn_types.jl")

@windows? (
  begin
    const libcudnn = Libdl.find_library(["cudnn64_5"])
  end : begin
    const libcudnn = Libdl.find_library(["libcudnn"])
  end)
isempty(libcudnn) && throw("CUDNN library cannot be found.")
info("CUDNN version: $(cudnnGetVersion())")

function checkstatus(status)
  if status != CUDNN_STATUS_SUCCESS
    Base.show_backtrace(STDOUT, backtrace())
    throw(bytestring(cudnnGetErrorString(status)))
  end
end

datatype(::Type{Float32}) = CUDNN_DATA_FLOAT
datatype(::Type{Float64}) = CUDNN_DATA_DOUBLE
datatype(::Type{Float16}) = CUDNN_DATA_HALF

include("handle.jl")
include("tensor.jl")
include("activation.jl")
include("convolution.jl")
include("dropout.jl")
include("filter.jl")
include("lrn.jl")
include("pooling.jl")
include("softmax.jl")
include("batchnorm.jl")
include("rnn.jl")

end


text:
package com.karasiq.shadowcloud.storage.gdrive

import java.time.{Duration, Instant}

import com.karasiq.gdrive.files.GDriveService
import com.karasiq.gdrive.files.GDriveService.TeamDriveId
import com.karasiq.shadowcloud.model.Path

import scala.concurrent.ExecutionContext
import scala.util.Try

private[gdrive] object GDriveSpaceEstimator {
  def apply(drive: GDriveService, rootPath: Path)(implicit ec: ExecutionContext, td: TeamDriveId) =
    new GDriveSpaceEstimator(drive, rootPath)
}

private[gdrive] class GDriveSpaceEstimator(drive: GDriveService, rootPath: Path)(implicit ec: ExecutionContext, td: TeamDriveId) {
  @volatile
  private[this] var lastEstimated     = 0L
  private[this] var lastEstimatedTime = Instant.MIN // Before dinosaurs

  def usedSpace(): Long = {
    if (lastEstimatedTime.plus(Duration.ofMinutes(5)).compareTo(Instant.now()) < 0)
      this.estimate()

    this.lastEstimated
  }

  private[this] def estimate(): Unit = {
    lastEstimatedTime = Instant.now()
    ec.execute { () ⇒
      var size = 0L

      Try(drive.traverseFolder(rootPath.nodes).foreach {
        case (_, file) ⇒
          size += file.size
          if (size > lastEstimated) lastEstimated = size
      })
      lastEstimated = size
    }
  }
}


text:
use std::error::Error as StdError;
use std::fmt;
use std::ops::{self, Range};
use Backend;

// TODO
/// Error accessing a mapping.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum Error {
    /// The requested mapping access did not match the expected usage.
    InvalidAccess,
    /// The requested mapping range is outside of the resource.
    OutOfBounds,
    ///
    OutOfMemory,
}

impl fmt::Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}

impl StdError for Error {
    fn description(&self) -> &str {
        use self::Error::*;
        match *self {
            InvalidAccess => "The requested mapping access did not match the expected usage",
            OutOfBounds => "The requested mapping range is outside of the resource",
            OutOfMemory => "Not enough physical or virtual memory",
        }
    }
}

/// Mapping reader
pub struct Reader<'a, B: Backend, T: 'a> {
    pub(crate) slice: &'a [T],
    pub(crate) buffer: &'a B::Buffer,
    pub(crate) released: bool,
}

impl<'a, B: Backend, T: 'a> Drop for Reader<'a, B, T> {
    fn drop(&mut self) {
        assert!(self.released, "a mapping reader was not released");
    }
}

impl<'a, B: Backend, T: 'a> ops::Deref for Reader<'a, B, T> {
    type Target = [T];
    fn deref(&self) -> &[T] { self.slice }
}

/// Mapping writer.
/// Currently is not possible to make write-only slice so while it is technically possible
/// to read from Writer, it will lead to an undefined behavior. Please do not read from it.
pub struct Writer<'a, B: Backend, T: 'a> {
    pub(crate) slice: &'a mut [T],
    pub(crate) buffer: &'a B::Buffer,
    pub(crate) range: Range<u64>,
    pub(crate) released: bool,
}

impl<'a, B: Backend, T: 'a> Drop for Writer<'a, B, T> {
    fn drop(&mut self) {
        assert!(self.released, "a mapping writer was not released");
    }
}

impl<'a, B: Backend, T: 'a> ops::Deref for Writer<'a, B, T> {
    type Target = [T];
    fn deref(&self) -> &[T] { self.slice }
}

impl<'a, B: Backend, T: 'a> ops::DerefMut for Writer<'a, B, T> {
    fn deref_mut(&mut self) -> &mut [T] { self.slice }
}


text:
Mutant::Meta::Example.add do
  source ':foo'

  singleton_mutations
  mutation ':foo__mutant__'
end


text:
package com.opengamma.master.historicaltimeseries;

import java.util.Map;
import java.util.Set;

import com.opengamma.id.ExternalId;
import com.opengamma.id.ExternalIdBundleWithDates;

/**
 * Resolves a single external identifier to a bundle with validity dates.
 *

 * This is used to find the different security identifiers over time.
 */
public interface ExternalIdResolver {

  /**
   * Get all available identifiers with dates if available.
   *

   * Some identifiers are only valid for a limited period of time.
   * After the identifier becomes invalid, it may be re-used for something else.
   * The {@code ExternalIdBundleWithDates} concept captures the valid dates for identifiers.
   *
   * @param externalIds  the identifiers that need to be resolved, not empty
   * @return a map of requested identifier to bundle, with dates if available
   */
  Map<ExternalId, ExternalIdBundleWithDates> getExternalIds(Set<ExternalId> externalIds);

}


text:
using Domain.Entities;

namespace Repository.Interfaces.Repositories
{
    public interface IUsuarioRepository : IRepository<Usuario>
    {
    }
}


text:
layout: default
---
{% include projects.html %}


text:
  I parametri consentono di richiedere agli utenti uno o più input che saranno
  forniti a una compilazione. Ad esempio, si potrebbe avere un progetto che
  esegue test su richiesta consentendo agli utenti di caricare un file ZIP
  contenente i binari da testare. Si potrebbe ottenere tale risultato
  aggiungendo qui un
  Parametro file
  .

  Oppure si potrebbe avere un progetto che rilascia del software e si desidera
  che gli utenti immettano delle note di rilascio che saranno caricate insieme
  al software. Si potrebbe ottenere tale risultato aggiungendo qui un
  Parametro stringa multiriga
  .

    Ogni parametro ha un
    Nome
    e qualche tipo di
    Valore
    che dipende dal tipo del parametro. Queste coppie nome-valore saranno
    esportate come variabili d'ambiente all'avvio della compilazione,
    consentendo ai passaggi successivi della configurazione della compilazione
    (come le istruzioni di compilazione) di accedere a tali valori, ad esempio
    utilizzando la sintassi
    ${NOME_PARAMETRO}
    (o
    %NOME_PARAMETRO%
    su Windows).

    Ciò implica anche che ogni parametro definito qui debba avere un
    Nome
    univoco.

    Quando un progetto è parametrizzato, il collegamento
    Compila ora
    usuale sarà sostituito da un collegamento
    Compila con parametri
    dove agli utenti verrà chiesto di specificare i valori per ognuno dei
    parametri definiti. Se questi scelgono di non immettere nulla, la
    compilazione verrà avviata con il valore predefinito per ogni parametro.

    Se una compilazione è avviata automaticamente, ad esempio se è avviata da un
    trigger del sistema di gestione del codice sorgente, saranno utilizzati i
    valori predefiniti per ogni parametro.

    Quando una compilazione parametrizzata è in coda, i tentativi di avvio di
    un'altra compilazione dello stesso progetto avranno successo solo se i
    valori dei parametri sono diversi, o se l'opzione
    Esegui compilazioni concorrenti se necessario
    è abilitata.

    Si veda la

      documentazione sulle compilazioni parametrizzate

    per ulteriori informazioni su questa funzionalità.