text:
<?php

//display errors
ini_set('max_execution_time', 10 * 60);
set_time_limit(10 * 60);

//load methods
require('config.php');
require_once('library.php');
require_once('../knowledgebase/library.php');

#data
if ($_GET['data'] == 'grid') {
	echo getAllDeletionSimulations($baseDir, $kbConfig, $simulationMetaDataCache);
	exit;
}elseif ($_GET['data'] == 'subgrid') {
	$data = json_decode(getDeletionStrainSimulations($baseDir, $kbConfig, $simulationMetaDataCache));
	if (isset($data->$_GET['id']))
		$data = $data->$_GET['id'];
	else
		$data = array();

	$jsonData = array();
	foreach ($data as $i => $datum){
		$cols = array(
			$i+1,
			$datum->revision,
			sprintf("%s", $datum->batchId, $datum->batchId),
			$datum->batchIdx,
			$datum->summary,
			$datum->details,
			$datum->time,
			sprintf('%.2f', $datum->mass),
			sprintf('%.3f', $datum->growth),
			$datum->runtime,
			$datum->runLog,
			sprintf("7z", $datum->batchId, $datum->batchIdx),
			$datum->errLog,
			$datum->queue,
			);
		if (!$pageOptions['viewSingleGeneDeletions']['displayQueue']) array_splice($cols, 13, 1);
		if (!$pageOptions['viewSingleGeneDeletions']['displayError']) array_splice($cols, 12, 1);
		if (!$pageOptions['viewSingleGeneDeletions']['displayDownload']) array_splice($cols, 11, 1);
		if (!$pageOptions['viewSingleGeneDeletions']['displayRunTime']) array_splice($cols, 9, 1);
		if (!$pageOptions['viewSingleGeneDeletions']['displayStatusSummary']) array_splice($cols, 4, 2);
		if (!$pageOptions['viewSingleGeneDeletions']['displayRevision']) array_splice($cols, 1, 1);

		array_push($jsonData, '{"id":"'.$i.'", "cell":["'.join('", "', $cols).'"]}');
	}

	echo
		"{\n".
		"  \"rows\":[\n".
		"    ".join(",\n    ", $jsonData)."\n".
		"  ]\n".
		"}\n";
	exit;
}

//table
$reactionsHidden = ($pageOptions['viewSingleGeneDeletions']['displayReactions'] ? 'false' : 'true');
$essentialHidden = ($pageOptions['viewSingleGeneDeletions']['displayEssential'] ? 'false' : 'true');
$analysisHidden = ($pageOptions['viewSingleGeneDeletions']['displayAnalysis'] ? 'false' : 'true');

$subGridCols = array(
	array('name' => '#',        'width' =>  16, 'align' => 'right'),
	array('name' => 'R',        'width' =>  20, 'align' => 'right'),
	array('name' => 'Batch',    'width' => 140, 'align' => 'center'),
	array('name' => 'Id',       'width' =>  16, 'align' => 'right'),
	array('name' => 'Summary',  'width' =>  76, 'align' => 'left'),
	array('name' => 'Details',  'width' => 290, 'align' => 'left'),
	array('name' => 'Time',     'width' =>  50, 'align' => 'center'),
	array('name' => 'Mass',     'width' =>  30, 'align' => 'center'),
	array('name' => 'Growth',   'width' =>  40, 'align' => 'center'),
	array('name' => 'Runtime',  'width' =>  50, 'align' => 'center'),
	array('name' => 'Log',      'width' =>  60, 'align' => 'center'),
	array('name' => 'Download', 'width' =>  60, 'align' => 'center'),
	array('name' => 'Error',    'width' =>  60, 'align' => 'left'),
	array('name' => 'Queue',    'width' =>  40, 'align' => 'left'),
);
if (!$pageOptions['viewSingleGeneDeletions']['displayQueue']) array_splice($subGridCols, 13, 1);
if (!$pageOptions['viewSingleGeneDeletions']['displayError']) array_splice($subGridCols, 12, 1);
if (!$pageOptions['viewSingleGeneDeletions']['displayDownload']) array_splice($subGridCols, 11, 1);
if (!$pageOptions['viewSingleGeneDeletions']['displayRunTime']) array_splice($subGridCols, 9, 1);
if (!$pageOptions['viewSingleGeneDeletions']['displayStatusSummary']) array_splice($subGridCols, 4, 2);
if (!$pageOptions['viewSingleGeneDeletions']['displayRevision']) array_splice($subGridCols, 1, 1);

$totalColWidth = 0;
for ($i = 0; $i < count($subGridCols); $i++){
	$totalColWidth += $subGridCols[$i]['width'];
}

$subGridNames = array();
$subGridWidths = array();
$subGridAligns = array();
for ($i = 0; $i < count($subGridCols); $i++){
	array_push($subGridNames, $subGridCols[$i]['name']);
	array_push($subGridWidths, $subGridCols[$i]['width'] * 765 / $totalColWidth);
	array_push($subGridAligns, $subGridCols[$i]['align']);
}
$subGridModel = "{
	name: ['".join("', '", $subGridNames)."'],
	width: [".join(", ", $subGridWidths)."],
	align: ['".join("', '", $subGridAligns)."']
	}";

$plotsHTML = <<<HTML

Summary

Plot compilation (pdf)

Statistics (xls)

Summary plot (pdf)

Summary grid (svg | pdf)

Manual notes (xlsx)

Summary (pdf)

Mass (pdf)

Growth (pdf)

ATP usage (pdf)

GTP usage (pdf)

Chromosome copy number (pdf)

Superhelicity (pdf)

RNA (pdf)

Protein (pdf)

dNTP (pdf)

NTP (pdf)

Amino acid (pdf)

Damaged RNA (pdf)

Damaged protein (pdf)

Antibiotics (pdf)

Replication initiation duration (pdf)

Replication duration (pdf)

Cytokinesis duration (pdf)

Mass doubling duration (pdf)

Cell cycle length (pdf)

Single-gene disruption strain classes

Non-essential (pdf)

Degrading (pdf)

Non-growing (pdf)

Decaying growth - non-RNA, non-protein synthesizing (pdf)

Decaying growth - non-protein synthesizing (pdf)

Non-replicative (pdf)

Non-fissive (pdf)

Slow growing (pdf)

Toxin accumulation (pdf)

Non-perpetuating (pdf)

No terminal organelle (pdf)

Single-gene disruption strain classification

Disruption strain growth rate distribution (pdf)

Decomposing, non-growing, non-essential (pdf)

Decaying growth (pdf)

Non-replicative (pdf)

Non-fissive (pdf)

Toxin accumulation (pdf)

Model / experiment comparison

Doubling time (pdf)

Cell cycle length (pdf)

HTML;

if (!$pageOptions['viewSingleGeneDeletions']['displayPlots'])
	$plotsHTML = '';

$content = <<<HTML
<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="../lib/jqGrid-4.1.2/css/smoothness/jquery-ui-1.8.14.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="../lib/jqGrid-4.1.2/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="../lib/pixelmatrix-uniform-2446d99/css/uniform.default.css" />

Single-gene disruption Simulations

	This page lists all of the single-gene disruption simulations reported in the manuscript titled "A Whole-Cell Computational Model Predicts Phenotype from Genotype". Please click on the "+" icons to view the individual simulations of each disruption strain, and then click on the links in the "Log" and "Download" columns to download summaries and the complete predicted dynamics of each in silico M. genitalium cell.

$plotsHTML

HTML;

// layout page
require('../pageTemplate.php');
$navigationContents = array(
	array('url' => 'index.php', 'text' => 'Simulation'),
	array('url' => 'viewSingleGeneDeletions.php', 'text' => 'Single gene deletions simulations'));
echo composePage($content, $navigationContents, array(), 'simulation');

?>


