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

<title>P-Index</title>
<meta name="date" content="2015-06-02">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

P

P - Static variable in class org.opencv.ml.CvSVM

P3P - Static variable in class org.opencv.calib3d.Calib3d

paddingEnd - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp".

paddingStart - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp".

pager_header - Static variable in class br.com.indirim.quickphoto.R.id

panelBackground - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

panelMenuListTheme - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

panelMenuListWidth - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp".

paramHelp(String) - Method in class org.opencv.core.Algorithm

paramType(String) - Method in class org.opencv.core.Algorithm

parentPanel - Static variable in class br.com.indirim.quickphoto.R.id

patchNaNs(Mat, double) - Static method in class org.opencv.core.Core

patchNaNs(Mat) - Static method in class org.opencv.core.Core

paulo - Static variable in class br.com.indirim.quickphoto.R.drawable

PCABackProject(Mat, Mat, Mat, Mat) - Static method in class org.opencv.core.Core

PCACompute(Mat, Mat, Mat, int) - Static method in class org.opencv.core.Core

PCACompute(Mat, Mat, Mat) - Static method in class org.opencv.core.Core

PCAComputeVar(Mat, Mat, Mat, double) - Static method in class org.opencv.core.Core

PCAProject(Mat, Mat, Mat, Mat) - Static method in class org.opencv.core.Core

PENALIZATION_CHARBONNIER - Static variable in class org.opencv.contrib.StereoVar

PENALIZATION_PERONA_MALIK - Static variable in class org.opencv.contrib.StereoVar

PENALIZATION_TICHONOV - Static variable in class org.opencv.contrib.StereoVar

perspectiveTransform(Mat, Mat, Mat) - Static method in class org.opencv.core.Core

Performs the perspective matrix transformation of vectors.

phase(Mat, Mat, Mat, boolean) - Static method in class org.opencv.core.Core

Calculates the rotation angle of 2D vectors.

phase(Mat, Mat, Mat) - Static method in class org.opencv.core.Core

Calculates the rotation angle of 2D vectors.

phaseCorrelate(Mat, Mat, Mat) - Static method in class org.opencv.imgproc.Imgproc

The function is used to detect translational shifts that occur between two
 images.

phaseCorrelate(Mat, Mat) - Static method in class org.opencv.imgproc.Imgproc

The function is used to detect translational shifts that occur between two
 images.

phaseCorrelateRes(Mat, Mat, Mat, double[]) - Static method in class org.opencv.imgproc.Imgproc

phaseCorrelateRes(Mat, Mat, Mat) - Static method in class org.opencv.imgproc.Imgproc

Photo - Class in org.opencv.photo

Photo() - Constructor for class org.opencv.photo.Photo

photoButton - Static variable in class br.com.indirim.quickphoto.R.id

Platform_AppCompat - Static variable in class br.com.indirim.quickphoto.R.style

Platform_AppCompat_Light - Static variable in class br.com.indirim.quickphoto.R.style

Platform_ThemeOverlay_AppCompat_Dark - Static variable in class br.com.indirim.quickphoto.R.style

Platform_ThemeOverlay_AppCompat_Light - Static variable in class br.com.indirim.quickphoto.R.style

Platform_V11_AppCompat - Static variable in class br.com.indirim.quickphoto.R.style

Platform_V11_AppCompat_Light - Static variable in class br.com.indirim.quickphoto.R.style

Platform_V12_AppCompat - Static variable in class br.com.indirim.quickphoto.R.style

Platform_V12_AppCompat_Light - Static variable in class br.com.indirim.quickphoto.R.style

Platform_V14_AppCompat - Static variable in class br.com.indirim.quickphoto.R.style

Platform_V14_AppCompat_Light - Static variable in class br.com.indirim.quickphoto.R.style

Point - Class in org.opencv.core

template<typename _Tp> class CV_EXPORTS Point_

 // C++ code:

 public:

 typedef _Tp value_type;

 // various constructors

 Point_();

 Point_(_Tp _x, _Tp _y);

 Point_(const Point_& pt);

 Point_(const CvPoint& pt);

 Point_(const CvPoint2D32f& pt);

 Point_(const Size_<_Tp>& sz);

 Point_(const Vec<_Tp, 2>& v);

 Point_& operator = (const Point_& pt);

 //!

Point(double, double) - Constructor for class org.opencv.core.Point

Point() - Constructor for class org.opencv.core.Point

Point(double[]) - Constructor for class org.opencv.core.Point

Point3 - Class in org.opencv.core

template<typename _Tp> class CV_EXPORTS Point3_

 // C++ code:

 public:

 typedef _Tp value_type;

 // various constructors

 Point3_();

 Point3_(_Tp _x, _Tp _y, _Tp _z);

 Point3_(const Point3_& pt);

 explicit Point3_(const Point_<_Tp>& pt);

 Point3_(const CvPoint3D32f& pt);

 Point3_(const Vec<_Tp, 3>& v);

 Point3_& operator = (const Point3_& pt);

 //!

Point3(double, double, double) - Constructor for class org.opencv.core.Point3

Point3() - Constructor for class org.opencv.core.Point3

Point3(Point) - Constructor for class org.opencv.core.Point3

Point3(double[]) - Constructor for class org.opencv.core.Point3

pointPolygonTest(MatOfPoint2f, Point, boolean) - Static method in class org.opencv.imgproc.Imgproc

Performs a point-in-contour test.

points(Point[]) - Method in class org.opencv.core.RotatedRect

polarToCart(Mat, Mat, Mat, Mat, boolean) - Static method in class org.opencv.core.Core

Calculates x and y coordinates of 2D vectors from their magnitude and angle.

polarToCart(Mat, Mat, Mat, Mat) - Static method in class org.opencv.core.Core

Calculates x and y coordinates of 2D vectors from their magnitude and angle.

POLY - Static variable in class org.opencv.ml.CvSVM

polylines(Mat, List<MatOfPoint>, boolean, Scalar, int, int, int) - Static method in class org.opencv.core.Core

Draws several polygonal curves.

polylines(Mat, List<MatOfPoint>, boolean, Scalar, int) - Static method in class org.opencv.core.Core

Draws several polygonal curves.

polylines(Mat, List<MatOfPoint>, boolean, Scalar) - Static method in class org.opencv.core.Core

Draws several polygonal curves.

popupMenuStyle - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

popupPromptView - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

popupTheme - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

PopupWindow - Static variable in class br.com.indirim.quickphoto.R.styleable

Attributes that can be used with a PopupWindow.

PopupWindow_android_popupBackground - Static variable in class br.com.indirim.quickphoto.R.styleable

This symbol is the offset where the android.R.attr#popupBackground
          attribute's value can be found in the R.styleable.PopupWindow array.

PopupWindow_overlapAnchor - Static variable in class br.com.indirim.quickphoto.R.styleable

This symbol is the offset where the R.attr.overlapAnchor
          attribute's value can be found in the R.styleable.PopupWindow array.

PopupWindowBackgroundState - Static variable in class br.com.indirim.quickphoto.R.styleable

Attributes that can be used with a PopupWindowBackgroundState.

PopupWindowBackgroundState_state_above_anchor - Static variable in class br.com.indirim.quickphoto.R.styleable