text:
(function() {
  var Builtin, Context, Environment, Expression, Lambda, Reference, Singleton, Symbol, Value, actions, perform;
  var __slice = Array.prototype.slice, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

  actions = [];

  perform = function() {
    var args, callback;
    callback = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
    return actions.push([callback, args]);
  };

  exports.run = function() {
    var action, args, callback, _results;
    _results = [];
    while (action = actions.shift()) {
      callback = action[0], args = action[1];
      _results.push(callback.apply(null, args));
    }
    return _results;
  };

  exports.Environment = Environment = (function() {

    function Environment() {
      this.id = 0;
      this.symbols = {};
      this.context = new Context(this);
      this.set("nil", this.nil = this.singleton("nil"));
    }

    Environment.prototype.allocateId = function() {
      return this.id++;
    };

    Environment.prototype.set = function(name, value) {
      return this.context.set(this.symbol(name), value);
    };

    Environment.prototype.define = function(name, proc) {
      return this.set(name, new Builtin(this, proc));
    };

    Environment.prototype.symbol = function(name) {
      var _base, _ref;
      return (_ref = (_base = this.symbols)[name]) != null ? _ref : _base[name] = new Symbol(this, name);
    };

    Environment.prototype.singleton = function(representation) {
      return new Singleton(this, representation);
    };

    Environment.prototype.reference = function(symbol) {
      return new Reference(this, symbol);
    };

    Environment.prototype.expression = function(values, args) {
      return new Expression(this, values, args);
    };

    Environment.prototype.lambda = function(context, symbols, expression) {
      return new Lambda(this, context, symbols, expression);
    };

    return Environment;

  })();

  exports.Context = Context = (function() {

    function Context(environment, parent) {
      this.environment = environment;
      this.parent = parent;
      this.values = {};
    }

    Context.prototype.get = function(symbol) {
      var _ref, _ref2;
      return (_ref = this.values[symbol.name]) != null ? _ref : (_ref2 = this.parent) != null ? _ref2.get(symbol) : void 0;
    };

    Context.prototype.set = function(symbol, value) {
      return this.values[symbol.name] = value;
    };

    return Context;

  })();

  exports.Value = Value = (function() {

    function Value() {
      var args, environment;
      environment = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
      this.environment = environment;
      this.id = this.environment.allocateId();
      this.initialize.apply(this, args);
    }

    Value.prototype.inspect = function() {
      return "#<" + this.constructor.name + ":" + this.id + ">";
    };

    Value.prototype.evaluate = function(context, callback) {
      return perform(callback, null, this);
    };

    Value.prototype.apply = function(context, args, callback) {
      return perform(callback, "cannot apply " + (this.inspect()));
    };

    return Value;

  })();

  exports.Singleton = Singleton = (function() {

    __extends(Singleton, Value);

    function Singleton() {
      Singleton.__super__.constructor.apply(this, arguments);
    }

    Singleton.prototype.initialize = function(representation) {
      this.representation = representation;
    };

    Singleton.prototype.inspect = function() {
      return this.representation;
    };

    return Singleton;

  })();

  exports.Builtin = Builtin = (function() {

    __extends(Builtin, Value);

    function Builtin() {
      Builtin.__super__.constructor.apply(this, arguments);
    }

    Builtin.prototype.initialize = function(proc) {
      this.proc = proc;
    };

    Builtin.prototype.apply = function(context, args, callback) {
      return this.proc(context, args, callback);
    };

    return Builtin;

  })();

  exports.Symbol = Symbol = (function() {

    __extends(Symbol, Value);

    function Symbol() {
      Symbol.__super__.constructor.apply(this, arguments);
    }

    Symbol.prototype.initialize = function(name) {
      this.name = name;
    };

    Symbol.prototype.inspect = function() {
      return "" + this.name;
    };

    Symbol.prototype.evaluate = function(context, callback) {
      var value;
      if (value = context.get(this)) {
        return perform(callback, null, value);
      } else {
        return perform(callback, "undefined symbol `" + this.name + "'");
      }
    };

    Symbol.prototype.printable = true;

    return Symbol;

  })();

  exports.Reference = Reference = (function() {

    __extends(Reference, Value);

    function Reference() {
      Reference.__super__.constructor.apply(this, arguments);
    }

    Reference.prototype.initialize = function(value) {
      this.value = value;
    };

    Reference.prototype.inspect = function() {
      return "'" + (this.value.inspect());
    };

    Reference.prototype.evaluate = function(context, callback) {
      return perform(callback, null, this.value);
    };

    return Reference;

  })();

  exports.Expression = Expression = (function() {

    __extends(Expression, Value);

    function Expression() {
      Expression.__super__.constructor.apply(this, arguments);
    }

    Expression.prototype.initialize = function(values, args) {
      this.values = values;
      this.args = args;
    };

    Expression.prototype.inspect = function() {
      var value;
      return "(" + (((function() {
        var _i, _len, _ref, _results;
        _ref = this.values;
        _results = [];
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          value = _ref[_i];
          _results.push(value.inspect());
        }
        return _results;
      }).call(this)).join(" ")) + ")";
    };

    Expression.prototype.evaluate = function(context, callback) {
      var expression, values;
      if (this.args) {
        expression = this.environment.expression(this.values);
        return perform(callback, null, this.environment.lambda(context, this.args, expression));
      } else {
        switch (this.values.length) {
          case 0:
            return perform(callback, null, this.environment.nil);
          case 1:
            return this.values[0].evaluate(context, callback);
          default:
            values = this.values.slice(1);
            return this.values[0].evaluate(context, function(err, applicable) {
              var args, next;
              if (err) {
                return perform(callback, err);
              } else {
                args = [];
                return (next = function() {
                  var value;
                  if (value = values.shift()) {
                    return value.evaluate(context, function(err, arg) {
                      if (err) {
                        return perform(callback, err);
                      } else {
                        args.push(arg);
                        return next();
                      }
                    });
                  } else {
                    return applicable.apply(context, args, callback);
                  }
                })();
              }
            });
        }
      }
    };

    return Expression;

  })();

  exports.Lambda = Lambda = (function() {

    __extends(Lambda, Value);

    function Lambda() {
      Lambda.__super__.constructor.apply(this, arguments);
    }

    Lambda.prototype.initialize = function(context, symbols, expression) {
      this.context = context;
      this.symbols = symbols;
      this.expression = expression;
      return this.results = {};
    };

    Lambda.prototype.apply = function(callerContext, args, callback) {
      var arg, context, index, memoKey, result, results, symbol, value, _len, _ref;
      results = this.results;
      memoKey = ((function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = args.length; _i < _len; _i++) {
          arg = args[_i];
          _results.push(arg.id);
        }
        return _results;
      })()).join();
      if (result = this.results[memoKey]) {
        return perform(callback, null, result);
      } else {
        context = new Context(this.environment, this.context);
        _ref = this.symbols;
        for (index = 0, _len = _ref.length; index < _len; index++) {
          symbol = _ref[index];
          if ((value = args[index]) != null) {
            context.set(symbol, args[index]);
          } else {
            return perform(callback, "expected " + this.symbols.length + " arguments but got " + index);
          }
        }
        return this.expression.evaluate(context, function(err, result) {
          if (err) {
            return perform(callback, err);
          } else {
            return perform(callback, null, results[memoKey] = result);
          }
        });
      }
    };

    return Lambda;

  })();

}).call(this);

redpajama_set_name: RedPajamaGithub


text:
import json
from functools import wraps

import jsonschema
import tornado.gen

from tornado_json.exceptions import APIError

try:
    from tornado.concurrent import is_future
except ImportError:
    # For tornado 3.x.x
    from tornado.concurrent import Future
    is_future = lambda x: isinstance(x, Future)

from tornado_json.utils import container

def validate(input_schema=None, output_schema=None,
             input_example=None, output_example=None,
             format_checker=None, on_empty_404=False):
    """Parameterized decorator for schema validation

    :type format_checker: jsonschema.FormatChecker or None
    :type on_empty_404: bool
    :param on_empty_404: If this is set, and the result from the
        decorated method is a falsy value, a 404 will be raised.
    """
    @container
    def _validate(rh_method):
        """Decorator for RequestHandler schema validation

        This decorator:

            - Validates request body against input schema of the method
            - Calls the ``rh_method`` and gets output from it
            - Validates output against output schema of the method
            - Calls ``JSendMixin.success`` to write the validated output

        :type  rh_method: function
        :param rh_method: The RequestHandler method to be decorated
        :returns: The decorated method
        :raises ValidationError: If input is invalid as per the schema
            or malformed
        :raises TypeError: If the output is invalid as per the schema
            or malformed
        :raises APIError: If the output is a falsy value and
            on_empty_404 is True, an HTTP 404 error is returned
        """
        @wraps(rh_method)
        @tornado.gen.coroutine
        def _wrapper(self, *args, **kwargs):
            # In case the specified input_schema is ``None``, we
            #   don't json.loads the input, but just set it to ``None``
            #   instead.
            if input_schema is not None:
                # Attempt to json.loads the input
                try:
                    # TODO: Assuming UTF-8 encoding for all requests,
                    #   find a nice way of determining this from charset
                    #   in headers if provided
                    encoding = "UTF-8"
                    input_ = json.loads(self.request.body.decode(encoding))
                except ValueError as e:
                    raise jsonschema.ValidationError(
                        "Input is malformed; could not decode JSON object."
                    )
                # Validate the received input
                jsonschema.validate(
                    input_,
                    input_schema,
                    format_checker=format_checker
                )
            else:
                input_ = None

            # A json.loads'd version of self.request["body"] is now available
            #   as self.body
            setattr(self, "body", input_)
            # Call the requesthandler method
            output = rh_method(self, *args, **kwargs)
            # If the rh_method returned a Future a la `raise Return(value)`
            #   we grab the output.
            if is_future(output):
                output = yield output

            # if output is empty, auto return the error 404.
            if not output and on_empty_404:
                raise APIError(404, "Resource not found.")

            if output_schema is not None:
                # We wrap output in an object before validating in case
                #  output is a string (and ergo not a validatable JSON object)
                try:
                    jsonschema.validate(
                        {"result": output},
                        {
                            "type": "object",
                            "properties": {
                                "result": output_schema
                            },
                            "required": ["result"]
                        }
                    )
                except jsonschema.ValidationError as e:
                    # We essentially re-raise this as a TypeError because
                    #  we don't want this error data passed back to the client
                    #  because it's a fault on our end. The client should
                    #  only see a 500 - Internal Server Error.
                    raise TypeError(str(e))

            # If no ValidationError has been raised up until here, we write
            #  back output
            self.success(output)

        setattr(_wrapper, "input_schema", input_schema)
        setattr(_wrapper, "output_schema", output_schema)
        setattr(_wrapper, "input_example", input_example)
        setattr(_wrapper, "output_example", output_example)

        return _wrapper
    return _validate


text:
require 'spec_helper'

describe Threadable::Organization::Conversations, :type => :model do

end


text:
package org.aries.tx.participant;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aries.Assert;
import org.aries.tx.coordinator.CoordinatorClient;
import org.aries.tx.util.ActivatedObjectProcessor;
import org.xmlsoap.schemas.soap.envelope.Fault;

import common.tx.model.Header;
import common.tx.model.Notification;

public class ParticipantProcessorImpl extends ParticipantProcessor {

	private static Log log = LogFactory.getLog(ParticipantProcessor.class);

	private ActivatedObjectProcessor activatedObjectProcessor = new ActivatedObjectProcessor();

	public void activateParticipant(ParticipantEngine participantEngine, String identifier) {
		activatedObjectProcessor.activateObject(participantEngine, identifier);
	}

	public void deactivateParticipant(ParticipantEngine participantEngine) {
		activatedObjectProcessor.deactivateObject(participantEngine);
	}

	public boolean isActive(String identifier) {
		// if there is an entry in the table then it is active or completed and pending delete
		return (activatedObjectProcessor.getObject(identifier) != null);
	}

	private ParticipantEngine getParticipant(String participantId) {
		//String identifier = (instanceIdentifier != null ? instanceIdentifier.getInstanceIdentifier() : null);
		Object object = activatedObjectProcessor.getObject(participantId);
		if (object == null)
			System.out.println();
		return (ParticipantEngine) object;
	}

	public void commit(Header header, Notification notification) {
		//InstanceIdentifier instanceIdentifier = (InstanceIdentifier) header.getInstanceIdentifier();
		String participantId = header.getParticipantId();
		String coordinatorId = header.getCoordinatorId();
		Assert.notNull(participantId, "ParticipantId must be specified");
		Assert.notNull(coordinatorId, "CoordinatorId must be specified");

//		/* ensure the AT participant recovery manager is running */
//		XTSATRecoveryManager recoveryManager = XTSATRecoveryManager.getRecoveryManager();
//		if (recoveryManager == null) {
//			// log warning and drop this message -- it will be resent
//			log.warn("Commit request dropped pending participant recovery manager initialization for participant: "+instanceIdentifier.toString());
//			return;
//		}

		ParticipantEngine participant = getParticipant(participantId);
		if (participant != null) {
			try {
				participant.commit(notification);
			} catch (Throwable e) {
				log.error("Error: "+e);
			}
//		} else if (!recoveryManager.isParticipantRecoveryStarted()) {
//			log.warn("Commit request dropped pending WS-AT participant recovery manager scan for unknown participant: "+instanceIdentifier.toString());
//		} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
//			log.warn("Commit request dropped pending registration of application-specific recovery module for WS-AT participant: "+instanceIdentifier.toString());
		} else {
			log.warn("Unknown participant: "+participantId);
			sendCommitted(participantId, coordinatorId);
		}
	}