This symbol is the offset where the R.attr.state_above_anchor
          attribute's value can be found in the R.styleable.PopupWindowBackgroundState array.

popupWindowStyle - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

pow(Mat, double, Mat) - Static method in class org.opencv.core.Core

Raises every array element to a power.

preCornerDetect(Mat, Mat, int, int) - Static method in class org.opencv.imgproc.Imgproc

Calculates a feature map for corner detection.

preCornerDetect(Mat, Mat, int) - Static method in class org.opencv.imgproc.Imgproc

Calculates a feature map for corner detection.

predict(Mat, int[], double[]) - Method in class org.opencv.contrib.FaceRecognizer

Predicts a label and associated confidence (e.g. distance) for a given input
 image.

predict(Mat, Mat) - Method in class org.opencv.ml.CvANN_MLP

Predicts responses for input samples.

predict(Mat, Mat, Range, boolean, boolean) - Method in class org.opencv.ml.CvBoost

Predicts a response for an input sample.

predict(Mat) - Method in class org.opencv.ml.CvBoost

Predicts a response for an input sample.

predict(Mat, Mat, Range, int) - Method in class org.opencv.ml.CvGBTrees

Predicts a response for an input sample.

predict(Mat) - Method in class org.opencv.ml.CvGBTrees

Predicts a response for an input sample.

predict(Mat, Mat) - Method in class org.opencv.ml.CvNormalBayesClassifier

Predicts the response for sample(s).

predict(Mat) - Method in class org.opencv.ml.CvNormalBayesClassifier

Predicts the response for sample(s).

predict(Mat, Mat) - Method in class org.opencv.ml.CvRTrees

Predicts the output for an input sample.

predict(Mat) - Method in class org.opencv.ml.CvRTrees

Predicts the output for an input sample.

predict(Mat, boolean) - Method in class org.opencv.ml.CvSVM

Predicts the response for input sample(s).

predict(Mat) - Method in class org.opencv.ml.CvSVM

Predicts the response for input sample(s).

predict(Mat, Mat) - Method in class org.opencv.ml.EM

Returns a likelihood logarithm value and an index of the most probable
 mixture component for the given sample.

predict(Mat) - Method in class org.opencv.ml.EM

Returns a likelihood logarithm value and an index of the most probable
 mixture component for the given sample.

predict(Mat) - Method in class org.opencv.video.KalmanFilter

Computes a predicted state.

predict() - Method in class org.opencv.video.KalmanFilter

Computes a predicted state.

predict_all(Mat, Mat) - Method in class org.opencv.ml.CvSVM

Predicts the response for input sample(s).

predict_prob(Mat, Mat) - Method in class org.opencv.ml.CvRTrees

Returns a fuzzy-predicted class label.

predict_prob(Mat) - Method in class org.opencv.ml.CvRTrees

Returns a fuzzy-predicted class label.

pref_general - Static variable in class br.com.indirim.quickphoto.R.xml

PREFILTER_NORMALIZED_RESPONSE - Static variable in class org.opencv.calib3d.StereoBM

PREFILTER_XSOBEL - Static variable in class org.opencv.calib3d.StereoBM

preserveIconSpacing - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a boolean value, either "true" or "false".

PREV_AROUND_DST - Static variable in class org.opencv.imgproc.Subdiv2D

PREV_AROUND_LEFT - Static variable in class org.opencv.imgproc.Subdiv2D

PREV_AROUND_ORG - Static variable in class org.opencv.imgproc.Subdiv2D

PREV_AROUND_RIGHT - Static variable in class org.opencv.imgproc.Subdiv2D

previewImage - Static variable in class br.com.indirim.quickphoto.R.id

PreviewPhotoFragment - Class in br.com.indirim.quickphoto

A simple Fragment subclass.

PreviewPhotoFragment() - Constructor for class br.com.indirim.quickphoto.PreviewPhotoFragment

primary_dark_material_dark - Static variable in class br.com.indirim.quickphoto.R.color

primary_dark_material_light - Static variable in class br.com.indirim.quickphoto.R.color

primary_material_dark - Static variable in class br.com.indirim.quickphoto.R.color

primary_material_light - Static variable in class br.com.indirim.quickphoto.R.color

primary_text_default_material_dark - Static variable in class br.com.indirim.quickphoto.R.color

primary_text_default_material_light - Static variable in class br.com.indirim.quickphoto.R.color

primary_text_disabled_material_dark - Static variable in class br.com.indirim.quickphoto.R.color

primary_text_disabled_material_light - Static variable in class br.com.indirim.quickphoto.R.color

printCudaDeviceInfo(int) - Static method in class org.opencv.gpu.Gpu

printShortCudaDeviceInfo(int) - Static method in class org.opencv.gpu.Gpu

progress_circular - Static variable in class br.com.indirim.quickphoto.R.id

progress_horizontal - Static variable in class br.com.indirim.quickphoto.R.id

progressBarPadding - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp".

progressBarStyle - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

PROJ_SPHERICAL_EQRECT - Static variable in class org.opencv.imgproc.Imgproc

PROJ_SPHERICAL_ORTHO - Static variable in class org.opencv.imgproc.Imgproc

projectPoints(MatOfPoint3f, Mat, Mat, Mat, MatOfDouble, MatOfPoint2f, Mat, double) - Static method in class org.opencv.calib3d.Calib3d

Projects 3D points to an image plane.

projectPoints(MatOfPoint3f, Mat, Mat, Mat, MatOfDouble, MatOfPoint2f) - Static method in class org.opencv.calib3d.Calib3d

Projects 3D points to an image plane.

prompt - Static variable in class br.com.indirim.quickphoto.R.attr

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?

prune(Range) - Method in class org.opencv.ml.CvBoost

Removes the specified weak classifiers.

PSNR(Mat, Mat) - Static method in class org.opencv.imgproc.Imgproc

pt - Variable in class org.opencv.features2d.KeyPoint

Coordinates of the keypoint.

PTLOC_ERROR - Static variable in class org.opencv.imgproc.Subdiv2D

PTLOC_INSIDE - Static variable in class org.opencv.imgproc.Subdiv2D

PTLOC_ON_EDGE - Static variable in class org.opencv.imgproc.Subdiv2D

PTLOC_OUTSIDE_RECT - Static variable in class org.opencv.imgproc.Subdiv2D

PTLOC_VERTEX - Static variable in class org.opencv.imgproc.Subdiv2D

push_back(Mat) - Method in class org.opencv.core.Mat

Adds elements to the bottom of the matrix.

put(int, int, double...) - Method in class org.opencv.core.Mat

put(int, int, float[]) - Method in class org.opencv.core.Mat

put(int, int, int[]) - Method in class org.opencv.core.Mat

put(int, int, short[]) - Method in class org.opencv.core.Mat

put(int, int, byte[]) - Method in class org.opencv.core.Mat

putText(Mat, String, Point, int, double, Scalar, int, int, boolean) - Static method in class org.opencv.core.Core

Draws a text string.

putText(Mat, String, Point, int, double, Scalar, int) - Static method in class org.opencv.core.Core

Draws a text string.

putText(Mat, String, Point, int, double, Scalar) - Static method in class org.opencv.core.Core

Draws a text string.

PYRAMID_BRISK - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_DENSE - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_FAST - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_GFTT - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_HARRIS - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_MSER - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_ORB - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_SIFT - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_SIMPLEBLOB - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_STAR - Static variable in class org.opencv.features2d.FeatureDetector

PYRAMID_SURF - Static variable in class org.opencv.features2d.FeatureDetector

pyrDown(Mat, Mat, Size, int) - Static method in class org.opencv.imgproc.Imgproc

Blurs an image and downsamples it.

pyrDown(Mat, Mat, Size) - Static method in class org.opencv.imgproc.Imgproc

Blurs an image and downsamples it.

pyrDown(Mat, Mat) - Static method in class org.opencv.imgproc.Imgproc

Blurs an image and downsamples it.

pyrMeanShiftFiltering(Mat, Mat, double, double, int, TermCriteria) - Static method in class org.opencv.imgproc.Imgproc

Performs initial step of meanshift segmentation of an image.

pyrMeanShiftFiltering(Mat, Mat, double, double) - Static method in class org.opencv.imgproc.Imgproc

Performs initial step of meanshift segmentation of an image.

pyrUp(Mat, Mat, Size, int) - Static method in class org.opencv.imgproc.Imgproc

Upsamples an image and then blurs it.

pyrUp(Mat, Mat, Size) - Static method in class org.opencv.imgproc.Imgproc

Upsamples an image and then blurs it.

pyrUp(Mat, Mat) - Static method in class org.opencv.imgproc.Imgproc

Upsamples an image and then blurs it.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
class BigDecimal
  def inspect
    "#<BigDecimal: #{to_s}>"
  end
end

redpajama_set_name: RedPajamaGithub


text:
struct Uberdog {
    doid_t do_id;
    const dclass::Class *dcc;
    bool anonymous;
};

extern const dclass::File *g_dcf;
extern Logger *g_logger;
extern ConfigFile *g_config;
extern EventSender g_eventsender;
extern boost::asio::io_service io_service;
extern std::unordered_map<doid_t, Uberdog> g_uberdogs;


text:
package org.cloudfoundry.client.v2.securitygroups;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.immutables.value.Value;

/**
 * The request payload for the Set Security Group Running Default operation
 */
@Value.Immutable
abstract class _SetSecurityGroupRunningDefaultRequest {

    /**
     * The security group to set as a default
     */
    @JsonIgnore
    abstract String getSecurityGroupId();

}


text:
Additional header content

The IProvider type exposes the following members.

## Methods

	Name	Description

![Public method](media/pubmethod.gif "Public method")	CreateInputXml
Creates the Xml source file from.

![Public method](media/pubmethod.gif "Public method")	Export
Export this target by applying the specified configuration.

![Public method](media/pubmethod.gif "Public method")	Parse
Parse special chars of argument.

![Public method](media/pubmethod.gif "Public method")	SetInputDataModel
Add an input data model to this adapter.

![Public method](media/pubmethod.gif "Public method")	SetSpecialChars
Sets an special char array to this provider.

![Public method](media/pubmethod.gif "Public method")	ToDataTable
Gets a reference to the DataTable object than contains the data this instance.

![Public method](media/pubmethod.gif "Public method")	ToXml
Gets a reference to the IEnumerable(T) object than contains the data this instance.

Back to Top

## See Also

#### Reference
IProvider Interface
iTin.Export.ComponentModel.Provider Namespace


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

namespace Pooler {
	/// <summary>
	/// Threads pool to execute any type of given tasks in background threads,
	/// driven by background executing threads variable count, possibly configured
	/// in run and also driven by task pausing to save CPU or other resources from .NET environment,
	/// also possible to configure at run.
	/// Parallel thread pool gives you three events to get any exception in your executed task,
	/// event when each task is done and event when all tasks are done. In event, when each
	/// task is done you can get currently running executing threads count in background.
	/// In the same way much more in other events.
	/// </summary>
	public class Parallel: Base {

		/// <summary>
		/// Tasks store to run in background threads.
		/// </summary>
		private List<Task> _store = new List<Task>();

		/// <summary>
		/// Static instance created only once.
		/// </summary>
		private static Parallel _instance = null;
		/// <summary>
		/// Lock for reading/writing from/into this._instanceLock;
		/// </summary>
		private static readonly object _instanceLock = new object { };

		/// <summary>
		/// Create and return new threads pool instance, nowhere regstered, just created.
		/// </summary>
		/// <param name="maxRunningTasks">Max threads running in parallel to execute given tasks.</param>
		/// <param name="pauseMiliseconds">Miliseconds for pooler.Pause(); call inside any task to slow down CPU or any other computer resources for each running thread in threads pool.</param>
		public Parallel (int maxRunningTasks = 10, int pauseMiliseconds = 0) : base(maxRunningTasks, pauseMiliseconds) {
		}

		/// <summary>
		/// Get single instance from Parallel.instance place created only once.
		/// </summary>
		/// <param name="maxRunningTasks">Max threads running in parallel to execute given tasks.</param>
		/// <param name="pauseMiliseconds">Miliseconds for pooler.Pause(); call inside any task to slow down CPU or any other computer resources for each running thread in threads pool.</param>
		/// <returns>static instance created only once.</returns>
		public static Parallel GetStaticInstance (int maxRunningTasks = Base.RUNNING_TASKS_MAX_DEFAULT, int pauseMiliseconds = Base.PAUSE_MILESECONDS_DEFAULT) {
			lock (Parallel._instanceLock) {
				if (Parallel._instance == null) Parallel._instance = new Parallel(maxRunningTasks, pauseMiliseconds);
			}
			return Parallel._instance;
		}
		/// <summary>
		/// Create and return new threads pool instance, nowhere regstered, just created.
		/// </summary>
		/// <param name="maxRunningTasks">Max threads running in parallel to execute given tasks.</param>
		/// <param name="pauseMiliseconds">Miliseconds for pooler.Pause(); call inside any task to slow down CPU or any other computer resources for each running thread in threads pool.</param>
		/// <returns>New threads pool instance to use.</returns>
		public static Parallel CreateNew (int maxRunningTasks = Base.RUNNING_TASKS_MAX_DEFAULT, int pauseMiliseconds = Base.PAUSE_MILESECONDS_DEFAULT) {
			return new Parallel(maxRunningTasks, pauseMiliseconds);
		}

		/// <summary>
		/// Add task into threads pool to run.
		/// </summary>
		/// <param name="task">Any function added internaly into tasks store with with single param accepting Parallel type and returning any object as result.</param>
		/// <param name="runInstantly">If true by default, run added task instantly after adding in it's own thread in background. If false, call after all Add() method calls the method StartProcessing() to start pool processing.</param>
		/// <param name="priority">Background thread priority for task executing.</param>
		/// <param name="async">If task is using any other threads to work or async code, set this to true and call pool.AsyncTaskDone() call after your task is done manualy.</param>
		/// <returns>Current threads pool instance.</returns>
		public Parallel Add (Func<Parallel, object> task, bool runInstantly = true, ThreadPriority priority = ThreadPriority.Normal, bool async = false) {
			lock (this.runningTasksLock) {
				this._store.Add(new Task {
					Job = task,
					Priority = priority,
					Async = async
				});
			}
			if (runInstantly) {
				lock (this.runningTasksLock) {
					if (this.runningTasksCount < this.runningTasksMax) {
						this.runExecutingTaskInNewThread();
					}
				}
			}
			return this;
		}