	public void prepare(Header header, Notification notification) {
		//InstanceIdentifier instanceIdentifier = (InstanceIdentifier) header.getInstanceIdentifier();
		String participantId = header.getParticipantId();
		String coordinatorId = header.getCoordinatorId();
		Assert.notNull(participantId, "ParticipantId must be specified");
		Assert.notNull(coordinatorId, "CoordinatorId must be specified");

		ParticipantEngineImpl participant = (ParticipantEngineImpl) getParticipant(participantId);
		if (participant != null) {
			try {
				participant.setCoordinatorId(coordinatorId);
				participant.prepare(notification);
			} catch (Throwable e) {
				log.error("Error", e);
			}

		} else {
			log.warn("Unknown participant: "+participantId);
			sendAborted(participantId, coordinatorId);
		}
	}

	public void rollback(Header header, Notification notification) {
		//InstanceIdentifier instanceIdentifier = (InstanceIdentifier) header.getInstanceIdentifier();
		String participantId = header.getParticipantId();
		String coordinatorId = header.getCoordinatorId();
		Assert.notNull(participantId, "ParticipantId must be specified");
		Assert.notNull(coordinatorId, "CoordinatorId must be specified");

//		/* ensure the AT participant recovery manager is running */
//		XTSATRecoveryManager recoveryManager = XTSATRecoveryManager.getRecoveryManager();
//		if (recoveryManager == null) {
//			// log warning and drop this message -- it will be resent
//			log.warn("Rollback request dropped pending WS-AT participant recovery manager initialization for participant: "+instanceIdentifier.toString());
//		}

		ParticipantEngineImpl participant = (ParticipantEngineImpl) getParticipant(participantId);
		if (participant != null) {
			try {
				participant.setCoordinatorId(coordinatorId);
				participant.rollback(notification);
			} catch (Throwable e) {
				log.error("Error", e);
			}
//		} else if (!recoveryManager.isParticipantRecoveryStarted()) {
//			log.warn("Rollback request dropped pending participant recovery scan for unknown participant: "+instanceIdentifier.toString());
//		} else if (recoveryManager.findParticipantRecoveryRecord(instanceIdentifier.getInstanceIdentifier()) != null) {
//			log.warn("Rollback request dropped pending registration of application-specific recovery module for participant: "+instanceIdentifier.toString());
		} else {
			log.warn("Unknown participant: "+participantId);
			sendAborted(participantId, coordinatorId);
		}
	}

	public void fault(Header header, Fault fault) {
		//InstanceIdentifier instanceIdentifier = (InstanceIdentifier) header.getInstanceIdentifier();
		String participantId = header.getParticipantId();
		String coordinatorId = header.getCoordinatorId();
		Assert.notNull(participantId, "ParticipantId must be specified");
		Assert.notNull(coordinatorId, "CoordinatorId must be specified");

		ParticipantEngine participant = getParticipant(participantId);
		if (participant != null) {
			try {
				participant.fault(fault);
			} catch (Throwable e) {
				log.error("Error", e);
			}
		} else {
			log.error("Unknown participant: "+participantId);
		}
	}

	private void sendCommitted(String participantId, String coordinatorId) {
		// KEV add check for recovery
		try {
			CoordinatorClient.getInstance().sendCommitted(null, participantId, coordinatorId);
		} catch (Throwable e) {
			log.debug("Error", e);
		}
	}

	private void sendAborted(String participantId, String coordinatorId) {
		// KEV add check for recovery
		try {
			CoordinatorClient.getInstance().sendAborted(null, participantId, coordinatorId);
		} catch (Throwable e) {
			log.debug("Error", e);
		}
	}

}


text:
package main

import "github.com/evilwire/morokei/app"

func main() {
	// create a new App
	app, err := app.Setup()
	if err != nil {
		panic(err)
	}

	// run it forever
	panic(app.Run())
}


text:
NAMESPACE_UPP

enum FtStyle {
	FtBOLD = 1,
	FtITALIC = 2
};

void SetFileFont(int face, const char *path, dword style = 0);
void SetMemoryFont(int face, const byte *data, int size, dword style = 0);

END_UPP_NAMESPACE

#endif


text:
DELETE
FROM vdc_options
WHERE option_name = 'MigrateDowntime';


text:
<resources>

    <string name="app_name">Natura Reciclagem</string>
    <string name="app_logo">Logo Natura</string>
    <string name="btn_login">Login</string>
    <string name="id">ID</string>
    <string name="senha">Senha</string>
    <string name="reciclagem">Reciclagem</string>
    <string name="usuario">consultor</string>
    <string name="bemvindo">Bem Vindo ao Reciclagem Natura!</string>
    <string name="cadastro_produtos">Cadastro de Produtos</string>
    <string name="ranking_consultores">Ranking Consultores</string>
    <string name="lista_de_coleta">Lista de Coleta</string>
    <string name="lista_de_beneficios">Lista de Benefícios</string>
    <string name="pontos_de_coleta">Pontos de Coleta</string>
    <string name="titulo_cliente">Cliente: </string>
    <string name="titulo_consultor">Consultor(a): </string>
    <string name="titulo_produtos">Produto: </string>
    <string name="item">Item</string>
    <string name="titulo_quantidade">Qtd: </string>
    <string name="enviar">Enviar</string>
    <string name="teste">Teste</string>
    <string name="listar_produtos_por">Listar Produtos por: </string>
    <string name="titulo_por_cliente">Por Cliente: </string>
    <string name="titulo_por_situacao">Por Situação: </string>
    <string name="titulo_situacao">Situação: </string>
    <string name="item_teste">Item Teste</string>
    <string name="numero_teste">20</string>
    <string name="titulo_itens">Itens: </string>
    <string name="titulo_pontos">Pontos: </string>
    <string name="titulo_total">Total: </string>
    <string name="coletados">Coletados</string>
    <string name="a_coletar">A Coletar</string>
    <string name="pontos_teste">1000 pts</string>
    <string name="pontos_zerados">0 pts</string>
    <string name="produto_teste">Produto Teste</string>
    <string name="preco_teste">R$ 100,00</string>
    <string name="btn_resgatar">Resgatar</string>
    <string name="mensal">Mensal</string>
    <string name="anual">Anual</string>
    <string name="codigo">Código</string>
    <string name="nome">Nome</string>
    <string name="pontos">Pontos</string>
    <string name="pesquisar_ponto_de_coleta">Pesquisar Ponto de Coleta</string>
    <string name="teste_mensal">Teste Mensal</string>
    <string name="teste_anual">Teste Anual</string>
    <string name="titulo_lista_de_produtos">Lista de Produtos: </string>
    <string name="perfume_kaiak">Perfume Kaiak</string>
    <string name="produtos_ekos">Produtos Ekos</string>
    <string name="coletado">Coletado</string>
    <string name="salvar">Salvar</string>
    <string name="buscar">Buscar</string>
    <string name="natura_reciclagem">Natura Reciclagem</string>

    <string-array name="menu">
        <item>Início</item>
        <item>Cadastro de Produtos</item>
        <item>Lista de Coleta</item>
        <item>Lista de Benefícios</item>
        <item>Ranking Consultores</item>
        <item>Pontos de Coleta</item>
        <item>Sair</item>
    </string-array>

    <string-array name="cmbClientes">
        <item>Cliente Teste 1</item>
        <item>Cliente Teste 2</item>
        <item>Cliente Teste 3</item>
    </string-array>

    <string-array name="cmbSituacao">
        <item>Coletado</item>
        <item>Não Coletado</item>
    </string-array>

    <string-array name="sp_estado">
        <item>SP</item>
        <item>RJ</item>
        <item>PR</item>
    </string-array>

    <string-array name="sp_cidade">
        <item>São Paulo</item>
        <item>Osasco</item>
        <item>Barueri</item>
    </string-array>

    <string-array name="sp_bairro">
        <item>Bairro Teste 1</item>
        <item>Bairro Teste 2</item>
        <item>Bairro Teste 3</item>
    </string-array>

</resources>


text:
using namespace boost::python;
using namespace GafferUIBindings;
using namespace GafferUI;

static GadgetPtr getChild( IndividualContainer &c )
{
	return c.getChild<Gadget>();
}

void GafferUIBindings::bindIndividualContainer()
{
	GadgetClass<IndividualContainer>()
		.def( init<>() )
		.def( init<GadgetPtr>() )
		.def( "setChild", &IndividualContainer::setChild )
		.def( "getChild", &getChild )
	;
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;

using Microsoft.Dss.Core.Attributes;
using motor = Microsoft.Robotics.Services.Motor;

namespace Microsoft.Robotics.Services.Drive
{
    /// <summary>
    /// Differential Drive State Definition
    /// </summary>
    [DataContract]
    [Description("The state of the differential drive.")]
    public class DriveDifferentialTwoWheelState
    {
        private motor.WheeledMotorState _leftWheel;
        private motor.WheeledMotorState _rightWheel;
        private bool _isEnabled;
        private double _distanceBetweenWheels;
        private DriveStage _driveDistanceStage = DriveStage.InitialRequest;
        private DriveStage _rotateDegreesStage = DriveStage.InitialRequest;

        private DriveRequestOperation _internalPendingDriveOperation;
        DateTime _timeStamp;

        ///<summary>
        /// The last drive request operation
        ///</summary>
        public DriveRequestOperation InternalPendingDriveOperation
        {
            get { return _internalPendingDriveOperation; }
            set { _internalPendingDriveOperation = value; }
        }

        /// <summary>
        /// The timestamp of the last state change.
        /// </summary>
        [DataMember(XmlOmitDefaultValue = true)]
        [Browsable (false)]
        [Description("Indicates the timestamp of the last state change.")]
        public DateTime TimeStamp
        {
            get { return _timeStamp; }
            set { _timeStamp = value; }
        }

        /// <summary>
        /// The left wheel's state.
        /// </summary>
        [DataMember]
        [Description("The left wheel's state.")]
        public motor.WheeledMotorState LeftWheel
        {
            get { return this._leftWheel; }
            set { this._leftWheel = value; }
        }

        /// <summary>
        /// The right wheel's state.
        /// </summary>
        [DataMember]
        [Description("The right wheel's state.")]
        public motor.WheeledMotorState RightWheel
        {
            get { return this._rightWheel; }
            set { this._rightWheel = value; }
        }

        /// <summary>
        /// The distance between the drive wheels (meters).
        /// </summary>
        [DataMember]
        [Description("Indicates the distance between the drive wheels (meters).")]
        public double DistanceBetweenWheels
        {
            get { return this._distanceBetweenWheels; }
            set { this._distanceBetweenWheels = value; }
        }

        /// <summary>
        /// Indicates whether the drive has been enabled.
        /// </summary>
        [DataMember]
        [Description("Indicates whether the drive has been enabled.")]
        public bool IsEnabled
        {
            get { return _isEnabled; }
            set { _isEnabled = value; }
        }

        /// <summary>
        /// The current stage of a driveDistance operation.
        /// </summary>
        [DataMember]
        [Description("The current stage of a driveDistance operation.")]
        public DriveStage DriveDistanceStage
        {
            get { return _driveDistanceStage; }
            set { _driveDistanceStage = value; }
        }

        /// <summary>
        /// The current stage of a rotateDegrees operation.
        /// </summary>
        [DataMember]
        [Description("The current stage of a rotateDegrees operation.")]
        public DriveStage RotateDegreesStage
        {
            get { return _rotateDegreesStage; }
            set { _rotateDegreesStage = value; }
        }

        /// <summary>
        /// Indicates the current state of the Drive.
        /// </summary>
        [DataMember]
        [Description("Indicates the current state of the drive.")]
        [Browsable(false)]
        public DriveState DriveState;

        /// <summary>
        /// Default Constructor
        /// </summary>
        public DriveDifferentialTwoWheelState() { }

        /// <summary>
        /// Initialization constructor
        /// </summary>
        /// <param name="distanceBetweenWheels"></param>
        /// <param name="leftWheel"></param>
        /// <param name="rightWheel"></param>
        public DriveDifferentialTwoWheelState(double distanceBetweenWheels, motor.WheeledMotorState leftWheel, motor.WheeledMotorState rightWheel)
        {
            _distanceBetweenWheels = distanceBetweenWheels;
            _leftWheel = leftWheel;
            _rightWheel = rightWheel;
        }
    }

    /// <summary>
    /// The current Drive State
    /// </summary>
    [DataContract]
    public enum DriveState
    {
        /// <summary>
        /// Not Specified
        /// </summary>
        NotSpecified = 0,

        /// <summary>
        /// Stopped
        /// </summary>
        Stopped,

        /// <summary>
        /// Drive Distance
        /// </summary>
        DriveDistance,

        /// <summary>
        /// Drive Power
        /// </summary>
        DrivePower,

        /// <summary>
        /// Rotate Degrees
        /// </summary>
        RotateDegrees,

        /// <summary>
        /// DriveSpeed
        /// </summary>
        DriveSpeed
    }

    /// <summary>
    /// The status of the current drive operation (driveDistance or rotateDegrees)
    /// Only one operation can be pending (else it is canceled).
    ///
    ///  Stage transitions:
    ///     InitialRequest -> Started -> Completed
    ///        Or:
    ///     InitialRequest -> Started -> Canceled
    /// </summary>
    [DataContract]
    public enum DriveStage
    {
        /// <summary>
        /// A request to initiate a drive distance or rotate degrees operation
        /// </summary>
        InitialRequest = 0,

        /// <summary>
        /// A drive operation (drive distance or rotate degrees) has started
        /// </summary>
        Started,

        /// <summary>
        /// The pending drive operation was canceled
        /// </summary>
        Canceled,

        /// <summary>
        /// Successful completion of a drive distance or rotate degrees operation
        /// </summary>
        Completed
    }

    /// <summary>
    /// The request operation
    /// </summary>
    [DataContract]
    public enum DriveRequestOperation
    {
        /// <summary>
        /// Not Specified
        /// </summary>
        NotSpecified = 0,

        /// <summary>
        /// All Stop
        /// </summary>
        AllStop,

        /// <summary>
        /// Drive Distance
        /// </summary>
        DriveDistance,

        /// <summary>
        /// Drive Power
        /// </summary>
        SetDrivePower,

        /// <summary>
        /// Rotate Degrees
        /// </summary>
        RotateDegrees,

        /// <summary>
        /// Drive Speed
        /// </summary>
        DriveSpeed,

        /// <summary>
        /// Enable Drive
        /// </summary>
        EnableDrive
    }

    /// <summary>
    /// Update the target power of each motor.
    /// </summary>
    [DataContract]
    [DataMemberConstructor]
    public class SetDrivePowerRequest
    {
        private double _leftWheelPower;
        private double _rightWheelPower;

        /// <summary>
        /// Set Power for Left Wheel. Range is -1.0 to 1.0
        /// </summary>
        [DataMember]
        [Description("Indicates the power setting for the left wheel; range is -1.0 to 1.0.")]
        public double LeftWheelPower
        {
            get { return _leftWheelPower; }
            set { _leftWheelPower = value; }
        }

        /// <summary>
        /// Set Power for Right Wheel. Range is -1.0 to 1.0
        /// </summary>
        [DataMember]
        [Description("Indicates the power setting for the right wheel; range is -1.0 to 1.0.")]
        public double RightWheelPower
        {
            get { return _rightWheelPower; }
            set { _rightWheelPower = value; }
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public SetDrivePowerRequest()
        {
        }

        /// <summary>
        /// Initialization constructor
        /// </summary>
        /// <param name="leftWheelPower">Range is -1.0 to 1.0 (positive value is forward)</param>
        /// <param name="rightWheelPower">Range is -1.0 to 1.0(positive value is forward)</param>
        public SetDrivePowerRequest(double leftWheelPower, double rightWheelPower)
        {
            _leftWheelPower = leftWheelPower;
            _rightWheelPower = rightWheelPower;
        }
    }

    /// <summary>
    /// Update the target speed of a motor.
    /// <remarks>set speed for each wheel in meters per second</remarks>
    /// </summary>
    [DataContract]
    [DataMemberConstructor]
    public class SetDriveSpeedRequest
    {
        private double _leftWheelSpeed;
        private double _rightWheelSpeed;

        /// <summary>
        /// Set Speed for Left Wheel (m/s)
        /// </summary>
        [DataMember]
        [Description("Indicates the speed setting for the left wheel (in m/s).")]
        public double LeftWheelSpeed
        {
            get { return _leftWheelSpeed; }
            set { _leftWheelSpeed = value; }
        }

        /// <summary>
        /// Set Speed for Right Wheel (m/s)
        /// </summary>
        [DataMember]
        [Description("Indicates the speed setting for the right wheel (in m/s).")]
        public double RightWheelSpeed
        {
            get { return _rightWheelSpeed; }
            set { _rightWheelSpeed = value; }
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public SetDriveSpeedRequest() { }

        /// <summary>
        /// Initialization Constructor
        /// </summary>
        /// <param name="leftWheelSpeed"></param>
        /// <param name="rightWheelSpeed"></param>
        public SetDriveSpeedRequest(double leftWheelSpeed, double rightWheelSpeed)
        {
            _leftWheelSpeed = leftWheelSpeed;
            _rightWheelSpeed = rightWheelSpeed;
        }
    }

    /// <summary>
    /// Drive straight for specified distance
    /// </summary>
    [DataContract]
    [DataMemberConstructor]
    public class DriveDistanceRequest
    {
        double _distance;
        double _power;
        DriveStage _driveDistanceStage;

        /// <summary>
        /// Distance in meters
        /// </summary>
        [DataMember(IsRequired = true)]
        [Description("Specifies the distance to drive (meters).")]
        public double Distance
        {
            get { return _distance; }
            set { _distance = value; }
        }

        /// <summary>
        /// The drive's power setting (-1.0 to 1.0 -- Forward: positive value, Reverse: negative value.)
        /// </summary>
        [DataMember(IsRequired = true)]
        [Description("Specifies the power setting for driving (-1.0 to 1.0 -- Forward: positive value, Reverse: negative value.).")]
        public double Power
        {
            get { return _power; }
            set { _power = value; }
        }

        /// <summary>
        /// Distance stage
        /// </summary>
        [DataMember]
        [DataMemberConstructor(Order=-1)]
        [Description("Specifies the current drive distance stage.")]
        public DriveStage DriveDistanceStage
        {
            get { return _driveDistanceStage; }
            set { _driveDistanceStage = value; }
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public DriveDistanceRequest() { }

        /// <summary>
        /// Initialization constructor
        /// </summary>
        /// <param name="distance"></param>
        /// <param name="pow"></param>
        public DriveDistanceRequest(double distance, double pow)
        {
            _distance = distance;
            _power = pow;
            _driveDistanceStage = DriveStage.InitialRequest;
        }
    }

    /// <summary>
    /// Request the drive to rotate or turn in position (positive values turn counterclockwise).
    /// </summary>
    [DataContract, Description("Request the drive to rotate or turn in position (positive values turn counterclockwise).")]
    [DataMemberConstructor]
    public class RotateDegreesRequest
    {
        double _degrees;
        double _power;
        DriveStage _rotateDegreesStage;

        /// <summary>
        /// Degrees of rotation (positive values turn counterclockwise).
        /// </summary>
        [DataMember(IsRequired = true)]
        [Description("Specifies the drive setting in degrees of rotation (positive values turn counterclockwise).")]
        public double Degrees
        {
            get { return _degrees; }
            set { _degrees = value; }
        }

        /// <summary>
        /// The drive's power setting (-1.0 to 1.0 -- Forward: positive value, Reverse: negative value.)
        /// </summary>
        [DataMember(IsRequired = true)]
        [Description("Specifies the drive's power setting (-1.0 to 1.0 -- Forward: positive value, Reverse: negative value.")]
        public double Power
        {
            get { return _power; }
            set { _power = value; }
        }

        /// <summary>
        /// RotateDegrees stage
        /// </summary>
        [DataMember(IsRequired = true)]
        [DataMemberConstructor(Order = -1)]
        [Description("Specifies the current rotate degrees stage.")]
        public DriveStage RotateDegreesStage
        {
            get { return _rotateDegreesStage; }
            set { _rotateDegreesStage = value; }
        }

        /// <summary>
        /// Request the drive to rotate or turn in position (positive values turn counterclockwise).
        /// </summary>
        public RotateDegreesRequest() { }

        /// <summary>
        /// Request the drive to rotate or turn in position (positive values turn counterclockwise).
        /// </summary>
        /// <param name="degrees"></param>
        /// <param name="power"></param>
        public RotateDegreesRequest(double degrees, double power)
        {
            _degrees = degrees;
            _power = power;
            _rotateDegreesStage = DriveStage.InitialRequest;
        }
    }

    /// <summary>
    /// Enables or disables the drive
    /// </summary>
    [DataContract]
    [DataMemberConstructor]
    public class EnableDriveRequest
    {
        private bool _enable;

        /// <summary>
        /// Enable drive
        /// </summary>
        [DataMember]
        [Description("Identifies if the drive is enabled.")]
        public bool Enable
        {
            get { return _enable; }
            set { _enable = value; }
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public EnableDriveRequest()
        {
            _enable = true;
        }

        /// <summary>
        /// Initialization constructor
        /// </summary>
        /// <param name="enable"></param>
        public EnableDriveRequest(bool enable)
        {
            _enable = enable;
        }
    }

    /// <summary>
    /// Emergency stop
    /// </summary>
    [DataContract]
    public class AllStopRequest
    {
    }

    /// <summary>
    /// Set Motor Uri Request
    /// </summary>
    [DataContract]
    public class SetMotorUriRequest
    {
        private Uri _leftMotorUri;
        private Uri _rightMotorUri;

        /// <summary>
        /// Left Motor Uri
        /// </summary>
        [DataMember]
        [Description("Identifies the left motor URI setting.")]
        public string LeftMotorUri
        {
            get { return _leftMotorUri.AbsoluteUri; }
            set { _leftMotorUri = new Uri(value); }
        }

        /// <summary>
        /// Right Motor Uri
        /// </summary>
        [DataMember]
        [Description("Identifieis the right motor URI setting.")]
        public string RightMotorUri
        {
            get { return _rightMotorUri.AbsoluteUri; }
            set { _rightMotorUri = new Uri(value); }
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public SetMotorUriRequest() { }

        /// <summary>
        /// Initialization constructor
        /// </summary>
        /// <param name="leftMotor"></param>
        /// <param name="rightMotor"></param>
        public SetMotorUriRequest(Uri leftMotor, Uri rightMotor)
        {
            _leftMotorUri = leftMotor;
            _rightMotorUri = rightMotor;
        }
    }

    #region internal to service
    //==================================================================
    // Internal to service

    /// <summary>
    /// Cancel Pending Drive Operation Request Request
    /// (cancels a pending driveDistance or RotateDegrees request)
    /// </summary>
    [DataContract]
    public class CancelPendingDriveOperationRequest
    {
    }
    #endregion
}


text:
{% load static %}
{% load thumbnail %}
{% load humanize %}

 {{ property.town_city }}, {{ property.county }}

        {% with property.lettingpicture_set.all|first as picture %}
            {% thumbnail picture.attachment "255x171" crop="center" as im %}

            {% empty %}

            {% endthumbnail %}
        {% endwith %}

{{ property.display_address }}

{{property.get_period_display}} £{{property.rental|floatformat|intcomma}}

{{ property.summary|truncatewords:16 }}

 {{ property.bedrooms }} {% if property.bedrooms > 1 %}Bedrooms{% else %}Bedroom{% endif %}

 {{ property.en_suites }} {% if property.en_suites > 1 %}Ensuites{% else %}Ensuite{% endif %}

 {{ property.receptions }} {% if property.receptions > 1 %}Reception Rooms {% else %}Reception Room{% endif %}

        More Details


text:
package org.suporma.remo;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

import org.suporma.remo.internal.common.CancellationAction;
import org.suporma.remo.internal.common.future.TransformedFuture;

public interface Future<T> extends Result<T>, java.util.concurrent.Future<T> {
    public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException;
    public Future<T> addCallback(Callback<T> callback);
    public Future<T> addCancellationAction(CancellationAction action);
    public boolean isDone();
    public boolean isError();
    public boolean isCancelled();

    public default boolean cancel() { return cancel(true); }

    /**
     * This returns a Future that, upon completion of this Future, transforms the result into a new
     * result as per the provided function.
     * @param transformFunction The function used to transform this Future's result into another.
     * @return A new Future that promises the transformed result.
     */
    default public <U> Future<U> transform(final ThrowingFunction<T, U> transformFunction) {
        return new TransformedFuture<>(this, transformFunction);
    }
}


text:
package org.diorite.material.items.tool.simple;

import java.util.Map;

import org.diorite.material.ItemMaterialData;
import org.diorite.utils.collections.maps.CaseInsensitiveMap;

import gnu.trove.map.TShortObjectMap;
import gnu.trove.map.hash.TShortObjectHashMap;

@SuppressWarnings("MagicNumber")
public class ClockMat extends ItemMaterialData
{
    /**
     * Sub-ids used by diorite/minecraft by default
     */
    public static final int USED_DATA_VALUES = 1;

    public static final ClockMat CLOCK = new ClockMat();

    private static final Map<String, ClockMat>     byName = new CaseInsensitiveMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR);
    private static final TShortObjectMap<ClockMat> byID   = new TShortObjectHashMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR, Short.MIN_VALUE);

    protected ClockMat()
    {
        super("CLOCK", 347, "minecraft:clock", "CLOCK", (short) 0x00);
    }

    protected ClockMat(final String enumName, final int id, final String minecraftId, final String typeName, final short type)
    {
        super(enumName, id, minecraftId, typeName, type);
    }

    protected ClockMat(final String enumName, final int id, final String minecraftId, final int maxStack, final String typeName, final short type)
    {
        super(enumName, id, minecraftId, maxStack, typeName, type);
    }

    @Override
    public ClockMat getType(final int type)
    {
        return getByID(type);
    }

    @Override
    public ClockMat getType(final String type)
    {
        return getByEnumName(type);
    }

    /**
     * Returns one of Clock sub-type based on sub-id, may return null
     *
     * @param id sub-type id
     *
     * @return sub-type of Clock or null
     */
    public static ClockMat getByID(final int id)
    {
        return byID.get((short) id);
    }

    /**
     * Returns one of Clock sub-type based on name (selected by diorite team), may return null
     * If block contains only one type, sub-name of it will be this same as name of material.
     *
     * @param name name of sub-type
     *
     * @return sub-type of Clock or null
     */
    public static ClockMat getByEnumName(final String name)
    {
        return byName.get(name);
    }

    /**
     * Register new sub-type, may replace existing sub-types.
     * Should be used only if you know what are you doing, it will not create fully usable material.
     *
     * @param element sub-type to register
     */
    public static void register(final ClockMat element)
    {
        byID.put(element.getType(), element);
        byName.put(element.getTypeName(), element);
    }

    @Override
    public ClockMat[] types()
    {
        return ClockMat.clockTypes();
    }

    /**
     * @return array that contains all sub-types of this block.
     */
    public static ClockMat[] clockTypes()
    {
        return byID.values(new ClockMat[byID.size()]);
    }

    static
    {
        ClockMat.register(CLOCK);
    }
}


text:
namespace Loki
{

////////////////////////////////////////////////////////////////////////////////
/// \class BaseVisitor
///
/// \ingroup VisitorGroup
/// The base class of any Acyclic Visitor
////////////////////////////////////////////////////////////////////////////////

class BaseVisitor
{
public:
	virtual ~BaseVisitor() {}
};

////////////////////////////////////////////////////////////////////////////////
/// \class Visitor
///
/// \ingroup VisitorGroup
/// The building block of Acyclic Visitor
///
/// \par Usage
///
/// Defining the visitable class:
///
/// \code
/// class RasterBitmap : public BaseVisitable<>
/// {
/// public:
///     LOKI_DEFINE_VISITABLE()
/// };
/// \endcode
///
/// Way 1 to define a visitor:
/// \code
/// class SomeVisitor :
///     public BaseVisitor // required
///     public Visitor<RasterBitmap>,
///     public Visitor<Paragraph>
/// {
/// public:
///     void Visit(RasterBitmap&); // visit a RasterBitmap
///     void Visit(Paragraph &);   // visit a Paragraph
/// };
/// \endcode
///
/// Way 2 to define the visitor:
/// \code
/// class SomeVisitor :
///     public BaseVisitor // required
///     public Visitor<LOKI_TYPELIST_2(RasterBitmap, Paragraph)>
/// {
/// public:
///     void Visit(RasterBitmap&); // visit a RasterBitmap
///     void Visit(Paragraph &);   // visit a Paragraph
/// };
/// \endcode
///
/// Way 3 to define the visitor:
/// \code
/// class SomeVisitor :
///     public BaseVisitor // required
///     public Visitor<Seq<RasterBitmap, Paragraph>::Type>
/// {
/// public:
///     void Visit(RasterBitmap&); // visit a RasterBitmap
///     void Visit(Paragraph &);   // visit a Paragraph
/// };
/// \endcode
///
/// \par Using const visit functions:
///
/// Defining the visitable class (true for const):
///
/// \code
/// class RasterBitmap : public BaseVisitable<void, DefaultCatchAll, true>
/// {
/// public:
///     LOKI_DEFINE_CONST_VISITABLE()
/// };
/// \endcode
///
/// Defining the visitor which only calls const member functions:
/// \code
/// class SomeVisitor :
///     public BaseVisitor // required
///     public Visitor<RasterBitmap, void, true>,
/// {
/// public:
///     void Visit(const RasterBitmap&); // visit a RasterBitmap by a const member function
/// };
/// \endcode
///
/// \par Example:
///
/// test/Visitor/main.cpp
////////////////////////////////////////////////////////////////////////////////

template <class T, typename R = void, bool ConstVisit = false>
class Visitor;

template <class T, typename R>
class Visitor<T, R, false>
{
public:
	typedef R ReturnType;
	typedef T ParamType;
	virtual ~Visitor() {}
	virtual ReturnType Visit(ParamType &) = 0;
};

template <class T, typename R>
class Visitor<T, R, true>
{
public:
	typedef R ReturnType;
	typedef const T ParamType;
	virtual ~Visitor() {}
	virtual ReturnType Visit(ParamType &) = 0;
};

////////////////////////////////////////////////////////////////////////////////
// class template Visitor (specialization)
// This specialization is not present in the book. It makes it easier to define
// Visitors for multiple types in a shot by using a typelist. Example:
//
// class SomeVisitor :
//     public BaseVisitor // required
//     public Visitor<LOKI_TYPELIST_2(RasterBitmap, Paragraph)>
// {
// public:
//     void Visit(RasterBitmap&); // visit a RasterBitmap
//     void Visit(Paragraph &);   // visit a Paragraph
// };
////////////////////////////////////////////////////////////////////////////////

template <class Head, class Tail, typename R>
class Visitor<Typelist<Head, Tail>, R, false>
	: public Visitor<Head, R, false>, public Visitor<Tail, R, false>
{
public:
	typedef R ReturnType;
	// using Visitor<Head, R>::Visit;
	// using Visitor<Tail, R>::Visit;
};

template <class Head, typename R>
class Visitor<Typelist<Head, NullType>, R, false> : public Visitor<Head, R, false>
{
public:
	typedef R ReturnType;
	using Visitor<Head, R, false>::Visit;
};

template <class Head, class Tail, typename R>
class Visitor<Typelist<Head, Tail>, R, true>
	: public Visitor<Head, R, true>, public Visitor<Tail, R, true>
{
public:
	typedef R ReturnType;
	// using Visitor<Head, R>::Visit;
	// using Visitor<Tail, R>::Visit;
};

template <class Head, typename R>
class Visitor<Typelist<Head, NullType>, R, true> : public Visitor<Head, R, true>
{
public:
	typedef R ReturnType;
	using Visitor<Head, R, true>::Visit;
};

////////////////////////////////////////////////////////////////////////////////
// class template BaseVisitorImpl
// Implements non-strict visitation (you can implement only part of the Visit
//     functions)
////////////////////////////////////////////////////////////////////////////////

template <class TList, typename R = void> class BaseVisitorImpl;

template <class Head, class Tail, typename R>
class BaseVisitorImpl<Typelist<Head, Tail>, R>
	: public Visitor<Head, R>
	, public BaseVisitorImpl<Tail, R>
{
public:
	// using BaseVisitorImpl<Tail, R>::Visit;

	virtual R Visit(Head &)
	{
		return R();
	}
};

template <class Head, typename R>
class BaseVisitorImpl<Typelist<Head, NullType>, R>
	: public Visitor<Head, R>
{
public:
	virtual R Visit(Head &)
	{
		return R();
	}
};

////////////////////////////////////////////////////////////////////////////////
// class template BaseVisitable
////////////////////////////////////////////////////////////////////////////////

template <typename R, typename Visited>
struct DefaultCatchAll
{
	static R OnUnknownVisitor(Visited &, BaseVisitor &)
	{
		return R();
	}
};

////////////////////////////////////////////////////////////////////////////////
// class template BaseVisitable
////////////////////////////////////////////////////////////////////////////////

template
<
typename R = void,
         template <typename, class> class CatchAll = DefaultCatchAll,
         bool ConstVisitable = false
         >
class BaseVisitable;

template<typename R,template <typename, class> class CatchAll>
class BaseVisitable<R, CatchAll, false>
{
public:
	typedef R ReturnType;
	virtual ~BaseVisitable() {}
	virtual ReturnType Accept(BaseVisitor &) = 0;

protected: // give access only to the hierarchy
	template <class T>
	static ReturnType AcceptImpl(T &visited, BaseVisitor &guest)
	{
		// Apply the Acyclic Visitor
		if (Visitor<T,R>* p = dynamic_cast<Visitor<T,R>*>(&guest))
		{
			return p->Visit(visited);
		}
		return CatchAll<R, T>::OnUnknownVisitor(visited, guest);
	}
};

template<typename R,template <typename, class> class CatchAll>
class BaseVisitable<R, CatchAll, true>
{
public:
	typedef R ReturnType;
	virtual ~BaseVisitable() {}
	virtual ReturnType Accept(BaseVisitor &) const = 0;

protected: // give access only to the hierarchy
	template <class T>
	static ReturnType AcceptImpl(const T &visited, BaseVisitor &guest)
	{
		// Apply the Acyclic Visitor
		if (Visitor<T,R,true>* p = dynamic_cast<Visitor<T,R,true>*>(&guest))
		{
			return p->Visit(visited);
		}
		return CatchAll<R, T>::OnUnknownVisitor(const_cast<T &>(visited), guest);
	}
};

////////////////////////////////////////////////////////////////////////////////
/// \def LOKI_DEFINE_VISITABLE()
/// \ingroup VisitorGroup
/// Put it in every class that you want to make visitable
/// (in addition to deriving it from BaseVisitable<R>)
////////////////////////////////////////////////////////////////////////////////

#define LOKI_DEFINE_VISITABLE() \
    virtual ReturnType Accept(::Loki::BaseVisitor& guest) \
    { return AcceptImpl(*this, guest); }

////////////////////////////////////////////////////////////////////////////////
/// \def LOKI_DEFINE_CONST_VISITABLE()
/// \ingroup VisitorGroup
/// Put it in every class that you want to make visitable by const member
/// functions (in addition to deriving it from BaseVisitable<R>)
////////////////////////////////////////////////////////////////////////////////

#define LOKI_DEFINE_CONST_VISITABLE() \
    virtual ReturnType Accept(::Loki::BaseVisitor& guest) const \
    { return AcceptImpl(*this, guest); }

////////////////////////////////////////////////////////////////////////////////
/// \class CyclicVisitor
///
/// \ingroup VisitorGroup
/// Put it in every class that you want to make visitable (in addition to
/// deriving it from BaseVisitable<R>
////////////////////////////////////////////////////////////////////////////////

template <typename R, class TList>
class CyclicVisitor : public Visitor<TList, R>
{
public:
	typedef R ReturnType;
	// using Visitor<TList, R>::Visit;

	template <class Visited>
	ReturnType GenericVisit(Visited &host)
	{
		Visitor<Visited, ReturnType>& subObj = *this;
		return subObj.Visit(host);
	}
};

////////////////////////////////////////////////////////////////////////////////
/// \def LOKI_DEFINE_CYCLIC_VISITABLE(SomeVisitor)
/// \ingroup VisitorGroup
/// Put it in every class that you want to make visitable by a cyclic visitor
////////////////////////////////////////////////////////////////////////////////

#define LOKI_DEFINE_CYCLIC_VISITABLE(SomeVisitor) \
    virtual SomeVisitor::ReturnType Accept(SomeVisitor& guest) \
    { return guest.GenericVisit(*this); }

} // namespace Loki

#endif // end file guardian


text:
package io.fluxcapacitor.javaclient.publishing;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface Timeout {
    int millis();
}


text:
<?php

namespace ELearning\MainBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class ELearningMainBundle extends Bundle
{
}


text:
import React from 'react';
// noinspection JSUnresolvedVariable
import styles from './username.css';

export default class UsernameField extends React.Component {
	constructor(props) {
		super(props);
		this.state = {
			'value': '',
			'showValidation': false,
			'valid': false
		};
	}

	componentWillMount() {
		this.timer = null;
	}

	handleChange = (e) => {
		clearTimeout(this.timer);
		const newState = {
			showValidation: false,
			value: e.target.value,
		};
		this.setState(newState);
		this.timer = setTimeout(this.triggerChange, 1000);
	};

	triggerChange = () => {
		const newState = {
			value: this.state.value
		};
		const url = '/api/contributors/' + this.state.value;

		jQuery.ajax({
			url: url,
			dataType: 'json',
			complete: data=> {
				if (data.status === 200) {
					newState.valid = true;
				} else if (data.status === 404) {
					newState.valid = false;
				}

				this.props.onChange(newState);

				newState.showValidation = true;
				this.setState(newState);
			}
		});
	};

	className() {
		const className = 'form-control-feedback glyphicon';

		if (this.state.showValidation === false) {
			return className;
		} else if (!this.state.valid) {
			// noinspection JSUnresolvedVariable
			return className + ' glyphicon-remove ' + styles.iconRed;
		} else if (this.state.valid) {
			// noinspection JSUnresolvedVariable
			return className + ' glyphicon-ok ' + styles.iconGreen;
		}
	}

	render() {
		return (

				{ this.props.label ? {this.props.label} : null }
				<input type='text' className='form-control' placeholder={this.props.placeholder} name={this.props.name}
					   onChange={this.handleChange}/>

		);
	}
}

UsernameField.propTypes = {
	onChange: React.PropTypes.func.isRequired,
	placeholder: React.PropTypes.string,
	name: React.PropTypes.string,
	label: React.PropTypes.string
};

UsernameField.defaultProps = {
	name: 'Username',
	placeholder: 'Username',
	label: 'WordPress.org Username'
};


text:
package br.unb.cic.tp1.exceptions

case class VariavelNaoDeclaradaException() extends Exception()


text:
require 'helper'

class TestTaskRepository < RepositoryTestCase
  include Indilatory

  def setup
    super
    @repo = MetaRepository.new(Dir.new(repo_path)).repository(Task)
  end

  def test_all_empty
    assert_equal(0, @repo.all.size)
  end

  def test_save_and_read_task
    read_ddd = Task.new('Read DDD book')
    @repo.save(read_ddd)
    assert_equal(1, @repo.count)

    read_back = @repo.first
    assert_equal(read_ddd, read_back)
    assert(read_ddd.eql?(read_back))
  end
end


text:
<?php

declare(strict_types=1);

namespace Codeception\Event;

use Codeception\Test\Test;
use Symfony\Contracts\EventDispatcher\Event;

class TestEvent extends Event
{
    /**
     * @param float|null $time Time taken
     */
    public function __construct(protected Test $test, protected ?float $time = 0)
    {
    }

    public function getTime(): float
    {
        return $this->time;
    }

    public function getTest(): Test
    {
        return $this->test;
    }
}


text:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

//

namespace Microsoft.Azure.Batch.Auth
{
    using System;

    /// <summary>
    /// Shared key credentials for an Azure Batch account.
    /// </summary>
    public class BatchSharedKeyCredentials : BatchCredentials
    {
        /// <summary>
        /// Gets the Batch account name.
        /// </summary>
        public string AccountName { get; private set; }

        /// <summary>
        /// Gets the Base64 encoded account access key.
        /// </summary>
        internal string KeyValue { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="BatchSharedKeyCredentials"/> class with the specified Batch service endpoint, account name, and access key.
        /// </summary>
        /// <param name="baseUrl">The Batch service endpoint.</param>
        /// <param name="accountName">The name of the Batch account.</param>
        /// <param name="keyValue">The Base64 encoded account access key.</param>
        public BatchSharedKeyCredentials(string baseUrl, string accountName, string keyValue)
        {
            if (string.IsNullOrEmpty(baseUrl))
            {
                throw new ArgumentNullException("baseUrl");
            }
            if (string.IsNullOrEmpty(accountName))
            {
                throw new ArgumentNullException("accountName");
            }
            if (string.IsNullOrEmpty(keyValue))
            {
                throw new ArgumentNullException("keyValue");
            }

            this.BaseUrl = baseUrl;
            this.AccountName = accountName;
            this.KeyValue = keyValue;
        }
    }
}


text:
<!DOCTYPE html>
<html>

  {% include head.html %}

  <body>

    {% include header.html %}

      <div class="fullwidth">
        {{ content }}
      </div>

    {% include footer.html %}

  </body>

</html>


text:
Widget for Trello is an android home screen widget.
Choose and display lists from your Trello boards on your home screen for a quick glance at your cards.

## Tools and Tech
* [Trello's API](http://trello.com/docs)
* [Volley](https://android.googlesource.com/platform/frameworks/volley.git) - http handling
* [Gson](http://sites.google.com/site/gson/) - json parsing
* [HSV-Alpha Color Picker for Android](https://github.com/martin-stone/hsv-alpha-color-picker-android) - color picker dialog
* [Calendar Widget](http://github.com/plusonelabs/calendar-widget) - inspiration

## How to Build
Building should be smooth using android studio and gradle.

## Contributing
Please open an issue before attempting to contribute any code. That way we can discuss what it is that's going to be implemented and make sure it aligns with the rest of the app.


text:
set -uxe

export CONFIG="/tmp/config.sh"
while [ ! -f "$CONFIG" ]; do
    echo "No config, sleeping for 1 second"
    sleep 1
done

echo "Found config file"
source "$CONFIG"
# require:
# $JENKINS_URL
# $COMPUTER_URL
# $COMPUTER_SECRET

if [ -z "$JENKINS_URL" ]; then
 echo "JENKINS_URL is not defined! Exiting."
 exit 1
fi

if [ -z "$COMPUTER_URL" ]; then
 echo "COMPUTER_URL is not defined! Exiting."
 exit 1
fi

[ -z "$JENKINS_HOME" ] && cd "$JENKINS_HOME"

# download slave jar
# TODO some caching mechanism with checksums
wget "${JENKINS_URL}/jnlpJars/slave.jar" -O "${JENKINS_HOME}/slave.jar"

env

RUN_OPTS="-jnlpUrl ${JENKINS_URL}/${COMPUTER_URL}/slave-agent.jnlp "
if [ ! -z "$COMPUTER_SECRET" ]; then
 RUN_OPTS+=" -secret $COMPUTER_SECRET "
fi

RUN_CMD=""
if [ ! -z "$JENKINS_USER" ] && [ x"$JENKINS_USER" != "xroot" ]; then
 RUN_CMD="su - $JENKINS_USER -c"
fi

$RUN_CMD "java -jar slave.jar $RUN_OPTS"


text:
<!DOCTYPE html>

		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>Bootstrap Basic Document</title>
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width">

		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link rel="stylesheet" href="css/bootstrap-theme.min.css">
		<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">

		<link rel="stylesheet" href="css/main.css">

		Skip to content

								<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
									Menu

								</button>

Bootstrap Basic

Home

Getting started

Installation

Add widget to navbar

Change custom background

Start design

Configuration, setting, and naming

Change the language

More resources for theme developer

Change log

Bootstrap Basic

									The WordPress basic theme build on Bootstrap 3 for theme developer.

About

										Created:  <time datetime="2013-10-05">6 November 2013</time>

										By:  Vee Winch

										http://okvee.net

										Bootstrap Basic is the basic, flat, simple theme for theme developers to start build their own theme using Bootstrap 3.

										With Bootstrap Basic, theme developers can getting start to build the WordPress theme very fast.

										Bootstrap Basic come with full set of page template, 3 columns, 6 widget areas, multi post formats, multi lingual.

Some screenshots

Home page

Basic white color; 3 columns; 6 widget areas (header top right, navigation bar right, sidebar left, sidebar right, footer left, footer right).

Demo with Bootstrap components

Demo post with Bootstrap components. (labels, badges, page header, ...)

Post formats

This basic theme comes with 5 post formats (aside, image, video, quote, link) and you can add more.

Please note that social network icons as seen in screen shot will not available with the theme package.

Features

 Responsive design

 Easy reading & light html elements

 Search form widget for Bootstrap navbar

 5 Post formats (aside, image, video, quote, link)

 Automatic calculate main column size from actived sidebars.

 Multilingual ready

 Support automatic feed

 Support post thumbnail (feature image)

 Support custom background.

 All PHP functions documented. Easy to modify and call.

 Replaced WordPress elements with Bootstrap supported elements and classes

 Next, previous replaced by pagination

 Added table class to calendar widget

 Changed WordPress navigation to use Bootstrap navbar


text:
from google.cloud import aiplatform_v1beta1

async def sample_delete_hyperparameter_tuning_job():
    # Create a client
    client = aiplatform_v1beta1.JobServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1beta1.DeleteHyperparameterTuningJobRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_hyperparameter_tuning_job(request=request)

    print("Waiting for operation to complete...")

    response = await operation.result()

    # Handle the response
    print(response)

# [END aiplatform_v1beta1_generated_JobService_DeleteHyperparameterTuningJob_async]


text:
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsTreeStyleCache.h"
#include "nsISupportsArray.h"
#include "nsStyleSet.h"
#include "mozilla/dom/Element.h"

// The style context cache impl
nsStyleContext*
nsTreeStyleCache::GetStyleContext(nsICSSPseudoComparator* aComparator,
                                  nsPresContext* aPresContext,
                                  nsIContent* aContent,
                                  nsStyleContext* aContext,
                                  nsIAtom* aPseudoElement,
                                  nsISupportsArray* aInputWord)
{
  uint32_t count;
  aInputWord->Count(&count);
  nsDFAState startState(0);
  nsDFAState* currState = &startState;

  // Go ahead and init the transition table.
  if (!mTransitionTable) {
    // Automatic miss. Build the table
    mTransitionTable =
      new nsObjectHashtable(nullptr, nullptr, DeleteDFAState, nullptr);
  }

  // The first transition is always made off the supplied pseudo-element.
  nsTransitionKey key(currState->GetStateID(), aPseudoElement);
  currState = static_cast<nsDFAState*>(mTransitionTable->Get(&key));

  if (!currState) {
    // We had a miss. Make a new state and add it to our hash.
    currState = new nsDFAState(mNextState);
    mNextState++;
    mTransitionTable->Put(&key, currState);
  }

  for (uint32_t i = 0; i < count; i++) {
    nsCOMPtr<nsIAtom> pseudo = getter_AddRefs(static_cast<nsIAtom*>(aInputWord->ElementAt(i)));
    nsTransitionKey key(currState->GetStateID(), pseudo);
    currState = static_cast<nsDFAState*>(mTransitionTable->Get(&key));

    if (!currState) {
      // We had a miss. Make a new state and add it to our hash.
      currState = new nsDFAState(mNextState);
      mNextState++;
      mTransitionTable->Put(&key, currState);
    }
  }

  // We're in a final state.
  // Look up our style context for this state.
  nsStyleContext* result = nullptr;
  if (mCache)
    result = static_cast<nsStyleContext*>(mCache->Get(currState));
  if (!result) {
    // We missed the cache. Resolve this pseudo-style.
    result = aPresContext->StyleSet()->
      ResolveXULTreePseudoStyle(aContent->AsElement(), aPseudoElement,
                                aContext, aComparator).get();

    // Put the style context in our table, transferring the owning reference to the table.
    if (!mCache) {
      mCache = new nsObjectHashtable(nullptr, nullptr, ReleaseStyleContext, nullptr);
    }
    mCache->Put(currState, result);
  }

  return result;
}

bool
nsTreeStyleCache::DeleteDFAState(nsHashKey *aKey,
                                 void *aData,
                                 void *closure)
{
  nsDFAState* entry = static_cast<nsDFAState*>(aData);
  delete entry;
  return true;
}

bool
nsTreeStyleCache::ReleaseStyleContext(nsHashKey *aKey,
                                      void *aData,
                                      void *closure)
{
  nsStyleContext* context = static_cast<nsStyleContext*>(aData);
  context->Release();
  return true;
}


text:
<?php

namespace InloopBundle\Service;

use AppBundle\Filter\FilterInterface;
use InloopBundle\Entity\Schorsing;
use Knp\Component\Pager\Pagination\PaginationInterface;

interface SchorsingDaoInterface
{
    /**
     * @param int             $page
     * @param FilterInterface $filter
     *
     * @return PaginationInterface
     */
    public function findAll($page = null, FilterInterface $filter = null);

    /**
     * @param int $id
     *
     * @return Schorsing
     */
    public function find($id);

    /**
     * @param Schorsing
     *
     * @return Schorsing
     */
    public function create(Schorsing $entity);

    /**
     * @param Schorsing
     *
     * @return Schorsing
     */
    public function update(Schorsing $entity);

    /**
     * @param Schorsing
     *
     * @return Schorsing
     */
    public function delete(Schorsing $entity);
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Erioderma wrightii var. wrightii Tuck.

### Remarks
null


text:
layout: kanji
v4: 563
v6: 605
kanji: 雌
keyword: female
elements: feminine, Prince, this here, stop, footprint, spoon, sitting on the ground, turkey
strokes: 14
image: E99B8C
on-yomi: シ
kun-yomi: め-、めす、めん
permalink: /rtk/雌/
prev: 雑
next: 準
---

1) [ruisu] 14-11-2007(461): Stop | spooning | turkeys. Spoon females.

2) [samuize] 25-2-2007(124): To become feminine you must stop using a spoon to eat turkey and use a knife and fork like a proper lady.

3) [Katsuo] 14-2-2008(50): Tip: stop/footprint + spoon : This combination of primitives appears seven times in Heisig, including as a separate character, which he names this here (#2043 此). REF: feminine/female (FRAME 563), purple (#1375 紫), brushwood (#2044 柴), fort (#2045 砦), whit (#2046 些), beard (#2047 髭).

4) [fuaburisu] 11-10-2005(43): Oh I love this one, it's so silly but fun to picture. Imagine a turkey walking in the snow (in the North pole for example) wearing spoons for snowshoes. Turkeys have small feet so they can use spoons as snowshoes, right ? Now you're looking down at the footprints left by the spoon-wearing turkey who is walking off in the distance, and you think to yourself that those footprints look feminine : curvy and slender.

5) [Kurisu] 13-3-2008(21): Mother to daughter - 'You are not a 雌 (めす) female animal! Now stop sitting on the ground with those turkeys; its not feminine!'-----------Building from Katsuo's tip about how (stop spoon) is used often and later becomes (FRAME 2043)=This here; used for the words ここ、これ&この maybe we should imagine the daughter`s name is ここ=此 .


text:
package uk.gov.hmrc.ct.accounts

import uk.gov.hmrc.ct.box.{CtBoxIdentifier, CtOptionalInteger, Input, MustBeNoneOrZeroOrPositive}

case class AC35(value: Option[Int]) extends CtBoxIdentifier(name = "Previous Tax on profit or loss")
                                    with CtOptionalInteger with MustBeNoneOrZeroOrPositive with Input


text:
import mq_library
from pymongo import MongoClient

def is_hate_speech(sentence):
    hate_words = set(['race','racism','discrimination','vandalism',
        'hate','slur','abuse','genocide','thug','thuggery','bigotry',
        'violence','sex','sexual', 'assault', 'bullying', 'shooting',
        'threat', 'threatening', 'kill', 'terror', 'terrorism', 'crime',
        'criminal', 'bashing', 'shaming', 'slut', 'abusive', 'nigga',
        'fuck', 'frick', 'nigger'
    ])
    for word in sentence:
        if word in hate_words:
            return True
    return False

def callback(ch, method, properties, body):
    # print("[x] %r" % body)

    client = MongoClient('mongodb://audip:audip@ds151917.mlab.com:51917/speech-db')

    body_split = body.split("::")
    text = body_split[0]

    tweet = mq_library.preprocess_text(text)

    # Save to mongodb
    db = client['speech-db']
    hate_speech = db['speech-feed']

    senti, score = mq_library.get_sentiment_textblob(tweet)
    tweet_str = ' '.join(s for s in tweet)

    tweet_post = {'text':tweet_str,'id':body_split[1],
    'retweet': int(body_split[2]),'created_at':body_split[3],
    'sentiment': senti, 'score': score}

    if not is_hate_speech(tweet):
        tweet_post["hate"]='false'
    else:
        tweet_post["hate"]='true'

    speech = db.hate_speech
    speech.insert_one(tweet_post)

    ch.basic_ack(delivery_tag = method.delivery_tag)

def main():

    channel = mq_library.setup_messaging_queue()
    print('[*] Waiting for logs. To exit press CTRL+C')
    channel.basic_consume(callback, queue='twitter_mq')

    channel.start_consuming()

if __name__ == '__main__':
    main()


text:
import datetime
import decimal

import pecan
from pecan import rest
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan

from ceilometerclient import client as cclient
from oslo.config import cfg

from cloudkitty.api.v1.datamodels import report as report_models
from cloudkitty.common import policy

from cloudkitty.transformer import ceilometer

class ReportController(rest.RestController):
    """REST Controller managing the reporting.

    """

    _custom_actions = {
        'total': ['GET'],
        'tenants': ['GET'],
        'list_service_rate': ['GET'],
        'list_resource_rate': ['GET'],
        'show_resource_rate': ['GET'],
        'count_resource_rate': ['GET']
   }

    def __init__(self):
        CONF = cfg.CONF
        CONF.import_group('ceilometer_collector','cloudkitty.collector.ceilometer')

        self.user = cfg.CONF.ceilometer_collector.username
        self.password = cfg.CONF.ceilometer_collector.password
        self.tenant = cfg.CONF.ceilometer_collector.tenant
        self.region = cfg.CONF.ceilometer_collector.region
        self.keystone_url = cfg.CONF.ceilometer_collector.url

        self._conn = cclient.get_client('2',
                                        os_username=self.user,
                                        os_password=self.password,
                                        os_auth_url=self.keystone_url,
                                        os_tenant_name=self.tenant,
                                        os_region_name=self.region)

        self.t_ceilometer = ceilometer.CeilometerTransformer()

    @wsme_pecan.wsexpose([wtypes.text],
                         datetime.datetime,
                         datetime.datetime)
    def tenants(self, begin=None, end=None):
        """Return the list of rated tenants.

        """
        policy.enforce(pecan.request.context, 'report:list_tenants', {})
        storage = pecan.request.storage_backend
        tenants = storage.get_tenants(begin, end)
        return tenants

    @wsme_pecan.wsexpose(decimal.Decimal,
                         datetime.datetime,
                         datetime.datetime,
                         wtypes.text)
    def total(self, begin=None, end=None, tenant_id=None):
        """Return the amount to pay for a given period.

        """
        policy.enforce(pecan.request.context, 'report:get_total', {})
        storage = pecan.request.storage_backend
        # FIXME(sheeprine): We should filter on user id.
        # Use keystone token information by default but make it overridable and
        # enforce it by policy engine
        total = storage.get_total(begin, end, tenant_id)
        return total

    @wsme_pecan.wsexpose(report_models.CloudkittyServiceRateCollection,
                         datetime.datetime,
                         datetime.datetime,
                         wtypes.text)
    def list_service_rate(self, begin=None, end=None, tenant_id=None):
        """Return the amount to pay for a given period, group by service.

        """
        policy.enforce(pecan.request.context, 'report:list_service_rate', {})
        storage = pecan.request.storage_backend
        services_rate = storage.list_service_rate(begin, end, tenant_id)
        services_rate_list = [report_models.CloudkittyServiceRate(**service_rate) for service_rate in services_rate]

        #return report_models.CloudkittyServiceRateCollection.sample()
        return report_models.CloudkittyServiceRateCollection(servicesRate=services_rate_list)

    @wsme_pecan.wsexpose(report_models.CloudkittyResourceRateCollection,
                         datetime.datetime,
                         datetime.datetime,
                         wtypes.text,
                         wtypes.text)
    def list_resource_rate(self, begin=None, end=None, tenant_id=None, service=None):
        """Return the amount to pay for each resource within a special service type.

        """
        policy.enforce(pecan.request.context, 'report:show_service_rate', {})
        storage = pecan.request.storage_backend
        resources_rate = storage.list_resource_rate(begin, end, tenant_id, service)
        resources_rate_list = []
        for resource_rate in resources_rate:
            raw_resource = self._conn.resources.get(resource_rate['resource_id'])
            resource_info= self.t_ceilometer.strip_resource_data(resource_rate['res_type'], raw_resource)
            resource_rate['resource_name'] = resource_info['name']
            #print resource_rate['resource_name']
            resource_rate['status'] = resource_info['status']
            if resource_info['created_time']:
                resource_rate['created_time'] = self._str2dt(resource_info['created_time'])
            if resource_rate['res_type'] == 'network.bw.total':
                raw_resource = self._conn.resources.get(resource_info['attached_instance_id'])
                attached_instance_info= self.t_ceilometer.strip_resource_data('compute', raw_resource)
                resource_rate['resource_name'] = '%s(%s)'%(resource_rate['resource_name'],attached_instance_info['name'])
                resource_rate['status'] = attached_instance_info['status']
                resource_rate['created_time'] = self._str2dt(attached_instance_info['created_time'])

            resources_rate_list.append(report_models.CloudkittyResourceRate(**resource_rate))

        #return report_models.CloudkittyResourceRateCollection.sample()
        return report_models.CloudkittyResourceRateCollection(resourcesRate=resources_rate_list)

    def _str2dt(self, str_time):
        if 'T' in str_time:
            str_time = datetime.datetime.strptime(str_time[0:19],'%Y-%m-%dT%H:%M:%S')
        else:
            str_time = datetime.datetime.strptime(str_time[0:19],'%Y-%m-%d %H:%M:%S')
        return str_time

    @wsme_pecan.wsexpose(report_models.CloudkittyResourceUsageRateList,
                         datetime.datetime,
                         datetime.datetime,
                         wtypes.text,
                         wtypes.text,
                         int,
                         int)
    def show_resource_rate(self, begin=None, end=None, tenant_id=None, resource_id=None, offset=None, limit=None):
        """Return the amount to pay for each resource within a special service type.

        """
        policy.enforce(pecan.request.context, 'report:show_resource_rate', {})

        storage = pecan.request.storage_backend
        resources_usage_rate = storage.show_resource_rate(begin, end, tenant_id, resource_id, offset, limit)
        resources_usage_rate_list = [report_models.CloudkittyResourceUsageRate(**resource_usage_rate) for resource_usage_rate in resources_usage_rate]

        return report_models.CloudkittyResourceUsageRateList(resourcesUsageRate=resources_usage_rate_list)

    @wsme_pecan.wsexpose(int,
                         datetime.datetime,
                         datetime.datetime,
                         wtypes.text,
                         wtypes.text,
                         )
    def count_resource_rate(self, begin=None, end=None, tenant_id=None, resource_id=None):
        """Return the total number of the resource rate records, used together with show_resource_rate.

        """
        policy.enforce(pecan.request.context, 'report:count_resource_rate', {})

        storage = pecan.request.storage_backend
        resources_usage_rate_count = storage.count_resource_rate(begin, end, tenant_id, resource_id)

        return resources_usage_rate_count


text:
<!DOCTYPE html>

<meta charset="iso-8859-1">

<link href="css" rel="stylesheet">

Sortable

Item 1

Item 2

Item 3

Item 4

Item 5

Item 6

Item 7


text:
package app.bus;

import android.app.Activity;
import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TabHost;

public class MainActivity extends ActivityGroup {

    public static String current, destination, startInt, endInt, note;
    public static String[] routeNum, routeCom, startTime, endTime;

    public static TabHost tabHost;
    public static Maps context;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        current = "Current Address";
        destination = "Destination";

        routeCom = new String[] {"DRT", "YRT", "TTC", "GO"};
        routeNum = new String[] {"401", "402", "403", "404", "405", "406", "407", "408", "409"};

        tabHost = (TabHost) findViewById(android.R.id.tabhost);
        tabHost.setup(this.getLocalActivityManager());

        TabHost.TabSpec fave = tabHost.newTabSpec("Favourites");
        TabHost.TabSpec maps = tabHost.newTabSpec("Maps");
        TabHost.TabSpec sche = tabHost.newTabSpec("Schedule");

        fave.setIndicator("Favorite");
        maps.setIndicator("Map");
        sche.setIndicator("Schedule");

        fave.setContent(new Intent(this, Favourites.class));
        maps.setContent(new Intent(this, Maps.class));
        sche.setContent(new Intent(this, Schedule.class));

        tabHost.addTab(fave);
        tabHost.addTab(maps);
        tabHost.addTab(sche);
    }

    public static void switchTab(int tab) {
        tabHost.setCurrentTab(tab);
    }

}


text:
<ion-view title="Persons">
  	<ion-content class="has-header">
    	<ion-list>

			<input type="text" placeholder="Search" ng-model="model.personToSearch">

			<ion-item class="item-icon-right" ng-repeat="entity in model.persons" href="#/app/person/{{entity.id}}">

{{entity.fullName}}

{{entity.fullAddress}}

			</ion-item>
		</ion-list>
	</ion-content>
</ion-view>


text:
class Scaffolds::NavsController < ApplicationController
  active_scaffold :nav do |conf|
  end
end