		/// <summary>
		/// Add task into threads pool to run.
		/// </summary>
		/// <param name="task">Any delegate added internaly into tasks store with no params section or with single param accepting Parallel type.</param>
		/// <param name="runInstantly">If true by default, run added task instantly after adding in it's own thread in background. If false, call after all Add() method calls the method StartProcessing() to start pool processing.</param>
		/// <param name="priority">Background thread priority for task executing.</param>
		/// <param name="async">If task is using any other threads to work or async code, set this to true and call pool.AsyncTaskDone() call after your task is done manualy.</param>
		/// <returns>Current threads pool instance.</returns>
		public Parallel Add (ParallelTaskDelegate task, bool runInstantly = true, ThreadPriority priority = ThreadPriority.Normal, bool async = false) {
			lock (this.runningTasksLock) {
				this._store.Add(new Task {
					Job = task,
					Priority = priority,
					Async = async
				});
			}
			if (runInstantly) {
				lock (this.runningTasksLock) {
					if (this.runningTasksCount < this.runningTasksMax) {
						this.runExecutingTaskInNewThread();
					}
				}
			}
			return this;
		}

		/// <summary>
		/// Stop processing background threads immediately by thread.Abort() or naturaly to empty
		/// the tasks store and run all runnung background threads into their natural end.
		/// </summary>
		/// <param name="abortAllThreadsImmediately">Abord all threads by thread.Abort(); to stop background executing threads immediately.</param>
		public override void StopAll (bool abortAllThreadsImmediately = true) {
			int threadsCount = 0;
			lock (this.runningTasksLock) {
				this._store = new List<Task>();
				threadsCount = this.threads.Count;
			}
			if (abortAllThreadsImmediately) {
				// yeah, I know, lines bellow are realy creazy,
				// but it works much better than whole foreach cycle
				// on this.threads inside the lock this.runningTasksLock,
				// because that construction causes death locks at the end,
				// realy don't know why:-(
				for (int i = 0; i < threadsCount; i++) {
					try {
						this.threads[i].Abort();
					} catch { }
				}
			}
		}

		/// <summary>
		/// After synchronous task is done, this function is called internaly.
		/// After any asynchronous taks is done, there is necessary to call pool.AsyncTaskDone(); method manualy from task job function.
		/// This method normaly run next taks, first from internal tasks store.
		/// If there is no task in the store, the thread stops itself.
		/// If there is higher running threads count than maximum and still enough tasks in the store,
		/// it creates new thread to run those tasks by: this.runExecutingTaskInNewThread();
		/// If there is lower running threads count than maximum, it stop itself.
		/// </summary>
		/// <param name="taskResult">If task was a function, put the result of the task into this place for TaskDone event.</param>
		protected override void done (object taskResult = null) {
			Task? task = null;
			int runningTasksCount = 0;
			int executedTasksCount = 0;
			lock (this.runningTasksLock) {
				this.executedTasksCount++;
				runningTasksCount = this.runningTasksCount;
				executedTasksCount = this.executedTasksCount;
				if (this.runningTasksCount <= this.runningTasksMax) {
					if (this.runningTasksCount < this.runningTasksMax && this._store.Count > 1) {
						this.runExecutingTaskInNewThread();
					}
					if (this._store.Count > 0) {
						task = this._store[0];
						this._store.RemoveAt(0);
					}
				}
			}
			if (this.taskDoneHasHandlers()) {
				this.taskDoneInvoke(new TaskDoneEventArgs {
					RunningTasksCount = runningTasksCount,
					ExecutedTasksCount = executedTasksCount,
					TaskResult = taskResult
				});
			}
			if (task.HasValue) {
				this.executeTask(task.Value);
			} else {
				lock (this.runningTasksLock) {
					this.executingThreadEnd();
				}
			}
		}

		/// <summary>
		/// This function has to be called only inside this.runningTasksLock;
		/// If there are no other task in store, it return at the beginning.
		/// It adds one more into this.runningTasksCount, manage the this.runningTasksCountMax,
		/// gets first task from tasks store and it runs the task in new registered background thread.
		/// </summary>
		protected override void runExecutingTaskInNewThread () {
			// this function is always called inside: lock (this.runningTasksLock) {
			if (this._store.Count == 0) return;
			this.runningTasksCount++;
			if (this.runningTasksCountMax < this.runningTasksCount) {
				this.runningTasksCountMax = this.runningTasksCount;
			}
			Task task = this._store[0];
			this._store.RemoveAt(0);
			Thread t = new Thread(new ThreadStart(delegate {
				this.executeTask(task);
			}));
			t.IsBackground = true;
			t.Priority = task.Priority;
			this.threads.Add(t);
			t.Start();
		}
	}
}


text:
{% if not adminform.form.use_ace_theme %}
    {% include "smartsnippets/plain_fieldset.html" %}
{% else %}
    {% include "smartsnippets/ace_fieldset.html" %}
{% endif %}


text:
class PublicTransitSchedule < ActiveRecord::Base
end


text:
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">

<?php echo form_open("Reservation_controler/valid"); ?>

        ID

            <input type="input" class="form-control" id="id" name="id" value="<?php echo $rezervacia['id']?>"  readonly>

        Datum

            <input type="text" id="datepicker" class="form-control" name="Den_od" value="<?php echo $rezervacia['Den_od']?>">

        Od

            <input type="time"  id="od" class="form-control" name="Cas_od" value="<?php echo $rezervacia['Cas_od']?>"  >

        Do

            <input type="time" id="do" class="form-control" name="Cas_do" value="<?php echo $rezervacia['Cas_do']?>"  >

        Suma

            <input type="text" id="sum" class="form-control" name="Suma" value="<?php echo $rezervacia['Suma']?>"  >

        Zaplatene

        <select name="Zaplatene" id="Zaplatene" class="form-control">
            <option value="<?php echo $rezervacia['Zaplatene']?>" selected="selected"><?php if($rezervacia['Zaplatene']==0) echo "Nie"; else echo "Ano"?></option>
            <option value="<?php if($rezervacia['Zaplatene']==0) echo "1"; else echo "0"?>"><?php if($rezervacia['Zaplatene']==0) echo "Ano"; else echo "Nie"?></option>
        </select>

            ID zákaznika

            <input type="text" id="zi" class="form-control" name="Zakaznik_id" value="<?php echo $rezervacia['Zakaznik_id']?>" readonly >

        ID športoviska

            <input type="text" id="si" class="form-control" name="Sportovisko_id" value="<?php echo $rezervacia['Sportovisko_id']?>" readonly >

    <input type="submit" class="btn btn-default" name="submit" value="Uložiť">

<?php echo form_close(); ?>


text:
package com.serotonin.bacnet4j.type.enumerated;

import com.serotonin.bacnet4j.type.primitive.Enumerated;
import org.free.bacnet4j.util.ByteQueue;

public class ObjectType extends Enumerated {
    private static final long serialVersionUID = 5428575132396799009L;
    public static final ObjectType analogInput = new ObjectType(0);
    public static final ObjectType analogOutput = new ObjectType(1);
    public static final ObjectType analogValue = new ObjectType(2);
    public static final ObjectType binaryInput = new ObjectType(3);
    public static final ObjectType binaryOutput = new ObjectType(4);
    public static final ObjectType binaryValue = new ObjectType(5);
    public static final ObjectType calendar = new ObjectType(6);
    public static final ObjectType command = new ObjectType(7);
    public static final ObjectType device = new ObjectType(8);
    public static final ObjectType eventEnrollment = new ObjectType(9);
    public static final ObjectType file = new ObjectType(10);
    public static final ObjectType group = new ObjectType(11);
    public static final ObjectType loop = new ObjectType(12);
    public static final ObjectType multiStateInput = new ObjectType(13);
    public static final ObjectType multiStateOutput = new ObjectType(14);
    public static final ObjectType notificationClass = new ObjectType(15);
    public static final ObjectType program = new ObjectType(16);
    public static final ObjectType schedule = new ObjectType(17);
    public static final ObjectType averaging = new ObjectType(18);
    public static final ObjectType multiStateValue = new ObjectType(19);
    public static final ObjectType trendLog = new ObjectType(20);
    public static final ObjectType lifeSafetyPoint = new ObjectType(21);
    public static final ObjectType lifeSafetyZone = new ObjectType(22);
    public static final ObjectType accumulator = new ObjectType(23);
    public static final ObjectType pulseConverter = new ObjectType(24);
    public static final ObjectType eventLog = new ObjectType(25);
    public static final ObjectType trendLogMultiple = new ObjectType(27);
    public static final ObjectType loadControl = new ObjectType(28);
    public static final ObjectType structuredView = new ObjectType(29);
    public static final ObjectType accessDoor = new ObjectType(30);

    public static final ObjectType[] ALL = { analogInput, analogOutput, analogValue, binaryInput, binaryOutput,
            binaryValue, calendar, command, device, eventEnrollment, file, group, loop, multiStateInput,
            multiStateOutput, notificationClass, program, schedule, averaging, multiStateValue, trendLog,
            lifeSafetyPoint, lifeSafetyZone, accumulator, pulseConverter, eventLog, trendLogMultiple, loadControl,
            structuredView, accessDoor, };

    public ObjectType(int value) {
        super(value);
    }

    public ObjectType(ByteQueue queue) {
        super(queue);
    }

    @Override
    public String toString() {
        int type = intValue();
        if (type == analogInput.intValue())
            return "Analog Input";
        if (type == analogOutput.intValue())
            return "Analog Output";
        if (type == analogValue.intValue())
            return "Analog Value";
        if (type == binaryInput.intValue())
            return "Binary Input";
        if (type == binaryOutput.intValue())
            return "Binary Output";
        if (type == binaryValue.intValue())
            return "Binary Value";
        if (type == calendar.intValue())
            return "Calendar";
        if (type == command.intValue())
            return "Command";
        if (type == device.intValue())
            return "Device";
        if (type == eventEnrollment.intValue())
            return "Event Enrollment";
        if (type == file.intValue())
            return "File";
        if (type == group.intValue())
            return "Group";
        if (type == loop.intValue())
            return "Loop";
        if (type == multiStateInput.intValue())
            return "Multi-state Input";
        if (type == multiStateOutput.intValue())
            return "Multi-state Output";
        if (type == notificationClass.intValue())
            return "Notification Class";
        if (type == program.intValue())
            return "Program";
        if (type == schedule.intValue())
            return "Schedule";
        if (type == averaging.intValue())
            return "Averaging";
        if (type == multiStateValue.intValue())
            return "Multi-state Value";
        if (type == trendLog.intValue())
            return "Trend Log";
        if (type == lifeSafetyPoint.intValue())
            return "Life Safety Point";
        if (type == lifeSafetyZone.intValue())
            return "Life Safety Zone";
        if (type == accumulator.intValue())
            return "Accumulator";
        if (type == pulseConverter.intValue())
            return "Pulse Converter";
        if (type == eventLog.intValue())
            return "Event Log";
        if (type == trendLogMultiple.intValue())
            return "Trend Log Multiple";
        if (type == loadControl.intValue())
            return "Load Control";
        if (type == structuredView.intValue())
            return "Structured View";
        if (type == accessDoor.intValue())
            return "Access Door";
        return "Vendor Specific (" + type + ")";
    }
}


text:
from django.contrib import admin
from seoutils.contrib.google.analytics.models import AnalyticCode

class AnalyticCodeAdmin(admin.ModelAdmin):
    list_display   = ('code', 'note', 'is_active')
    search_fields = ('code', 'note',)
    list_filter = ('is_active',)
admin.site.register(AnalyticCode, AnalyticCodeAdmin)


text:
ARG X_DCKR_BASETAG=dev

FROM dotmpe/testbox:$X_DCKR_BASETAG

MAINTAINER Docker Maintenance <docker-maint@dotmpe.com>

COPY docker-buildenv /etc/docker-buildenv

ARG DOCKER_IMAGE
ARG HUB_BUILD_TIME
ARG X_DCKR_COMMIT
ARG X_DCKR_VERSION

LABEL \
  org.label-schema.description="A bunch of py/rb/js dev tooling and a user setup" \
  org.label-schema.name="$DOCKER_IMAGE" \
  org.label-schema.build-date="$HUB_BUILD_TIME" \
  org.label-schema.version="$X_DCKR_VERSION" \
  org.label-schema.vcs-url="https://github.com/dotmpe/x-docker" \
  org.label-schema.vcs-ref=$X_DCKR_COMMIT \
  org.label-schema.schema-version="1.0"

USER root

# Setup package manager and install prerequisite packages
RUN \
  DEBIAN_FRONTEND=noninteractive; RUNLEVEL=1; \
  apt-get update -qqy && \
  apt-get install -qqy --allow-downgrades \
    bash zsh dash posh ash ksh mksh busybox-static \
    build-essential libreadline-dev time gawk  \
    bc curl elinks git jq graphviz imagemagick \
    libnet-ifconfig-wrapper-perl \
    make man moreutils netcat npm pandoc unrtf antiword \
    php-cli python python-dev python-tox python-yaml \
    ruby-full rubygems socat sqlite3 ssh sudo tmux tree uuid-runtime \
    vim git-annex gist glances \
    software-properties-common \
    autoconf libtool \
    zlib1g wget libelf-dev libdw-dev cmake cmake-data g++ \
    binutils-dev \
    libiberty-dev zlib1g-dev \
    libzmq3-dev \
    golang \
    && \
  DEBIAN_FRONTEND=teletype \
  unset RUNLEVEL && \
  rm -rf /var/cache/apt/*

# Setup node NVM and some tooling
ARG node_version=lts

RUN npm install -g npm && \
  npm install -g n && \
  n $node_version && \
  chmod g+rw /usr/local/* /usr/local/lib/node_modules && \
  chgrp staff /usr/local/* /usr/local/lib/node_modules && \
  nodepath=$(echo /usr/local/n/versions/node/*/bin | tr ' ' '\n' | sort -rn | head -n 1) && \
  export PATH=$nodepath:$PATH && \
  { echo; echo PATH=$PATH; } | tee -a /etc/profile | tee -a /etc/bash.bashrc

RUN npm install --quiet -g coffeescript pm2 grunt grunt-cli webpack node-gyp && \
  npm update --quiet -g nan && \
  gem install --quiet sass

#  npm install --quiet --unsafe-perm -g zmq && \

# Install KCov
RUN \
  git clone https://github.com/SimonKagstrom/kcov.git /src/github.com/SimonKagstrom/kcov && \
  cd /src/github.com/SimonKagstrom/kcov && \
  DEFAULT_KCOV_GIT_REF=$(git tag --list | grep "^v[0-9]\+$" | sort -V | tail --lines 1) && \
  KCOV_GIT_REF=${KCOV_GIT_REF:-$DEFAULT_KCOV_GIT_REF} && \
  git reset --hard $KCOV_GIT_REF && \
  mkdir build && cd build && cmake .. && make && make install

# TODO: fix pm2 fsevents
# TODO: accumulating current dev deps above. should split up into multiple bases and derivatives, one big one perhaps

# TODO: Fix permissions for above paths, ie. set to grp:staff?
ARG username=treebox

RUN \
  chown -R $username:$username /home/$username/ && \
  chown -R $username:staff /src/github.com /src/bitbucket.org /src/local /srv && \
  chmod -R g+rw /src/github.com /src/bitbucket.org /src/local

RUN locale-gen en_US.UTF-8

RUN \
  apt-get clean autoclean && \
  apt-get autoremove -qqy && \
  unset DEBIAN_FRONTEND RUNLEVEL && \
  DEBIAN_FRONTEND=teletype \
  rm -Rf /usr/local/src/* -Rf && \
  rm -Rf /tmp/* && \
  rm -Rf /var/lib/apt/lists/*.gz && \
  rm -Rf /var/lib/cache/* && \
  rm -Rf /var/lib/log/* && \
  rm -Rf /var/log/* && \
  rm -Rf /var/cache/*

# Fancy up (root) env
ENV \
  LANG=en_US.UTF-8 \
  LANGUAGE=en_US:en \
  LC_ALL=en_US.UTF-8 \
  DEBIAN_FRONTEND=teletype \
  DOCKER_IMAGE=$DOCKER_IMAGE

# Use 'sudo -iHu <user>'
USER root

# Use Basher for lazy user-installs of new shell commands; it clones only the
# need last slice, no history, tags, etc. For non-user-command repos and full
# checkouts put stuff at /src/*.{net,org...tld}/<user>/<repo>.
#
# TODO: change from above manual installs to user-scripts repo
# XXX: see testbox
#RUN git clone https://github.com/basherpm/basher.git /home/$username/.basher && \
#  ( echo 'export PATH="$HOME/.basher/bin:$HOME/.basher/cellar/bin:$PATH"' >> /home/$username/.bash_profile ) && \
#  ( echo 'export PATH="$HOME/.basher/bin:$HOME/.basher/cellar/bin:$PATH"' >> /home/$username/.profile ) && \
#  ( echo ': "${CS:=dark}"; export CS' >> /home/$username/.bash_profile ) && \
#  ( echo ': "${TERM:=xterm}"; export TERM' >> /home/$username/.bash_profile ) && \
#  ( echo 'test -n "$CS" || CS=dark; export CS' >> /home/$username/.profile ) && \
#  ( echo 'test -n "$TERM" || TERM=xterm; export TERM' >> /home/$username/.profile ) && \
#  . ~/.profile && \
#  BASHER_FULL_CLONE=true basher install dotmpe/user-scripts && \
#  cd /home/$username/.basher/cellar/packages/dotmpe/user-scripts && \
#  git checkout r0.0 && \
#  mkdir -p /src/github.com/dotmpe && \
#  git clone https://github.com/dotmpe/oil.git /src/github.com/dotmpe/oil && \
#  cd /src/github.com/dotmpe/oil && \
#  git checkout feature/ast-visitor-cli && \
#  make configure && build/dev.sh minimal
#
#ENV TREEBOX_IMAGE="$IMAGE_NAME" \
#  TREEBOX_SOURCE="$SOURCE_BRANCH:$GIT_COMMIT" \
#  LANG=en_US.UTF-8 \
#  U_S=/home/$username/.basher/cellar/packages/dotmpe/user-scripts

# Id: x-docker/0.0.2-dev


text:
title: Pen is magic
description: A tower defense game with gesture-based control
thumbnail: /public/images/pen-is-magic.jpg
---

# Introduction

"Pen is magic" is a tower defense style game developed for CS4213 (Game Development) in 2014.

In this game, the player draws magical runes using touch gesture/mouse in order to cast spells and fight off advancing enemies.
Different runes represents different magical elements and they can be combined to form stronger spells.

# My role and contribution

- Developed and fine tune the gesture recognition system
- Foundation for spell effects
- Rune combination system
- Element interaction system (i.e: water is strong against fire but weak against earth)

# Technologies and tools used

- Unity engine: http://unity3d.com
- C#
- Git

# Screenshots

![pen-is-magic](/public/images/pen-is-magic.jpg)

In-game screen

![pen-is-magic2](/public/images/pen-is-magic2.jpg)

All enemy types


text:
package bammerbom.ultimatecore.sponge.api.command.argument;

import bammerbom.ultimatecore.sponge.api.language.utils.TextUtil;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.ArgumentParseException;
import org.spongepowered.api.command.args.CommandArgs;
import org.spongepowered.api.command.args.CommandContext;
import org.spongepowered.api.command.args.CommandElement;
import org.spongepowered.api.text.Text;

import javax.annotation.Nullable;
import java.util.List;

public abstract class UCommandElement extends CommandElement {
    public UCommandElement(@Nullable Text key) {
        super(key);
    }

    @Nullable
    public abstract Object parseValue(CommandSource source, CommandArgs args) throws ArgumentParseException;

    public abstract List<String> complete(CommandSource src, CommandArgs args, CommandContext context);

    public Text getUsageKey(CommandSource src) {
        return TextUtil.firstUppercase(getKey());
    }

    @Override
    public Text getUsage(CommandSource src) {
        return getUsageKey(src) == null ? Text.of() : Text.of("<", getUsageKey(src), ">");
    }
}


text:
namespace proximity_auth {

CryptAuthEnrollerFactoryImpl::CryptAuthEnrollerFactoryImpl(
    ProximityAuthClient* proximity_auth_client)
    : proximity_auth_client_(proximity_auth_client) {}

CryptAuthEnrollerFactoryImpl::~CryptAuthEnrollerFactoryImpl() {}

std::unique_ptr<CryptAuthEnroller>
CryptAuthEnrollerFactoryImpl::CreateInstance() {
  return base::WrapUnique(new CryptAuthEnrollerImpl(
      proximity_auth_client_->CreateCryptAuthClientFactory(),
      proximity_auth_client_->CreateSecureMessageDelegate()));
}

}  // namespace proximity_auth


text:
<?php
namespace CmsIr\File\Model;

use CmsIr\System\Model\Model;
use CmsIr\System\Util\Inflector;

class Gallery extends Model
{
    protected $id;
    protected $status_id;
    protected $name;
    protected $slug;
    protected $filename_main;
    protected $category_id;
    protected $position;

    //virtual
    protected $files;
    protected $title;
    protected $category;
    protected $url;

    public function exchangeArray($data)
    {
        $this->id = (!empty($data['id'])) ? $data['id'] : null;
        $this->status_id = (!empty($data['status_id'])) ? $data['status_id'] : null;
        $this->name = (!empty($data['name'])) ? $data['name'] : null;
        $this->slug = (!empty($data['slug'])) ? $data['slug'] : null;
        $this->url = (!empty($data['url'])) ? $data['url'] : null;
        $this->filename_main = (!empty($data['filename_main'])) ? $data['filename_main'] : null;
        $this->category_id = (!empty($data['category_id'])) ? $data['category_id'] : null;
        $this->files = (!empty($data['files'])) ? $data['files'] : null;
        $this->category = (!empty($data['category'])) ? $data['category'] : null;
        $this->position = (!empty($data['position'])) ? $data['position'] : null;
    }

    /**
     * @return mixed
     */
    public function getFiles()
    {
        return $this->files;
    }

    /**
     * @param mixed $files
     */
    public function setFiles($files)
    {
        $this->files = $files;
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param mixed $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param mixed $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * @return mixed
     */
    public function getSlug()
    {
        return $this->slug;
    }

    /**
     * @param mixed $slug
     */
    public function setSlug($slug)
    {
        $this->slug = $slug;
    }

    /**
     * @return mixed
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * @param mixed $url
     */
    public function setUrl($url)
    {
        $this->url = $url;
    }

    /**
     * @return mixed
     */
    public function getStatusId()
    {
        return $this->status_id;
    }

    /**
     * @param mixed $status_id
     */
    public function setStatusId($status_id)
    {
        $this->status_id = $status_id;
    }

    /**
     * @return mixed
     */
    public function getFilenameMain()
    {
        return $this->filename_main;
    }

    /**
     * @param mixed $filename_main
     */
    public function setFilenameMain($filename_main)
    {
        $this->filename_main = $filename_main;
    }

    /**
     * @return mixed
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * @param mixed $title
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

    /**
     * @return mixed
     */
    public function getCategoryId()
    {
        return $this->category_id;
    }

    /**
     * @param mixed $category_id
     */
    public function setCategoryId($category_id)
    {
        $this->category_id = $category_id;
    }

    /**
     * @return mixed
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * @param mixed $category
     */
    public function setCategory($category)
    {
        $this->category = $category;
    }

    /**
     * @return mixed
     */
    public function getPosition()
    {
        return $this->position;
    }

    /**
     * @param mixed $position
     */
    public function setPosition($position)
    {
        $this->position = $position;
    }
}


text:
var LogEntry = require('./LogEntry');

function LogCreator(distributor) {
	this._contexts = null;
	this._distributor = distributor;

	distributor.addLogCreator(this);
}

LogCreator.prototype.enableChannel = function (name) {
	this.createChannelHandler(name);
};

LogCreator.prototype.disableChannel = function (name) {
	this.createChannelDecoy(name);
};

LogCreator.prototype.addContexts = function () {
	if (this._contexts) {
		this._contexts.push.apply(this._contexts, arguments);
	} else {
		this._contexts = Array.prototype.slice.call(arguments);
	}
};

LogCreator.prototype.context = function () {
	// clones self and augments with context

	var clone = new LogCreator(this._distributor);

	clone.addContexts.apply(clone, this._contexts);
	clone.addContexts.apply(clone, arguments);

	return clone;
};

LogCreator.prototype.createChannelHandler = function (channelName) {
	var that = this;
	var distributor = this._distributor;
	var contexts, details, data;

	var fn = function logMessage() {
		// calling the channel as a function sends off a log entry
		// arguments compose the message

		var entry = new LogEntry(channelName);
		var i;

		entry.addMessageArgs(arguments);

		if (that._contexts) {
			entry.addContexts(that._contexts);
		}

		if (contexts) {
			entry.addContexts(contexts);
			contexts = undefined;
		}

		if (details) {
			for (i = 0; i < details.length; i++) {
				entry.addDetails(details[i]);
			}

			details = undefined;
		}

		if (data) {
			entry.addData(data);

			data = undefined;
		}

		// send the entry to the writers

		distributor.log(entry);

		// return undefined
	};

	fn.context = function () {
		// each given argument is considered a context which will be added

		if (contexts) {
			contexts.push.apply(contexts, arguments);
		} else {
			contexts = Array.prototype.slice.call(arguments);
		}

		return fn;
	};

	fn.details = function () {
		// each call creates one line, the arguments of this call will be joined with a space

		if (details) {
			details.push(arguments);
		} else {
			details = [arguments];
		}

		return fn;
	};

	fn.data = function (label, value) {
		if (!label) {
			return fn;
		}

		if (!data) {
			data = [];
		}

		if (!value) {
			value = label;
			label = 'data';
		}

		data.push({ label, value });

		return fn;
	};

	fn.log = fn;

	this[channelName] = fn;
};

LogCreator.prototype.createChannelDecoy = function (channelName) {
	var decoy = function logMessage() {
		// do nothing
		// return undefined
	};

	decoy.context = function () {
		return decoy;
	};

	decoy.details = function () {
		return decoy;
	};

	decoy.data = function () {
		return decoy;
	};

	decoy.log = decoy;

	this[channelName] = decoy;
};

LogCreator.prototype.simulate = function (engine) {
	var simlib = require('./simulators/' + engine);

	return simlib.create(this);
};

module.exports = LogCreator;


text:
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

import {
  JupyterLab, JupyterLabPlugin
} from '../application';

import {
  IDocumentRegistry
} from '../docregistry';

import {
  CSVWidgetFactory
} from './widget';

/**
 * The list of file extensions for csv tables.
 */
const EXTENSIONS = ['.csv'];

/**
 * The table file handler extension.
 */
export
const csvHandlerExtension: JupyterLabPlugin<void> = {
  id: 'jupyter.extensions.csvHandler',
  requires: [IDocumentRegistry],
  activate: activateCSVWidget,
  autoStart: true
};

/**
 * Activate the table widget extension.
 */
function activateCSVWidget(app: JupyterLab, registry: IDocumentRegistry): void {
  let options = {
    fileExtensions: EXTENSIONS,
    defaultFor: EXTENSIONS,
    displayName: 'Table',
    modelName: 'text',
    preferKernel: false,
    canStartKernel: false
  };

  registry.addWidgetFactory(new CSVWidgetFactory(), options);
}


text:
ACCEPTED

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

#### Published in
Sendtnera 6: 95 (1999)

#### Original name
Bryonectria phyllogena Döbbeler, 1999

### Remarks
null


text:
import chalk from 'chalk';

import printLine from './printLine';

/**
 * Prints a message in color red followed by a line-break.
 *
 * @param {string} message The message to print.
 */
function printFailureLine(message) {
  printLine(chalk.red(message));
}

export default printFailureLine;


text:
package nu.validator.datatype;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.relaxng.datatype.DatatypeException;

/**
 *
 *
 * @version $Id$
 * @author hsivonen
 */
public final class Time extends AbstractDatetime {

    /**
     * The singleton instance.
     */
    public static final Time THE_INSTANCE = new Time();

    /**
     * The rexexp for this datatype.
     */
    private static final Pattern THE_PATTERN = Pattern.compile("^([0-9]{2}):([0-9]{2})(?::([0-9]{2})(?:\\.[0-9]{1,3})?)?$");

    /**
     * Constructor.
     */
    private Time() {
        super();
    }

    public void checkValid(CharSequence literal)
            throws DatatypeException {
        Matcher m = getPattern().matcher(literal);
        if (m.matches()) {
            checkHour(m.group(1));
            checkMinute(m.group(2));
            String seconds = m.group(3);
            if (seconds != null) {
                checkSecond(seconds);
            }
        } else {
            throw newDatatypeException(
                    "The literal did not satisfy the format for time.");
        }
    }

    /**
     * Returns the regexp for this datatype.
     *
     * @return the regexp for this datatype
     * @see nu.validator.datatype.AbstractDatetime#getPattern()
     */
    protected Pattern getPattern() {
        return THE_PATTERN;
    }

    @Override
    public String getName() {
        return "time";
    }
}


text:
declare module 'aurelia-framework/plugins' {
	/**
	 * Manages loading and configuring plugins.
	 *
	 * @class Plugins
	 * @constructor
	 * @param {Aurelia} aurelia An instance of Aurelia.
	 */
	export class Plugins {
	    aurelia: any;
	    info: any;
	    processed: any;
	    constructor(aurelia: any);
	    /**
	     * Configures a plugin before Aurelia starts.
	     *
	     * @method plugin
	     * @param {moduleId} moduleId The ID of the module to configure.
	     * @param {config} config The configuration for the specified module.
	     * @return {Plugins} Returns the current Plugins instance.
	   */
	    plugin(moduleId: any, config: any): Plugins;
	    _process(): any;
	}

}
declare module 'aurelia-framework/aurelia' {
	/**
	 * The framework core that provides the main Aurelia object.
	 *
	 * @class Aurelia
	 * @constructor
	 * @param {Loader} loader The loader for this Aurelia instance to use. If a loader is not specified, Aurelia will use a defaultLoader.
	 * @param {Container} container The dependency injection container for this Aurelia instance to use. If a container is not specified, Aurelia will create an empty container.
	 * @param {ResourceRegistry} resources The resource registry for this Aurelia instance to use. If a resource registry is not specified, Aurelia will create an empty registry.
	 */
	export class Aurelia {
	    loader: any;
	    container: any;
	    resources: any;
	    use: any;
	    resourcesToLoad: any;
	    currentPluginId: any;
	    started: any;
	    host: any;
	    root: any;
	    constructor(loader?: any, container?: any, resources?: any);
	    /**
	     * Adds an existing object to the framework's dependency injection container.
	     *
	     * @method withInstance
	     * @param {Class} type The object type of the dependency that the framework will inject.
	     * @param {Object} instance The existing instance of the dependency that the framework will inject.
	     * @return {Aurelia} Returns the current Aurelia instance.
	     */
	    withInstance(type: any, instance: any): Aurelia;
	    /**
	     * Adds a singleton to the framework's dependency injection container.
	     *
	     * @method withSingleton
	     * @param {Class} type The object type of the dependency that the framework will inject.
	     * @param {Object} implementation The constructor function of the dependency that the framework will inject.
	     * @return {Aurelia} Returns the current Aurelia instance.
	     */
	    withSingleton(type: any, implementation: any): Aurelia;
	    /**
	     * Adds globally available view resources to be imported into the Aurelia framework.
	     *
	     * @method globalizeResources
	     * @param {Object|Array} resources The relative module id to the resource. (Relative to the plugin's installer.)
	     * @return {Aurelia} Returns the current Aurelia instance.
	     */
	    globalizeResources(resources: any): Aurelia;
	    /**
	     * Renames a global resource that was imported.
	     *
	     * @method renameGlobalResource
	     * @param {String} resourcePath The path to the resource.
	     * @param {String} newName The new name.
	     * @return {Aurelia} Returns the current Aurelia instance.
	     */
	    renameGlobalResource(resourcePath: any, newName: any): Aurelia;
	    /**
	     * Loads plugins, then resources, and then starts the Aurelia instance.
	     *
	     * @method start
	     * @return {Aurelia} Returns the started Aurelia instance.
	     */
	    start(): any;
	    /**
	     * Instantiates the root view-model and view and add them to the DOM.
	     *
	     * @method withSingleton
	     * @param {Object} root The root view-model to load upon bootstrap.
	     * @param {string|Object} applicationHost The DOM object that Aurelia will attach to.
	     * @return {Aurelia} Returns the current Aurelia instance.
	     */
	    setRoot(root?: string, applicationHost?: any): any;
	}

}
declare module 'aurelia-framework/index' {
	/**
	 * The aurelia framework brings together all the required core aurelia libraries into a ready-to-go application-building platform.
	 *
	 * @module framework
	 */
	export { Aurelia } from 'aurelia-framework/aurelia';
	export * from 'aurelia-dependency-injection';
	export * from 'aurelia-binding';
	export * from 'aurelia-metadata';
	export * from 'aurelia-templating';
	export * from 'aurelia-loader';
	export * from 'aurelia-task-queue';
	export var LogManager: any;

}
declare module 'aurelia-framework' {
	export * from 'aurelia-framework/index';
}


text:
import readline
from pprint import pprint

import os

# Set up the database before importing the Flask app.
TEST_DB = os.path.join(os.path.dirname(os.path.realpath(__file__)),'sqlite_hackathon_shell.db')
os.environ["FLASK_OVERRIDE_DB"] = "sqlite:///%s" % (TEST_DB, )
print "DB path : %s" % (TEST_DB,)

import www
# This forces the database to be linked to the tempfile
www.database.create()

from www.models import User, Site

#User.ensure_superadmin()
#User.ensure_siteadmin()
#User.ensure_client()

Site.ensure_exists()
#Site.ensure_exists('basic', proj='hackathon')

#user1 = User.ensure_siteadmin()
#print "TEST User1.id=%4d Email='%s' :: bundle='%s'" % (user1.id, user1.email, user1.bundle, )

#user2 = User.ensure_client()
#print "TEST User2.id=%4d Email='%s' :: bundle='%s'" % (user2.id, user2.email, user2.bundle, )

"""
user1 = User('bhc', 'email1', 'name1')
user1.grant_permission('', 'admin_level')
User.add(user1)
#user1.email='dgfdfgdfgd'
User.commit()
print "TEST User1.id[%s]  Email='%s' :: bundle='%s'\n\n" % (user1.id, user1.email, user1.bundle, )

user2 = User('bhc', 'email2', 'name2') #, {})
User.add(user2)
#user2.grant_permission('', 'aasdasddmin_level')
User.commit()
print "TEST User2.id[%s]  Email='%s' :: bundle='%s'\n\n" % (user2.id, user2.email, user2.bundle, )
"""

"""
class TestMe():
    data=None

    def __init__(self, _p={'b':'334334'}):
        print "TEST with p=%s" % (_p)
        self.data=_p

t1=TestMe()
t1.data = { 'a':'34342' }
t2=TestMe({})
"""

os.environ['PYTHONINSPECT'] = 'True'