text:
.. image:: https://api.cirrus-ci.com/github/pyscaffold/pyscaffold.svg?branch=master
    :alt: Built Status
    :target: https://cirrus-ci.com/github/pyscaffold/pyscaffold
.. image:: https://readthedocs.org/projects/pyscaffold/badge/?version=latest
    :alt: ReadTheDocs
    :target: https://pyscaffold.org/en/latest
.. image:: https://img.shields.io/coveralls/github/pyscaffold/pyscaffold/master.svg
    :alt: Coveralls
    :target: https://coveralls.io/r/pyscaffold/pyscaffold
.. image:: https://img.shields.io/pypi/v/pyscaffold.svg
    :alt: PyPI-Server
    :target: https://pypi.org/project/pyscaffold/
.. image:: https://img.shields.io/conda/vn/conda-forge/pyscaffold.svg
    :alt: Conda-Forge
    :target: https://anaconda.org/conda-forge/pyscaffold
.. image:: https://pepy.tech/badge/pyscaffold/month
    :alt: Monthly Downloads
    :target: https://pepy.tech/project/pyscaffold
.. image:: https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter
    :alt: Twitter
    :target: https://twitter.com/pyscaffold
.. image:: https://img.shields.io/badge/-PyScaffold?style=social&logo=pyscaffold&logoColor=005CA0&label=PyScaffold
    :alt: PyScaffold
    :target: https://pyscaffold.org/

|

.. image:: https://pyscaffold.org/en/latest/_images/logo.png
    :height: 512px
    :width: 512px
    :scale: 60 %
    :alt: PyScaffold logo
    :align: center

|

PyScaffold is a project generator for bootstrapping high quality Python
packages, ready to be shared on PyPI_ and installable via pip_.
It is easy to use and encourages the adoption of the best tools and
practices of the Python ecosystem, helping you and your team
to stay sane, happy and productive. The best part? It is stable and has been used
by thousands of developers for over half a decade!

Checkout out `this demo project`_, which was set up using PyScaffold and
if you are still not convinced yet, also have a look at these `reasons to use PyScaffold`_.

    **NOTE** - This document refers to the latest version of PyScaffold (v4).
    Please refer to `v3.3`_ for the previous stable version.

Quickstart
==========

Just pick your favourite installation method::

    ## Good old pip
    # (make sure it is up-to-date: pip install -U pip setuptools)
    pip install pyscaffold

    ## Conda for the datascience fans
    conda install -c conda-forge pyscaffold

    ## Or even pipx for the virtualenv aficionados
    pipx install pyscaffold

If you want to install all PyScaffold's *extensions* you can even::

    pip install pyscaffold[all]

(More details of each method are available in the `installation docs`_)

After the installation, a new ``putup`` command will be available and you can just type::

    putup my_project

This will create a new folder called ``my_project`` containing a perfect *project
template* with everything you need for some serious coding.

After ``cd``-ing into your new project and creating (or activating) an `isolated
development environment`_ (with virtualenv_, conda_ or your preferred tool),
you can do the usual `editable install`_::

    pip install -e .

… all set and ready to go!

We also recommend using tox_, so you can take advantage of the automation tasks
we have setup for you, like::

   tox -e build  # to build your package distribution
   tox -e publish  # to test your project uploads correctly in test.pypi.org
   tox -e publish -- --repository pypi  # to release your package to PyPI
   tox -av  # to list all the tasks available

The following figure demonstrates the usage of ``putup`` with the new experimental
interactive mode for setting up a simple project.
It uses the `--cirrus` flag to add CI support (via `Cirrus CI`_), and
tox_ to run automated project tasks like building a package file for
distribution (or publishing).

.. image:: https://pyscaffold.org/en/latest/_images/demo.gif
    :alt: Creating a simple package with PyScaffold
    :target: https://asciinema.org/a/qzh5ZYKl1q5xYEnM4CHT04HdW?autoplay=1

Type ``putup -h`` to learn about more configuration options. PyScaffold assumes
that you have Git_ installed and set up on your PC,
meaning at least your name and email are configured.

The project template provides you with following features:

Configuration & Packaging
=========================

All configuration can be done in ``setup.cfg`` like changing the description,
URL, classifiers, installation requirements and so on as defined by setuptools_.
That means in most cases it is not necessary to tamper with ``setup.py``.

In order to build a source or wheel distribution, just run ``tox -e build``
(if you don't use tox_, you can also install ``build`` and run ``python -m build``).

.. rubric:: Package and Files Data

Additional data, e.g. images and text files, that reside within your package and
are tracked by Git will automatically be included
if ``include_package_data = True`` in ``setup.cfg``.
It is not necessary to have a ``MANIFEST.in`` file for this to work.

Note that the ``include_package_data`` option in ``setup.cfg`` is only
guaranteed to be read when creating a `wheels`_ distribution. Other distribution methods might
behave unexpectedly (e.g. always including data files even when
``include_package_data = False``). Therefore, the best option if you want to have
data files in your repository **but not as part of the pip installable package**
is to add them somewhere **outside** the ``src`` directory (e.g. a ``files``
directory in the root of the project, or inside ``tests`` if you use them for
checks). Additionally you can exclude them explicitly via the
``[options.packages.find] exclude`` option in ``setup.cfg``.

Versioning and Git Integration
==============================

Your project is an already initialised Git repository and uses
the information of tags to infer the version of your project with the help of
setuptools_scm_.
To use this feature, you need to tag with the format ``MAJOR.MINOR[.PATCH]``
, e.g. ``0.0.1`` or ``0.1``.
This version will be used when building a package and is also accessible
through ``my_project.__version__``.

Unleash the power of Git by using its `pre-commit hooks`_. This feature is
available through the ``--pre-commit`` flag. After your project's scaffold
was generated, make sure pre-commit is installed, e.g. ``pip install pre-commit``,
then just run ``pre-commit install``.

A default ``.gitignore`` file is also provided; it is
well adjusted for Python projects and the most common tools.

Sphinx Documentation
====================

PyScaffold will prepare a `docs` directory with all you need to start writing
your documentation.
Start editing the file ``docs/index.rst`` to extend the documentation.
The documentation also works with `Read the Docs`_.

The `Numpy and Google style docstrings`_ are activated by default.

If you have `tox`_ in your system, simply run ``tox -e docs`` or ``tox -e
doctests`` to compile the docs or run the doctests.

Alternatively, if you have `make`_ and `Sphinx`_ installed in your computer, build the
documentation with ``make -C docs html`` and run doctests with
``make -C docs doctest``. Just make sure Sphinx 1.3 or above is installed.

Automation, Tests & Coverage
============================

PyScaffold relies on `pytest`_ to run all automated tests defined in the subfolder
``tests``.  Some sane default flags for pytest are already defined in the
``[tool:pytest]`` section of ``setup.cfg``. The pytest plugin `pytest-cov`_ is used
to automatically generate a coverage report. It is also possible to provide
additional parameters and flags on the commandline, e.g., type::

    pytest -h

to show the help of pytest (requires `pytest`_ to be installed in your system
or virtualenv).

Projects generated with PyScaffold by default support running tests via `tox`_,
a virtualenv management and test tool, which is very handy. If you run::

    tox

in the root of your project, `tox`_ will download its dependencies, build the
package, install it in a virtualenv and run the tests using `pytest`_, so you
are sure everything is properly tested.

.. rubric:: JUnit and Coverage HTML/XML

For usage with a continuous integration software JUnit and Coverage XML output
can be activated in ``setup.cfg``. Use the flag ``--cirrus`` to generate
templates of the `Cirrus CI`_ configuration file ``.cirrus.yml`` which even
features the coverage and stats system `Coveralls`_.

Management of Requirements & Licenses
=====================================

Installation requirements of your project can be defined inside ``setup.cfg``,
e.g. ``install_requires = numpy; scipy``. To avoid package dependency problems
it is common to not pin installation requirements to any specific version,
although minimum versions, e.g. ``sphinx>=1.3``, and/or maximum versions, e.g.
``pandas<0.12``, are used frequently in accordance with `semantic versioning`_.

All licenses from `choosealicense.com`_ can be easily selected with the help
of the ``--license`` flag.

Extensions
==========

PyScaffold comes with several extensions:

* If you want a project setup for a *Data Science* task, just use ``--dsproject``
  after having installed `pyscaffoldext-dsproject`_.

* Have a ``README.md`` based on Markdown instead of ``README.rst`` by using
  ``--markdown`` after having installed `pyscaffoldext-markdown`_.

* Create a `Django project`_ with the flag ``--django`` which is equivalent to
  ``django-admin startproject my_project`` enhanced by PyScaffold's features
  (requires `pyscaffoldext-django`_).

* … and many more like ``--gitlab`` to create the necessary files for GitLab_,
  ``--travis`` for `Travis CI`_ (see `pyscaffoldext-travis`_), or
  ``--cookiecutter`` for Cookiecutter_ integration (see `pyscaffoldext-cookiecutter`_).

Find more extensions within the `PyScaffold organisation`_ and consider contributing your own,
it is very easy! You can quickly generate a template for your extension with the
``--custom-extension`` option after having installed `pyscaffoldext-custom-extension`_.

All extensions can easily be installed with ``pip install pyscaffoldext-NAME``.

Easy Updating
=============

Keep your project's scaffold up-to-date by applying
``putup --update my_project`` when a new version of PyScaffold was released.
An update will only overwrite files that are not often altered by users like
``setup.py``. To update all files use ``--update --force``.
An existing project that was not setup with PyScaffold can be converted with
``putup --force existing_project``. The force option is completely safe to use
since the git repository of the existing project is not touched!

.. _v3.3: https://pyscaffold.org/en/v3.3.x/
.. _PyPI: https://pypi.org/
.. _pip: https://pip.pypa.io/en/stable/
.. _this demo project: https://github.com/pyscaffold/pyscaffold-demo
.. _reasons to use PyScaffold: https://pyscaffold.org/en/latest/reasons.html
.. _installation docs: https://pyscaffold.org/en/latest/install.html
.. _isolated development environment: https://realpython.com/python-virtual-environments-a-primer/
.. also good, but sometimes medium can get on the way: https://towardsdatascience.com/virtual-environments-104c62d48c54
.. _virtualenv: https://virtualenv.pypa.io/en/stable/
.. _conda: https://docs.conda.io/en/latest/
.. _editable install: https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs
.. _setuptools: https://setuptools.pypa.io/en/stable/userguide/declarative_config.html
.. _setuptools_scm: https://pypi.org/project/setuptools-scm/
.. _semantic versioning: https://semver.org
.. _Git: https://git-scm.com/
.. _PEP440: https://www.python.org/dev/peps/pep-0440/
.. _pre-commit hooks: https://pre-commit.com/
.. _make: https://www.gnu.org/software/make/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
.. _Read the Docs: https://readthedocs.org/
.. _Numpy and Google style docstrings: https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
.. _pytest: https://docs.pytest.org/en/stable/
.. _pytest-cov: https://github.com/pytest-dev/pytest-cov
.. _Cirrus CI: https://cirrus-ci.org/
.. _Travis CI: https://travis-ci.org/
.. _Coveralls: https://coveralls.io/
.. _tox: https://tox.wiki/en/stable/
.. _choosealicense.com: https://choosealicense.com/
.. _Django project: https://www.djangoproject.com/
.. _Cookiecutter: https://cookiecutter.readthedocs.io/en/stable/
.. _GitLab: https://about.gitlab.com/
.. _pip-tools: https://github.com/jazzband/pip-tools/
.. _pyscaffoldext-dsproject: https://github.com/pyscaffold/pyscaffoldext-dsproject
.. _pyscaffoldext-custom-extension: https://github.com/pyscaffold/pyscaffoldext-custom-extension
.. _pyscaffoldext-markdown: https://github.com/pyscaffold/pyscaffoldext-markdown
.. _pyscaffoldext-django: https://github.com/pyscaffold/pyscaffoldext-django
.. _pyscaffoldext-cookiecutter: https://github.com/pyscaffold/pyscaffoldext-cookiecutter
.. _pyscaffoldext-travis: https://github.com/pyscaffold/pyscaffoldext-travis
.. _PyScaffold organisation: https://github.com/pyscaffold/
.. _wheels: https://realpython.com/python-wheels/


text:
FROM cantireinnovations/node-sensu-check:node-v4.2.4_sensu-0.21.0
MAINTAINER Cantire Innovations

COPY ./scripts/configure-sensu-checks.sh /usr/local/bin/configure-sensu-checks.sh

COPY ./check/ /opt/kafka-rest-sensu-checks/
WORKDIR /opt/kafka-rest-sensu-checks/
RUN npm install --production

redpajama_set_name: RedPajamaGithub


text:
package org.olat.commons.calendar.restapi;

import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.Response;

import org.olat.commons.calendar.CalendarUtils;
import org.olat.commons.calendar.model.KalendarEvent;
import org.olat.commons.calendar.ui.components.KalendarRenderWrapper;
import org.olat.core.util.i18n.I18nManager;
import org.olat.restapi.support.MediaTypeVariants;

/**
 *
 * Initial date: 08.08.2013<br>
 * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
 *
 */
public class CalendarWSHelper {

	protected static void transfer(EventVO event, KalendarEvent kalEvent) {
		kalEvent.setDescription(event.getDescription());
		kalEvent.setLocation(event.getLocation());
		kalEvent.setAllDayEvent(event.isAllDayEvent());
	}

	protected static boolean hasReadAccess(KalendarRenderWrapper wrapper) {
		if(wrapper.getAccess() == KalendarRenderWrapper.ACCESS_READ_ONLY) {
			return true;
		}
		if(wrapper.getAccess() == KalendarRenderWrapper.ACCESS_READ_WRITE) {
			return true;
		}
		return false;
	}

	protected static boolean hasWriteAccess(KalendarRenderWrapper wrapper) {
		if(wrapper.getAccess() == KalendarRenderWrapper.ACCESS_READ_WRITE) {
			return true;
		}
		return false;
	}

	protected static Response processEvents(List<EventVO> events, Boolean onlyFuture, int firstResult, int maxReturns,
			HttpServletRequest httpRequest, Request request) {

		if(onlyFuture != null && onlyFuture.booleanValue()) {
			Locale locale = I18nManager.getInstance().getCurrentThreadLocale();
			Calendar cal = CalendarUtils.getStartOfDayCalendar(locale);
			Date today = cal.getTime();

			for(Iterator<EventVO> eventIt=events.iterator(); eventIt.hasNext(); ) {
				EventVO event = eventIt.next();
				Date end = event.getEnd();
				if(end.before(today)) {
					eventIt.remove();
				}
			}
		}

		Collections.sort(events, new EventComparator());

		if(MediaTypeVariants.isPaged(httpRequest, request)) {
			int totalCount = events.size();
			if(maxReturns > 0 && firstResult >= 0) {
				if(firstResult >= events.size()) {
					events.clear();
				} else {
					int lastResult = Math.min(events.size(), firstResult + maxReturns);
					events = events.subList(firstResult, lastResult);
				}
			}

			EventVO[] voes = new EventVO[events.size()];
			voes = events.toArray(voes);
			EventVOes vos = new EventVOes();
			vos.setEvents(voes);
			vos.setTotalCount(totalCount);
			return Response.ok(vos).build();
		} else {
			EventVO[] voes = new EventVO[events.size()];
			voes = events.toArray(voes);
			return Response.ok(voes).build();
		}
	}

	private static class EventComparator implements Comparator<EventVO> {
		@Override
		public int compare(EventVO e1, EventVO e2) {
			if(e1 == null) {
				if(e2 == null) return 0;
				return -1;
			}
			if(e2 == null) return 1;

			Date d1 = e1.getBegin();
			Date d2 = e2.getBegin();
			if(d1 == null) {
				if(d2 == null) return 0;
				return -1;
			}
			if(d2 == null) return 1;
			return d1.compareTo(d2);
		}
	}

}


text:
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('common', '0017_auto_20210121_0943'),
        ('outdoor', '0022_orderedcoursechild'),
    ]

    operations = [
        migrations.AddField(
            model_name='site',
            name='managers',
            field=models.ManyToManyField(blank=True, to='common.Organism', verbose_name='Managers'),
        ),
    ]


text:
import {
  LIST_POST_RELOADED,
  LIST_POST_STARTED,
  LIST_POST_COMPLETED,
  LIST_POST_FAILED,
  MARK_AS_SPAM_STARTED,
  MARK_AS_SPAM_COMPLETED,
  MARK_AS_SPAM_FAILED
} from 'client/admin/constants/ActionTypes'
import { createReducer } from 'shared/utils/redux-utils'
import moment from 'moment'
import { merge } from 'lodash'

const initialState = {
  isFetching: false,
  errors: {},
  items: [],
  offset: 0,
  limit: 0,
  hasMore: true,
  start: null,
  end: null,
  count: null,
  spamCount: null,
  totalPages: null,
  currPage: null,
  done: true,
  keyword: null
}

export default createReducer(initialState, {
  [LIST_POST_RELOADED]: () => ({
    isFetching: false,
    errors: {},
    items: [],
    offset: 0,
    limit: 0,
    hasMore: true,
    start: null,
    end: null,
    count: null,
    spamCount: null,
    totalPages: null,
    currPage: null,
    keyword: null
  }),
  [LIST_POST_STARTED]: () => ({
    isFetching: true
  }),
  [LIST_POST_COMPLETED]: (state, action) => {
    let hasMore = false
    if (action.items.length === action.limit) {
      hasMore = true
    }
    const items = action.items
    const o = {
      errors: {},
      items: items,
      offset: state.offset + action.limit,
      limit: action.limit,
      hasMore: hasMore,
      start: action.start,
      end: action.end,
      isFetching: false,
      totalPages: Math.ceil(+action.count / +action.limit),
      currPage: Math.ceil(+(state.offset + action.limit) / +action.limit),
      done: true,
      keyword: action.keyword
    }
    if (action.status === 0) {
      return merge(o, { count: action.count, spamCount: null })
    } else {
      return merge(o, { spamCount: action.count })
    }
  },
  [LIST_POST_FAILED]: (state, action) =>
    ({ done: true, isFetching: false, errors: action.errors }),
  [MARK_AS_SPAM_STARTED]: () =>
    ({ done: false }),
  [MARK_AS_SPAM_COMPLETED]: (state, action) =>
    ({ done: false }),
  [MARK_AS_SPAM_FAILED]: (state, action) =>
    ({ done: false, errors: action.errors })
})


text:
<?php
function logincust_register_options_page() {
    add_theme_page(__('Login Customizer',LOGINCUST_TEXTDOMAIN), __('Login Customizer',LOGINCUST_TEXTDOMAIN), 'manage_options', 'logincust_options', 'logincust_options_page');
}
add_action('admin_menu', 'logincust_register_options_page');

function logincust_register_scripts(){
	if(!logincust_check_security()){
		wp_enqueue_style( 'customizer_disable_controls_css', LOGINCUST_FREE_URL . '/css/disable_controls.css',array(), LOGINCUST_VERSION, false );
	}
}
add_action('customize_controls_enqueue_scripts', 'logincust_register_scripts');

function logincust_options_page() {
	?>

<?php _e('Login Customizer', LOGINCUST_TEXTDOMAIN); ?>

<?php _e('Howdy!', LOGINCUST_TEXTDOMAIN); ?>

<?php _e('Login Customizer plugin allows you to easily customize your login page straight from your WordPress Customizer! You can preview your changes before you save them! Awesome, right?', LOGINCUST_TEXTDOMAIN); ?>

<?php _e('In Customizer, navigate to Login Customizer', LOGINCUST_TEXTDOMAIN); ?>.

    <a href="<?php echo get_admin_url(); ?>customize.php?url=<?php echo wp_login_url(); ?>" id="submit" class="button button-primary"><?php _e('Start Customizing!', LOGINCUST_TEXTDOMAIN); ?>

<?php _e('Credits/Support (All the unwanted crap)', LOGINCUST_TEXTDOMAIN); ?>

<?php _e('If you find any issues or if you want to contribute, then please free to drop me a mail at', LOGINCUST_TEXTDOMAIN); ?> <?php _e('this link', LOGINCUST_TEXTDOMAIN); ?>.

<?php _e('Thanks for using this plugin. Don not forget to leave a review.', LOGINCUST_TEXTDOMAIN); ?>

 <?php _e('ThemeIsle :)', LOGINCUST_TEXTDOMAIN); ?>.

<?php
}
?>


text:
using System;
using NetOffice;
using NetOffice.Attributes;
namespace NetOffice.VBIDEApi.Enums
{
	 /// <summary>
	 /// SupportByVersion VBIDE 12, 14, 5.3
	 /// </summary>
	[SupportByVersion("VBIDE", 12,14,5.3)]
	[EntityType(EntityType.IsEnum)]
	public enum vbext_WindowState
	{
		 /// <summary>
		 /// SupportByVersion VBIDE 12, 14, 5.3
		 /// </summary>
		 /// <remarks>0</remarks>
		 [SupportByVersion("VBIDE", 12,14,5.3)]
		 vbext_ws_Normal = 0,

		 /// <summary>
		 /// SupportByVersion VBIDE 12, 14, 5.3
		 /// </summary>
		 /// <remarks>1</remarks>
		 [SupportByVersion("VBIDE", 12,14,5.3)]
		 vbext_ws_Minimize = 1,

		 /// <summary>
		 /// SupportByVersion VBIDE 12, 14, 5.3
		 /// </summary>
		 /// <remarks>2</remarks>
		 [SupportByVersion("VBIDE", 12,14,5.3)]
		 vbext_ws_Maximize = 2
	}
}


text:
function BranchData() {
    this.position = -1;
    this.nodeLength = -1;
    this.src = null;
    this.evalFalse = 0;
    this.evalTrue = 0;

    this.init = function(position, nodeLength, src) {
        this.position = position;
        this.nodeLength = nodeLength;
        this.src = src;
        return this;
    }

    this.ranCondition = function(result) {
        if (result)
            this.evalTrue++;
        else
            this.evalFalse++;
    };

    this.pathsCovered = function() {
        var paths = 0;
        if (this.evalTrue > 0)
          paths++;
        if (this.evalFalse > 0)
          paths++;
        return paths;
    };

    this.covered = function() {
        return this.evalTrue > 0 && this.evalFalse > 0;
    };

    this.toJSON = function() {
        return '{"position":' + this.position
            + ',"nodeLength":' + this.nodeLength
            + ',"src":' + jscoverage_quote(this.src)
            + ',"evalFalse":' + this.evalFalse
            + ',"evalTrue":' + this.evalTrue + '}';
    };

    this.message = function() {
        if (this.evalTrue === 0 && this.evalFalse === 0)
            return 'Condition never evaluated         :\t' + this.src;
        else if (this.evalTrue === 0)
            return 'Condition never evaluated to true :\t' + this.src;
        else if (this.evalFalse === 0)
            return 'Condition never evaluated to false:\t' + this.src;
        else
            return 'Condition covered';
    };
}

BranchData.fromJson = function(jsonString) {
    var json = eval('(' + jsonString + ')');
    var branchData = new BranchData();
    branchData.init(json.position, json.nodeLength, json.src);
    branchData.evalFalse = json.evalFalse;
    branchData.evalTrue = json.evalTrue;
    return branchData;
};

BranchData.fromJsonObject = function(json) {
    var branchData = new BranchData();
    branchData.init(json.position, json.nodeLength, json.src);
    branchData.evalFalse = json.evalFalse;
    branchData.evalTrue = json.evalTrue;
    return branchData;
};

function buildBranchMessage(conditions) {
    var message = 'The following was not covered:';
    for (var i = 0; i < conditions.length; i++) {
        if (conditions[i] !== undefined && conditions[i] !== null && !conditions[i].covered())
          message += '\n- '+ conditions[i].message();
    }
    return message;
};

function convertBranchDataConditionArrayToJSON(branchDataConditionArray) {
    var array = [];
    var length = branchDataConditionArray.length;
    for (var condition = 0; condition < length; condition++) {
        var branchDataObject = branchDataConditionArray[condition];
        if (branchDataObject === undefined || branchDataObject === null) {
            value = 'null';
        } else {
            value = branchDataObject.toJSON();
        }
        array.push(value);
    }
    return '[' + array.join(',') + ']';
}

function convertBranchDataLinesToJSON(branchData) {
    if (branchData === undefined) {
        return '{}'
    }
    var json = '';
    for (var line in branchData) {
        if (json !== '')
            json += ','
        json += '"' + line + '":' + convertBranchDataConditionArrayToJSON(branchData[line]);
    }
    return '{' + json + '}';
}

function convertBranchDataLinesFromJSON(jsonObject) {
    if (jsonObject === undefined) {
        return {};
    }
    for (var line in jsonObject) {
        var branchDataJSON = jsonObject[line];
        if (branchDataJSON !== null) {
            for (var conditionIndex = 0; conditionIndex < branchDataJSON.length; conditionIndex ++) {
                var condition = branchDataJSON[conditionIndex];
                if (condition !== null) {
                    branchDataJSON[conditionIndex] = BranchData.fromJsonObject(condition);
                }
            }
        }
    }
    return jsonObject;
}
function jscoverage_quote(s) {
    return '"' + s.replace(/[\u0000-\u001f"\\\u007f-\uffff]/g, function (c) {
        switch (c) {
            case '\b':
                return '\\b';
            case '\f':
                return '\\f';
            case '\n':
                return '\\n';
            case '\r':
                return '\\r';
            case '\t':
                return '\\t';
            // IE doesn't support this
            /*
             case '\v':
             return '\\v';
             */
            case '"':
                return '\\"';
            case '\\':
                return '\\\\';
            default:
                return '\\u' + jscoverage_pad(c.charCodeAt(0).toString(16));
        }
    }) + '"';
}

function getArrayJSON(coverage) {
    var array = [];
    if (coverage === undefined)
        return array;

    var length = coverage.length;
    for (var line = 0; line < length; line++) {
        var value = coverage[line];
        if (value === undefined || value === null) {
            value = 'null';
        }
        array.push(value);
    }
    return array;
}

function jscoverage_serializeCoverageToJSON() {
    var json = [];
    for (var file in _$jscoverage) {
        var lineArray = getArrayJSON(_$jscoverage[file].lineData);
        var fnArray = getArrayJSON(_$jscoverage[file].functionData);

        json.push(jscoverage_quote(file) + ':{"lineData":[' + lineArray.join(',') + '],"functionData":[' + fnArray.join(',') + '],"branchData":' + convertBranchDataLinesToJSON(_$jscoverage[file].branchData) + '}');
    }
    return '{' + json.join(',') + '}';
}

function jscoverage_pad(s) {
    return '0000'.substr(s.length) + s;
}

function jscoverage_html_escape(s) {
    return s.replace(/[<>\&\"\']/g, function (c) {
        return '&#' + c.charCodeAt(0) + ';';
    });
}
try {
  if (typeof top === 'object' && top !== null && typeof top.opener === 'object' && top.opener !== null) {
    // this is a browser window that was opened from another window

    if (! top.opener._$jscoverage) {
      top.opener._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null) {
    // this is a browser window

    try {
      if (typeof top.opener === 'object' && top.opener !== null && top.opener._$jscoverage) {
        top._$jscoverage = top.opener._$jscoverage;
      }
    }
    catch (e) {}

    if (! top._$jscoverage) {
      top._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null && top._$jscoverage) {
    this._$jscoverage = top._$jscoverage;
  }
}
catch (e) {}
if (! this._$jscoverage) {
  this._$jscoverage = {};
}
if (! _$jscoverage['/custom/target.js']) {
  _$jscoverage['/custom/target.js'] = {};
  _$jscoverage['/custom/target.js'].lineData = [];
  _$jscoverage['/custom/target.js'].lineData[6] = 0;
  _$jscoverage['/custom/target.js'].lineData[7] = 0;
  _$jscoverage['/custom/target.js'].lineData[8] = 0;
  _$jscoverage['/custom/target.js'].lineData[10] = 0;
  _$jscoverage['/custom/target.js'].lineData[38] = 0;
  _$jscoverage['/custom/target.js'].lineData[40] = 0;
  _$jscoverage['/custom/target.js'].lineData[51] = 0;
  _$jscoverage['/custom/target.js'].lineData[54] = 0;
  _$jscoverage['/custom/target.js'].lineData[55] = 0;
  _$jscoverage['/custom/target.js'].lineData[56] = 0;
  _$jscoverage['/custom/target.js'].lineData[61] = 0;
  _$jscoverage['/custom/target.js'].lineData[74] = 0;
  _$jscoverage['/custom/target.js'].lineData[79] = 0;
  _$jscoverage['/custom/target.js'].lineData[81] = 0;
  _$jscoverage['/custom/target.js'].lineData[83] = 0;
  _$jscoverage['/custom/target.js'].lineData[85] = 0;
  _$jscoverage['/custom/target.js'].lineData[87] = 0;
  _$jscoverage['/custom/target.js'].lineData[91] = 0;
  _$jscoverage['/custom/target.js'].lineData[94] = 0;
  _$jscoverage['/custom/target.js'].lineData[95] = 0;
  _$jscoverage['/custom/target.js'].lineData[98] = 0;
  _$jscoverage['/custom/target.js'].lineData[100] = 0;
  _$jscoverage['/custom/target.js'].lineData[102] = 0;
  _$jscoverage['/custom/target.js'].lineData[103] = 0;
  _$jscoverage['/custom/target.js'].lineData[111] = 0;
  _$jscoverage['/custom/target.js'].lineData[117] = 0;
  _$jscoverage['/custom/target.js'].lineData[119] = 0;
  _$jscoverage['/custom/target.js'].lineData[120] = 0;
  _$jscoverage['/custom/target.js'].lineData[125] = 0;
  _$jscoverage['/custom/target.js'].lineData[138] = 0;
  _$jscoverage['/custom/target.js'].lineData[141] = 0;
  _$jscoverage['/custom/target.js'].lineData[142] = 0;
  _$jscoverage['/custom/target.js'].lineData[143] = 0;
  _$jscoverage['/custom/target.js'].lineData[146] = 0;
  _$jscoverage['/custom/target.js'].lineData[156] = 0;
  _$jscoverage['/custom/target.js'].lineData[158] = 0;
  _$jscoverage['/custom/target.js'].lineData[159] = 0;
  _$jscoverage['/custom/target.js'].lineData[161] = 0;
  _$jscoverage['/custom/target.js'].lineData[171] = 0;
  _$jscoverage['/custom/target.js'].lineData[174] = 0;
  _$jscoverage['/custom/target.js'].lineData[175] = 0;
  _$jscoverage['/custom/target.js'].lineData[177] = 0;
  _$jscoverage['/custom/target.js'].lineData[186] = 0;
  _$jscoverage['/custom/target.js'].lineData[190] = 0;
  _$jscoverage['/custom/target.js'].lineData[202] = 0;
  _$jscoverage['/custom/target.js'].lineData[203] = 0;
  _$jscoverage['/custom/target.js'].lineData[204] = 0;
  _$jscoverage['/custom/target.js'].lineData[206] = 0;
  _$jscoverage['/custom/target.js'].lineData[207] = 0;
  _$jscoverage['/custom/target.js'].lineData[208] = 0;
  _$jscoverage['/custom/target.js'].lineData[209] = 0;
  _$jscoverage['/custom/target.js'].lineData[212] = 0;
  _$jscoverage['/custom/target.js'].lineData[224] = 0;
  _$jscoverage['/custom/target.js'].lineData[225] = 0;
  _$jscoverage['/custom/target.js'].lineData[226] = 0;
  _$jscoverage['/custom/target.js'].lineData[229] = 0;
  _$jscoverage['/custom/target.js'].lineData[230] = 0;
  _$jscoverage['/custom/target.js'].lineData[231] = 0;
  _$jscoverage['/custom/target.js'].lineData[232] = 0;
  _$jscoverage['/custom/target.js'].lineData[233] = 0;
  _$jscoverage['/custom/target.js'].lineData[236] = 0;
  _$jscoverage['/custom/target.js'].lineData[237] = 0;
  _$jscoverage['/custom/target.js'].lineData[238] = 0;
  _$jscoverage['/custom/target.js'].lineData[243] = 0;
}
if (! _$jscoverage['/custom/target.js'].functionData) {
  _$jscoverage['/custom/target.js'].functionData = [];
  _$jscoverage['/custom/target.js'].functionData[0] = 0;
  _$jscoverage['/custom/target.js'].functionData[1] = 0;
  _$jscoverage['/custom/target.js'].functionData[2] = 0;
  _$jscoverage['/custom/target.js'].functionData[3] = 0;
  _$jscoverage['/custom/target.js'].functionData[4] = 0;
  _$jscoverage['/custom/target.js'].functionData[5] = 0;
  _$jscoverage['/custom/target.js'].functionData[6] = 0;
  _$jscoverage['/custom/target.js'].functionData[7] = 0;
  _$jscoverage['/custom/target.js'].functionData[8] = 0;
  _$jscoverage['/custom/target.js'].functionData[9] = 0;
  _$jscoverage['/custom/target.js'].functionData[10] = 0;
  _$jscoverage['/custom/target.js'].functionData[11] = 0;
  _$jscoverage['/custom/target.js'].functionData[12] = 0;
  _$jscoverage['/custom/target.js'].functionData[13] = 0;
  _$jscoverage['/custom/target.js'].functionData[14] = 0;
}
if (! _$jscoverage['/custom/target.js'].branchData) {
  _$jscoverage['/custom/target.js'].branchData = {};
  _$jscoverage['/custom/target.js'].branchData['54'] = [];
  _$jscoverage['/custom/target.js'].branchData['54'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['55'] = [];
  _$jscoverage['/custom/target.js'].branchData['55'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['77'] = [];
  _$jscoverage['/custom/target.js'].branchData['77'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['79'] = [];
  _$jscoverage['/custom/target.js'].branchData['79'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['94'] = [];
  _$jscoverage['/custom/target.js'].branchData['94'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['98'] = [];
  _$jscoverage['/custom/target.js'].branchData['98'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['100'] = [];
  _$jscoverage['/custom/target.js'].branchData['100'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['102'] = [];
  _$jscoverage['/custom/target.js'].branchData['102'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['102'][2] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['119'] = [];
  _$jscoverage['/custom/target.js'].branchData['119'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['119'][2] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['119'][3] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['158'] = [];
  _$jscoverage['/custom/target.js'].branchData['158'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['174'] = [];
  _$jscoverage['/custom/target.js'].branchData['174'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['186'] = [];
  _$jscoverage['/custom/target.js'].branchData['186'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['190'] = [];
  _$jscoverage['/custom/target.js'].branchData['190'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['208'] = [];
  _$jscoverage['/custom/target.js'].branchData['208'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['230'] = [];
  _$jscoverage['/custom/target.js'].branchData['230'][1] = new BranchData();
  _$jscoverage['/custom/target.js'].branchData['232'] = [];
  _$jscoverage['/custom/target.js'].branchData['232'][1] = new BranchData();
}
_$jscoverage['/custom/target.js'].branchData['232'][1].init(102, 11, 'customEvent');
function visit56_232_1(result) {
  _$jscoverage['/custom/target.js'].branchData['232'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['230'][1].init(188, 4, 'type');
function visit55_230_1(result) {
  _$jscoverage['/custom/target.js'].branchData['230'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['208'][1].init(227, 11, 'customEvent');
function visit54_208_1(result) {
  _$jscoverage['/custom/target.js'].branchData['208'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['190'][1].init(20, 55, 'this[KS_CUSTOM_EVENTS] || (this[KS_CUSTOM_EVENTS] = {})');
function visit53_190_1(result) {
  _$jscoverage['/custom/target.js'].branchData['190'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['186'][1].init(20, 57, 'this[KS_BUBBLE_TARGETS] || (this[KS_BUBBLE_TARGETS] = [])');
function visit52_186_1(result) {
  _$jscoverage['/custom/target.js'].branchData['186'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['174'][1].init(150, 12, 'index !== -1');
function visit51_174_1(result) {
  _$jscoverage['/custom/target.js'].branchData['174'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['158'][1].init(91, 34, '!S.inArray(anotherTarget, targets)');
function visit50_158_1(result) {
  _$jscoverage['/custom/target.js'].branchData['158'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['119'][3].init(1314, 16, 'r2 !== undefined');
function visit49_119_3(result) {
  _$jscoverage['/custom/target.js'].branchData['119'][3].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['119'][2].init(1297, 13, 'ret !== false');
function visit48_119_2(result) {
  _$jscoverage['/custom/target.js'].branchData['119'][2].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['119'][1].init(1297, 33, 'ret !== false && r2 !== undefined');
function visit47_119_1(result) {
  _$jscoverage['/custom/target.js'].branchData['119'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['102'][2].init(30, 44, 'customEventObservable.bubbles && !hasTargets');
function visit46_102_2(result) {
  _$jscoverage['/custom/target.js'].branchData['102'][2].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['102'][1].init(30, 78, 'customEventObservable.bubbles && !hasTargets || !customEventObservable.bubbles');
function visit45_102_1(result) {
  _$jscoverage['/custom/target.js'].branchData['102'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['100'][1].init(26, 72, '!customEventObservable.hasObserver() && !customEventObservable.defaultFn');
function visit44_100_1(result) {
  _$jscoverage['/custom/target.js'].branchData['100'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['98'][1].init(542, 21, 'customEventObservable');
function visit43_98_1(result) {
  _$jscoverage['/custom/target.js'].branchData['98'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['94'][1].init(434, 37, '!customEventObservable && !hasTargets');
function visit42_94_1(result) {
  _$jscoverage['/custom/target.js'].branchData['94'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['79'][1].init(177, 15, 'eventData || {}');
function visit41_79_1(result) {
  _$jscoverage['/custom/target.js'].branchData['79'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['77'][1].init(111, 25, 'targets && targets.length');
function visit40_77_1(result) {
  _$jscoverage['/custom/target.js'].branchData['77'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['55'][1].init(226, 22, '!customEvent && create');
function visit39_55_1(result) {
  _$jscoverage['/custom/target.js'].branchData['55'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].branchData['54'][1].init(154, 54, 'customEventObservables && customEventObservables[type]');
function visit38_54_1(result) {
  _$jscoverage['/custom/target.js'].branchData['54'][1].ranCondition(result);
  return result;
}_$jscoverage['/custom/target.js'].lineData[6]++;
KISSY.add(function(S, require) {
  _$jscoverage['/custom/target.js'].functionData[0]++;
  _$jscoverage['/custom/target.js'].lineData[7]++;
  var BaseEvent = require('event/base');
  _$jscoverage['/custom/target.js'].lineData[8]++;
  var CustomEventObservable = require('./observable');
  _$jscoverage['/custom/target.js'].lineData[10]++;
  var Utils = BaseEvent.Utils, splitAndRun = Utils.splitAndRun, KS_BUBBLE_TARGETS = '__~ks_bubble_targets';
  _$jscoverage['/custom/target.js'].lineData[38]++;
  var KS_CUSTOM_EVENTS = '__~ks_custom_events';
  _$jscoverage['/custom/target.js'].lineData[40]++;
  return {
  isTarget: 1,
  getCustomEventObservable: function(type, create) {
  _$jscoverage['/custom/target.js'].functionData[1]++;
  _$jscoverage['/custom/target.js'].lineData[51]++;
  var target = this, customEvent, customEventObservables = target.getCustomEvents();
  _$jscoverage['/custom/target.js'].lineData[54]++;
  customEvent = visit38_54_1(customEventObservables && customEventObservables[type]);
  _$jscoverage['/custom/target.js'].lineData[55]++;
  if (visit39_55_1(!customEvent && create)) {
    _$jscoverage['/custom/target.js'].lineData[56]++;
    customEvent = customEventObservables[type] = new CustomEventObservable({
  currentTarget: target,
  type: type});
  }
  _$jscoverage['/custom/target.js'].lineData[61]++;
  return customEvent;
},
  fire: function(type, eventData) {
  _$jscoverage['/custom/target.js'].functionData[2]++;
  _$jscoverage['/custom/target.js'].lineData[74]++;
  var self = this, ret, targets = self.getTargets(), hasTargets = visit40_77_1(targets && targets.length);
  _$jscoverage['/custom/target.js'].lineData[79]++;
  eventData = visit41_79_1(eventData || {});
  _$jscoverage['/custom/target.js'].lineData[81]++;
  splitAndRun(type, function(type) {
  _$jscoverage['/custom/target.js'].functionData[3]++;
  _$jscoverage['/custom/target.js'].lineData[83]++;
  var r2, customEventObservable;
  _$jscoverage['/custom/target.js'].lineData[85]++;
  Utils.fillGroupsForEvent(type, eventData);
  _$jscoverage['/custom/target.js'].lineData[87]++;
  type = eventData.type;
  _$jscoverage['/custom/target.js'].lineData[91]++;
  customEventObservable = self.getCustomEventObservable(type);
  _$jscoverage['/custom/target.js'].lineData[94]++;
  if (visit42_94_1(!customEventObservable && !hasTargets)) {
    _$jscoverage['/custom/target.js'].lineData[95]++;
    return;
  }
  _$jscoverage['/custom/target.js'].lineData[98]++;
  if (visit43_98_1(customEventObservable)) {
    _$jscoverage['/custom/target.js'].lineData[100]++;
    if (visit44_100_1(!customEventObservable.hasObserver() && !customEventObservable.defaultFn)) {
      _$jscoverage['/custom/target.js'].lineData[102]++;
      if (visit45_102_1(visit46_102_2(customEventObservable.bubbles && !hasTargets) || !customEventObservable.bubbles)) {
        _$jscoverage['/custom/target.js'].lineData[103]++;
        return;
      }
    }
  } else {
    _$jscoverage['/custom/target.js'].lineData[111]++;
    customEventObservable = new CustomEventObservable({
  currentTarget: self,
  type: type});
  }
  _$jscoverage['/custom/target.js'].lineData[117]++;
  r2 = customEventObservable.fire(eventData);
  _$jscoverage['/custom/target.js'].lineData[119]++;
  if (visit47_119_1(visit48_119_2(ret !== false) && visit49_119_3(r2 !== undefined))) {
    _$jscoverage['/custom/target.js'].lineData[120]++;
    ret = r2;
  }
});
  _$jscoverage['/custom/target.js'].lineData[125]++;
  return ret;
},
  publish: function(type, cfg) {
  _$jscoverage['/custom/target.js'].functionData[4]++;
  _$jscoverage['/custom/target.js'].lineData[138]++;
  var customEventObservable, self = this;
  _$jscoverage['/custom/target.js'].lineData[141]++;
  splitAndRun(type, function(t) {
  _$jscoverage['/custom/target.js'].functionData[5]++;
  _$jscoverage['/custom/target.js'].lineData[142]++;
  customEventObservable = self.getCustomEventObservable(t, true);
  _$jscoverage['/custom/target.js'].lineData[143]++;
  S.mix(customEventObservable, cfg);
});
  _$jscoverage['/custom/target.js'].lineData[146]++;
  return self;
},
  addTarget: function(anotherTarget) {
  _$jscoverage['/custom/target.js'].functionData[6]++;
  _$jscoverage['/custom/target.js'].lineData[156]++;
  var self = this, targets = self.getTargets();
  _$jscoverage['/custom/target.js'].lineData[158]++;
  if (visit50_158_1(!S.inArray(anotherTarget, targets))) {
    _$jscoverage['/custom/target.js'].lineData[159]++;
    targets.push(anotherTarget);
  }
  _$jscoverage['/custom/target.js'].lineData[161]++;
  return self;
},
  removeTarget: function(anotherTarget) {
  _$jscoverage['/custom/target.js'].functionData[7]++;
  _$jscoverage['/custom/target.js'].lineData[171]++;
  var self = this, targets = self.getTargets(), index = S.indexOf(anotherTarget, targets);
  _$jscoverage['/custom/target.js'].lineData[174]++;
  if (visit51_174_1(index !== -1)) {
    _$jscoverage['/custom/target.js'].lineData[175]++;
    targets.splice(index, 1);
  }
  _$jscoverage['/custom/target.js'].lineData[177]++;
  return self;
},
  getTargets: function() {
  _$jscoverage['/custom/target.js'].functionData[8]++;
  _$jscoverage['/custom/target.js'].lineData[186]++;
  return visit52_186_1(this[KS_BUBBLE_TARGETS] || (this[KS_BUBBLE_TARGETS] = []));
},
  getCustomEvents: function() {
  _$jscoverage['/custom/target.js'].functionData[9]++;
  _$jscoverage['/custom/target.js'].lineData[190]++;
  return visit53_190_1(this[KS_CUSTOM_EVENTS] || (this[KS_CUSTOM_EVENTS] = {}));
},
  on: function(type, fn, context) {
  _$jscoverage['/custom/target.js'].functionData[10]++;
  _$jscoverage['/custom/target.js'].lineData[202]++;
  var self = this;
  _$jscoverage['/custom/target.js'].lineData[203]++;
  Utils.batchForType(function(type, fn, context) {
  _$jscoverage['/custom/target.js'].functionData[11]++;
  _$jscoverage['/custom/target.js'].lineData[204]++;
  var cfg = Utils.normalizeParam(type, fn, context), customEvent;
  _$jscoverage['/custom/target.js'].lineData[206]++;
  type = cfg.type;
  _$jscoverage['/custom/target.js'].lineData[207]++;
  customEvent = self.getCustomEventObservable(type, true);
  _$jscoverage['/custom/target.js'].lineData[208]++;
  if (visit54_208_1(customEvent)) {
    _$jscoverage['/custom/target.js'].lineData[209]++;
    customEvent.on(cfg);
  }
}, 0, type, fn, context);
  _$jscoverage['/custom/target.js'].lineData[212]++;
  return self;
},
  detach: function(type, fn, context) {
  _$jscoverage['/custom/target.js'].functionData[12]++;
  _$jscoverage['/custom/target.js'].lineData[224]++;
  var self = this;
  _$jscoverage['/custom/target.js'].lineData[225]++;
  Utils.batchForType(function(type, fn, context) {
  _$jscoverage['/custom/target.js'].functionData[13]++;
  _$jscoverage['/custom/target.js'].lineData[226]++;
  var cfg = Utils.normalizeParam(type, fn, context), customEvents, customEvent;
  _$jscoverage['/custom/target.js'].lineData[229]++;
  type = cfg.type;
  _$jscoverage['/custom/target.js'].lineData[230]++;
  if (visit55_230_1(type)) {
    _$jscoverage['/custom/target.js'].lineData[231]++;
    customEvent = self.getCustomEventObservable(type, true);
    _$jscoverage['/custom/target.js'].lineData[232]++;
    if (visit56_232_1(customEvent)) {
      _$jscoverage['/custom/target.js'].lineData[233]++;
      customEvent.detach(cfg);
    }
  } else {
    _$jscoverage['/custom/target.js'].lineData[236]++;
    customEvents = self.getCustomEvents();
    _$jscoverage['/custom/target.js'].lineData[237]++;
    S.each(customEvents, function(customEvent) {
  _$jscoverage['/custom/target.js'].functionData[14]++;
  _$jscoverage['/custom/target.js'].lineData[238]++;
  customEvent.detach(cfg);
});
  }
}, 0, type, fn, context);
  _$jscoverage['/custom/target.js'].lineData[243]++;
  return self;
}};
});


text:
categories:
- tumblr
- archive
- photo
date: 2010-11-12T05:54:59Z
plugin: lightense
title: Photo 20101112
url: /2010/11/12/photo-20101112/
---

We put out Joel Silbersher's record [Greasy Lens]. Great record. Got really good press, had videos on Rage, and he was doing shows - couldn't sell enough to make the cost back. We sold maybe 100 copies within the first six months, and then after that a record's dead, to a point … I did everything I thought that you needed to do, and it wasn't enough, so I don't think I know what to do. (via Mick Turner: Part 2 : Mess+Noise)


text:
require "spec_helper"

describe "Pixelator Routing" do

  it "should route pixelator/data" do
    assert_routing({ path: "pixelator/data", method: :get},
                   { controller: "pixelator", action: "data" }
    )
  end

end


text:
#ifndef Timer_h
#define Timer_h

#include <wtf/Noncopyable.h>
#include <wtf/Threading.h>

namespace WebCore {

// Time intervals are all in seconds.

class TimerHeapElement;

class TimerBase {
    WTF_MAKE_NONCOPYABLE(TimerBase); WTF_MAKE_FAST_ALLOCATED;
public:
    TimerBase();
    virtual ~TimerBase();

    void start(double nextFireInterval, double repeatInterval);

    void startRepeating(double repeatInterval) { start(repeatInterval, repeatInterval); }
    void startOneShot(double interval) { start(interval, 0); }

    void stop();
    bool isActive() const;

    double nextFireInterval() const;
    double nextUnalignedFireInterval() const;
    double repeatInterval() const { return m_repeatInterval; }

    void augmentFireInterval(double delta) { setNextFireTime(m_nextFireTime + delta); }
    void augmentRepeatInterval(double delta) { augmentFireInterval(delta); m_repeatInterval += delta; }

    void didChangeAlignmentInterval();

    static void fireTimersInNestedEventLoop();

private:
    virtual void fired() = 0;

    virtual double alignedFireTime(double fireTime) const { return fireTime; }

    void checkConsistency() const;
    void checkHeapIndex() const;

    void setNextFireTime(double);

    bool inHeap() const { return m_heapIndex != -1; }

    void heapDecreaseKey();
    void heapDelete();
    void heapDeleteMin();
    void heapIncreaseKey();
    void heapInsert();
    void heapPop();
    void heapPopMin();

    double m_nextFireTime; // 0 if inactive
    double m_unalignedNextFireTime; // m_nextFireTime not considering alignment interval
    double m_repeatInterval; // 0 if not repeating
    int m_heapIndex; // -1 if not in heap
    unsigned m_heapInsertionOrder; // Used to keep order among equal-fire-time timers

#ifndef NDEBUG
    ThreadIdentifier m_thread;
#endif

    friend class ThreadTimers;
    friend class TimerHeapLessThanFunction;
    friend class TimerHeapReference;
};

template <typename TimerFiredClass> class Timer : public TimerBase {
public:
    typedef void (TimerFiredClass::*TimerFiredFunction)(Timer*);

    Timer(TimerFiredClass* o, TimerFiredFunction f)
        : m_object(o), m_function(f) { }

private:
    virtual void fired() { (m_object->*m_function)(this); }

    TimerFiredClass* m_object;
    TimerFiredFunction m_function;
};

inline bool TimerBase::isActive() const
{
    ASSERT(m_thread == currentThread());
    return m_nextFireTime;
}

template <typename TimerFiredClass> class DeferrableOneShotTimer : private TimerBase {
public:
    typedef void (TimerFiredClass::*TimerFiredFunction)(DeferrableOneShotTimer*);

    DeferrableOneShotTimer(TimerFiredClass* o, TimerFiredFunction f, double delay)
        : m_object(o)
        , m_function(f)
        , m_delay(delay)
        , m_shouldRestartWhenTimerFires(false)
    {
    }

    void restart()
    {
        // Setting this boolean is much more efficient than calling startOneShot
        // again, which might result in rescheduling the system timer which
        // can be quite expensive.

        if (isActive()) {
            m_shouldRestartWhenTimerFires = true;
            return;
        }
        startOneShot(m_delay);
    }

    void setDelay(double delay)
    {
        m_delay = delay;
        if (isActive()) {
            stop();
            restart();
        }
    }

    double delay() const { return m_delay; }

    using TimerBase::stop;
    using TimerBase::isActive;
private:
    virtual void fired()
    {
        if (m_shouldRestartWhenTimerFires) {
            m_shouldRestartWhenTimerFires = false;
            startOneShot(m_delay);
            return;
        }

        (m_object->*m_function)(this);
    }

    TimerFiredClass* m_object;
    TimerFiredFunction m_function;

    double m_delay;
    bool m_shouldRestartWhenTimerFires;
};

}

#endif


text:
package com.google.api.ads.adwords.jaxws.v201402.video;

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

/**
 *
 *             A key for referencing approval statuses for sub-components of this ad.
 *
 *
 *
Java class for ApprovalContext complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="ApprovalContext">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="targetingScope" type="{https://adwords.google.com/api/adwords/video/v201402}TargetingScope" minOccurs="0"/>
 *         <element name="destinationType" type="{https://adwords.google.com/api/adwords/video/v201402}DestinationType" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ApprovalContext", propOrder = {
    "targetingScope",
    "destinationType"
})
public class ApprovalContext {

    protected TargetingScope targetingScope;
    protected DestinationType destinationType;

    /**
     * Gets the value of the targetingScope property.
     *
     * @return
     *     possible object is
     *     {@link TargetingScope }
     *
     */
    public TargetingScope getTargetingScope() {
        return targetingScope;
    }

    /**
     * Sets the value of the targetingScope property.
     *
     * @param value
     *     allowed object is
     *     {@link TargetingScope }
     *
     */
    public void setTargetingScope(TargetingScope value) {
        this.targetingScope = value;
    }

    /**
     * Gets the value of the destinationType property.
     *
     * @return
     *     possible object is
     *     {@link DestinationType }
     *
     */
    public DestinationType getDestinationType() {
        return destinationType;
    }

    /**
     * Sets the value of the destinationType property.
     *
     * @param value
     *     allowed object is
     *     {@link DestinationType }
     *
     */
    public void setDestinationType(DestinationType value) {
        this.destinationType = value;
    }

}


text:
package com.evolveum.midpoint.prism.impl;

import com.evolveum.midpoint.prism.SerializationContext;
import com.evolveum.midpoint.prism.impl.xnode.RootXNodeImpl;
import com.evolveum.midpoint.util.exception.SchemaException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.w3c.dom.Element;

import javax.xml.namespace.QName;
import java.util.List;

/**
 * @author mederly
 */
public class SerializerDomTarget extends SerializerTarget<Element> {

    public SerializerDomTarget(@NotNull PrismContextImpl prismContext) {
        super(prismContext);
    }

    @Override
    @NotNull
    public Element write(@NotNull RootXNodeImpl xroot, SerializationContext context) throws SchemaException {
        return prismContext.getLexicalProcessorRegistry().domProcessor().writeXRootToElement(xroot);
    }

    @NotNull
    @Override
    public Element write(@NotNull List<RootXNodeImpl> roots, @Nullable QName aggregateElementName, @Nullable SerializationContext context)
            throws SchemaException {
        return prismContext.getLexicalProcessorRegistry().domProcessor().writeXRootListToElement(roots, aggregateElementName);
    }
}


text:
SYNONYM

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

#### Published in
Dendrologie 2(1):493. 1872, pro syn.

#### Original name
null

### Remarks
null


text:
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    // Do not close after config window is close
    QApplication::setQuitOnLastWindowClosed(false);

    Tray *tray = new Tray();
    tray->show();

    return a.exec();
}


text:
module Pris
  module Halebop
    class CountryCodes
      def initialize(country_data)
        @name_map = {}
        @code_map = {}
        build_data(country_data)
      end

      def code_for(country)
        name_map[country]
      end

      def country_for(code)
        code_map[code]
      end

      private

      attr_reader :name_map, :code_map

      def build_data(data)
        data.each do |country_data|
          original_name = country_data['swedishCountryNames']
          country_code = country_code(country_data["countrycode"])
          name_map[original_name] = country_code
          code_map[country_code] = original_name
        end
      end

      def country_code(code)
        "country#{code}"
      end
    end
  end
end


text:
React		= require('react/addons');
TestUtils	= React.addons.TestUtils;
ReactTabs	= require('../lib/main');
Tab			= ReactTabs.Tab;
Tabs		= ReactTabs.Tabs;
TabList		= ReactTabs.TabList;
TabPanel	= ReactTabs.TabPanel;


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Tremella damicornis Möller, 1895

### Remarks
null


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.apache.archiva</groupId>
    <artifactId>archiva-base</artifactId>
    <version>2.2.2-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>archiva-filelock</artifactId>
  <packaging>bundle</packaging>
  <name>Archiva Base :: FileLock</name>
  <dependencies>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-jcl</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.googlecode.multithreadedtc</groupId>
      <artifactId>multithreadedtc</artifactId>
      <version>1.01</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>org.apache.archiva.common</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Export-Package>
              org.apache.archiva.common*;version=${project.version}
            </Export-Package>
            <Import-Package>
              org.slf4j,
              org.springframework.stereotype,
              org.springframework.util,
              org.apache.commons.lang.time
            </Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <!-- jvm holds lock on file so use a new one per test -->
          <reuseForks>false</reuseForks>
          <systemPropertyVariables>
            <buildDirectory>${project.build.directory}</buildDirectory>
            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <configuration>
            <excludes>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>


text:
<!--
   This file is part of the X12Parser library that provides tools to
   manipulate X12 messages using Ruby native syntax.

   http://x12parser.rubyforge.org

   Copyright (C) 2009 APP Design, Inc.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

   $Id: T689.xml 78 2009-05-12 22:27:26Z ikk $
-->

<Table name="T689">
  <Entry name="01" value="Vacant"/>
  <Entry name="02" value="Occupied"/>
  <Entry name="03" value="Borrower Occupied"/>
  <Entry name="04" value="Tenant Occupied"/>
  <Entry name="05" value="Adverse Occupied"/>
  <Entry name="06" value="Unknown"/>
  <Entry name="07" value="Original Veteran Occupied"/>
  <Entry name="08" value="Transferee Occupied"/>
  <Entry name="09" value="Unoccupied"/>
  <Entry name="10" value="Abandoned"/>
  <Entry name="11" value="Condemned"/>
  <Entry name="12" value="Under Construction"/>
  <Entry name="13" value="Temporary Residence"/>
  <Entry name="14" value="Partially Occupied"/>
  <Entry name="15" value="Owner Occupied, Primary Residence"/>
  <Entry name="16" value="Owner Occupied, Secondary Residence"/>
  <Entry name="17" value="Owner Occupied"/>
</Table>


text:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity name="ReferenciaFamiliar" table="referencia_familiar">
    <indexes>
      <index name="proporciona_fk" columns="idcliente"/>
    </indexes>
    <unique-constraints>
      <unique-constraint name="referencia_familiar_pk" columns="id"/>
    </unique-constraints>
    <id name="id" type="integer" column="id">
      <generator strategy="SEQUENCE"/>
    </id>
    <field name="nombrereffamiliar" type="string" column="nombrereffamiliar" length="75" nullable="false"/>
    <field name="parentescoreffamiliar" type="string" column="parentescoreffamiliar" length="15" nullable="false"/>
    <field name="direccionreffamiliar" type="string" column="direccionreffamiliar" length="50" nullable="false"/>
    <field name="telefonoreffamiliar" type="string" column="telefonoreffamiliar" nullable="false"/>
    <many-to-one field="idcliente" target-entity="Cliente">
      <join-columns>
        <join-column name="idcliente" referenced-column-name="id"/>
      </join-columns>
    </many-to-one>
  </entity>
</doctrine-mapping>


text:
package org.microbule.gson.provider;

import com.google.gson.JsonSyntaxException;
import org.microbule.util.exception.MicrobuleException;

public class JsonRequestParsingException extends MicrobuleException {
//----------------------------------------------------------------------------------------------------------------------
// Constructors
//----------------------------------------------------------------------------------------------------------------------

    public JsonRequestParsingException(JsonSyntaxException e) {
        super(e, e.getMessage());
    }
}


text:
import expectjs            from 'expect.js';
import Web3                from 'web3';
import aliases             from 'aliases';
import path                from 'path';
import fs                  from 'fs';
import crypto              from 'crypto';
import solc                from 'solc';
import _                   from 'lodash';
import {Market,market,Vendor,vendor,Subn,subn,Node,node,contracts,CMKT} from '../index';

const warn = console.warn;
const defaultProvider = 'http://localhost:8545';

const appRoot        = path.join(__dirname,'..');
const maxUsers       = 2;
const price          = 20000;

const context = () => ({
    Market,
    market,
    Vendor,
    vendor,
    Subn,
    subn,
    Node,
    node,
    contracts,
    CMKT,
    expectjs,
    Web3,
    aliases,
    warn,
    path,
    defaultProvider,
    maxUsers,
    price,
    crypto,
    solc,
    _
});

export default context;


text:
namespace MWEB {

/// <summary>
/// A convenience wrapper around a possibly-null extension block.
/// </summary>
struct Block {
    mw::Block::CPtr m_block;

    Block() = default;
    Block(const mw::Block::CPtr& block)
        : m_block(block) {}

    CAmount GetTotalFee() const noexcept
    {
        return IsNull() ? 0 : m_block->GetTotalFee();
    }

    CAmount GetSupplyChange() const noexcept
    {
        return IsNull() ? 0 : m_block->GetSupplyChange();
    }

    mw::Hash GetHash() const noexcept
    {
        return IsNull() ? mw::Hash{} : m_block->GetHeader()->GetHash();
    }

    mw::Header::CPtr GetMWEBHeader() const noexcept
    {
        return IsNull() ? mw::Header::CPtr{nullptr} : m_block->GetHeader();
    }

    int32_t GetHeight() const noexcept
    {
        return IsNull() ? -1 : m_block->GetHeight();
    }

    std::vector<mw::Hash> GetSpentIDs() const
    {
        if (IsNull()) {
            return std::vector<mw::Hash>{};
        }

        std::vector<mw::Hash> spent_ids;
        for (const Input& input : m_block->GetInputs()) {
            spent_ids.push_back(input.GetOutputID());
        }

        return spent_ids;
    }

    std::vector<mw::Hash> GetOutputIDs() const
    {
        if (IsNull()) {
            return std::vector<mw::Hash>{};
        }

        std::vector<mw::Hash> output_ids;
        for (const Output& output : m_block->GetOutputs()) {
            output_ids.push_back(output.GetOutputID());
        }

        return output_ids;
    }

    std::set<mw::Hash> GetKernelIDs() const
    {
        if (IsNull()) {
            return std::set<mw::Hash>{};
        }

        std::set<mw::Hash> kernel_ids;
        for (const Kernel& kernel : m_block->GetKernels()) {
            kernel_ids.insert(kernel.GetKernelID());
        }

        return kernel_ids;
    }

    SERIALIZE_METHODS(Block, obj)
    {
        READWRITE(WrapOptionalPtr(obj.m_block));
    }

    bool IsNull() const noexcept { return m_block == nullptr; }
    void SetNull() noexcept { m_block.reset(); }
};

/// <summary>
/// A convenience wrapper around a possibly-null MWEB transcation.
/// </summary>
struct Tx {
    mw::Transaction::CPtr m_transaction;

    Tx() = default;
    Tx(const mw::Transaction::CPtr& tx)
        : m_transaction(tx) {}

    std::set<mw::Hash> GetSpentIDs() const noexcept
    {
        if (IsNull()) {
            return std::set<mw::Hash>{};
        }

        std::set<mw::Hash> spent_ids;
        for (const Input& input : m_transaction->GetInputs()) {
            spent_ids.insert(input.GetOutputID());
        }

        return spent_ids;
    }

    std::set<mw::Hash> GetKernelIDs() const noexcept
    {
        if (IsNull()) {
            return std::set<mw::Hash>{};
        }

        std::set<mw::Hash> kernel_ids;
        for (const Kernel& kernel : m_transaction->GetKernels()) {
            kernel_ids.insert(kernel.GetKernelID());
        }

        return kernel_ids;
    }

    std::set<mw::Hash> GetOutputIDs() const noexcept
    {
        if (IsNull()) {
            return std::set<mw::Hash>{};
        }

        std::set<mw::Hash> output_ids;
        for (const Output& output : m_transaction->GetOutputs()) {
            output_ids.insert(output.GetOutputID());
        }

        return output_ids;
    }

    std::vector<PegInCoin> GetPegIns() const noexcept
    {
        if (IsNull()) {
            return std::vector<PegInCoin>{};
        }

        return m_transaction->GetPegIns();
    }

    bool HasPegOut() const noexcept
    {
        if (IsNull()) {
            return false;
        }

        const std::vector<Kernel>& kernels = m_transaction->GetKernels();
        return std::any_of(
            kernels.cbegin(), kernels.cend(),
            [](const Kernel& kernel) { return kernel.HasPegOut(); }
        );
    }

    std::vector<PegOutCoin> GetPegOuts() const noexcept
    {
        if (IsNull()) {
            return std::vector<PegOutCoin>{};
        }

        return m_transaction->GetPegOuts();
    }

    uint64_t GetMWEBWeight() const noexcept
    {
        return IsNull() ? 0 : m_transaction->CalcWeight();
    }

    CAmount GetFee() const noexcept
    {
        return IsNull() ? 0 : CAmount(m_transaction->GetTotalFee());
    }

    int32_t GetLockHeight() const noexcept
    {
        return IsNull() ? 0 : m_transaction->GetLockHeight();
    }

    bool GetOutput(const mw::Hash& output_id, Output& output) const noexcept
    {
        if (IsNull()) {
            return false;
        }

        for (const Output& o : m_transaction->GetOutputs()) {
            if (o.GetOutputID() == output_id) {
                output = o;
                return true;
            }
        }

        return false;
    }

    SERIALIZE_METHODS(Tx, obj)
    {
        READWRITE(WrapOptionalPtr(obj.m_transaction));
    }

    bool IsNull() const noexcept { return m_transaction == nullptr; }
    void SetNull() noexcept { m_transaction.reset(); }

    std::string ToString() const
    {
        return IsNull() ? "" : m_transaction->Print();
    }
};

} // namespace MWEB

#endif // LITECOIN_MWEB_MODELS_H


text:
How to use WP Table

Simply use the following short-code inside page or post content to display WP Table:

[ahm-wp-tabular id=table_id template=template_name]

replace:

table_id with the id of table you created

replace template_name with any of following available template name:

style1-blue

style1-green

style1-orange

style2-gradient

style2-gray

style2-green

style2-green

style3

style4-blue

style4-gray


text:
class Category < ActiveRecord::Base
	has_many :products, dependent: :destroy
end


text:
<!DOCTYPE html>

  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=1">

  <title>Is it snowing in Berlin?</title>
  <link rel="stylesheet" type="text/css" href="./static/style.css">
  <link href="./static/favicon.ico" rel="icon" type="image/x-icon" />

  <canvas id="canvas"></canvas>

Data updated: {{updateTimestamp}} - Powered by Dark Sky


text:
categories:
- tumblr
- archive
- quote
date: 2008-08-21T01:20:10Z
title: Quote 20080821
url: /2008/08/21/quote-2-20080821/
---

Piano eschewed organic curves and aesthetically suspect design flourishes in favor of a wonderfully, wonderfully rectilinear construction. It's an ornate, beautiful grid, in essence;
Subtraction: Putting the High in Highrise


text:
package com.example.google;

/**
 * Created by bharathramh on 4/14/15.
 */
public class ConstantsGoogle {

    public static String GOOGLE_API_PLACES_URL="https://maps.googleapis.com/maps/api/place/nearbysearch/json";
    public static String GOOGLE_API_PLACES_PHOTO = "https://maps.googleapis.com/maps/api/place/photo";

    public static String ADDRESS="address";
    public static String LOCATION="location";
    public static String RADIUS="radius";

    public static String DEFAULT_RADIUS = "10000";
    public static String TYPES = "types";

    public static String KEY= "key";

    public static String GOOGLE_KEY = "AIzaSyBrob9bJTHXDr1gQookO5RgWhYNbE4Rwww";

}


text:
package com.imooc.proxy;

import java.util.Random;

public class Car implements Moveable {

	@Override
	public void move() {
		//实现开车
		try {
			Thread.sleep(new Random().nextInt(1000));
			System.out.println("汽车行驶中....");
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

}


text:
@interface Menu : UITableViewController <MWPhotoBrowserDelegate,UITableViewDelegate,UITableViewDataSource> {
    UISegmentedControl *_segmentedControl;
    NSMutableArray *_selections;
}

@property (nonatomic, strong) NSMutableArray *photos;
@property (nonatomic, strong) NSMutableArray *thumbs;
@property (nonatomic, strong) ALAssetsLibrary *assetLibrary;
@property (nonatomic, strong) NSMutableArray *assets;

- (void)loadAssets;

@end


text:
bool CMatchingThread_GPU::runflag;
int CMatchingThread_GPU::_current_iter;
int CMatchingThread_GPU::_total_iter;
std::vector<float2> CMatchingThread_GPU::_halfway;
std::vector<float> CMatchingThread_GPU::_error;

CMatchingThread_GPU::CMatchingThread_GPU(Parameters parameters,CPyramids &pyramids, int layer_index):_pyramids(pyramids),_layer_index(layer_index)

{
	runflag=true;
	_total_iter=_current_iter=0;

	_timer=NULL;
	_timer=new QTimer(this);
	connect(_timer,SIGNAL(timeout()), this, SLOT(update_result()) );
	_timer->start(1000);

    _pyramids._gpu->set_callback(&cb);
}

CMatchingThread_GPU::~CMatchingThread_GPU(void)
{
}

void CMatchingThread_GPU::run()
{
 	clock_t start, finish;
 	start = clock();
	 rod::dimage<float2> halfway;

 	if(_pyramids._gpu->calculate_halfway_parametrization(halfway))
 	{
			_timer->stop();
			finish = clock();
 			run_time = (float)(finish - start) / CLOCKS_PER_SEC*1000;
			halfway.copy_to_host(_halfway);
			update_result();
 			emit sigFinished(_layer_index);//finished signal
 	}
}

bool CMatchingThread_GPU::cb(const std::string &text, int cur, int max,
              const rod::dimage<float2> *halfway,
              const rod::dimage<float> *ssim_error,
              void *data)
{
	_current_iter=cur;
	_total_iter=max;
    if(halfway)
    {
		halfway->copy_to_host(_halfway);
 		//ssim_error->copy_to_host(_error);
 	 }

    return runflag;
}

void CMatchingThread_GPU::update_result()
{

 if(_halfway.size()>0)
 {
	#pragma omp parallel for
 	for (int y=0;y<_pyramids._vector.rows;y++)
 		for(int x=0;x<_pyramids._vector.cols;x++)
 		{
 			int index=y*_pyramids._vector.cols+x;
 			_pyramids._vector.at<Vec3f>(y,x)=Vec3f(_halfway[index].x,_halfway[index].y,0);
 			//_pyramids._error.at<float>(y,x)=_error[index];
 		}
	}
 emit sigUpdate(_layer_index);

}


text:
<?php

declare(strict_types=1);

namespace ApiPlatform\Core\Bridge\Doctrine\Orm\Filter;

use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use ApiPlatform\Core\Exception\InvalidArgumentException;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\QueryBuilder;

/**
 * Filters the collection by date intervals.
 *
 * @author Kévin Dunglas <dunglas@gmail.com>
 * @author Théo FIDRY <theo.fidry@gmail.com>
 */
class DateFilter extends AbstractContextAwareFilter
{
    const PARAMETER_BEFORE = 'before';
    const PARAMETER_STRICTLY_BEFORE = 'strictly_before';
    const PARAMETER_AFTER = 'after';
    const PARAMETER_STRICTLY_AFTER = 'strictly_after';
    const EXCLUDE_NULL = 'exclude_null';
    const INCLUDE_NULL_BEFORE = 'include_null_before';
    const INCLUDE_NULL_AFTER = 'include_null_after';
    const DOCTRINE_DATE_TYPES = [
        'date' => true,
        'datetime' => true,
        'datetimetz' => true,
        'time' => true,
        'date_immutable' => true,
        'datetime_immutable' => true,
        'datetimetz_immutable' => true,
        'time_immutable' => true,
    ];

    /**
     * {@inheritdoc}
     */
    public function getDescription(string $resourceClass): array
    {
        $description = [];

        $properties = $this->properties;
        if (null === $properties) {
            $properties = array_fill_keys($this->getClassMetadata($resourceClass)->getFieldNames(), null);
        }

        foreach ($properties as $property => $nullManagement) {
            if (!$this->isPropertyMapped($property, $resourceClass) || !$this->isDateField($property, $resourceClass)) {
                continue;
            }

            $description += $this->getFilterDescription($property, self::PARAMETER_BEFORE);
            $description += $this->getFilterDescription($property, self::PARAMETER_STRICTLY_BEFORE);
            $description += $this->getFilterDescription($property, self::PARAMETER_AFTER);
            $description += $this->getFilterDescription($property, self::PARAMETER_STRICTLY_AFTER);
        }

        return $description;
    }

    /**
     * {@inheritdoc}
     */
    protected function filterProperty(string $property, $values, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null)
    {
        // Expect $values to be an array having the period as keys and the date value as values
        if (
            !\is_array($values) ||
            !$this->isPropertyEnabled($property, $resourceClass) ||
            !$this->isPropertyMapped($property, $resourceClass) ||
            !$this->isDateField($property, $resourceClass)
        ) {
            return;
        }

        $alias = $queryBuilder->getRootAliases()[0];
        $field = $property;

        if ($this->isPropertyNested($property, $resourceClass)) {
            list($alias, $field) = $this->addJoinsForNestedProperty($property, $alias, $queryBuilder, $queryNameGenerator, $resourceClass);
        }

        $nullManagement = $this->properties[$property] ?? null;
        $type = $this->getDoctrineFieldType($property, $resourceClass);

        if (self::EXCLUDE_NULL === $nullManagement) {
            $queryBuilder->andWhere($queryBuilder->expr()->isNotNull(sprintf('%s.%s', $alias, $field)));
        }

        if (isset($values[self::PARAMETER_BEFORE])) {
            $this->addWhere(
                $queryBuilder,
                $queryNameGenerator,
                $alias,
                $field,
                self::PARAMETER_BEFORE,
                $values[self::PARAMETER_BEFORE],
                $nullManagement,
                $type
            );
        }

        if (isset($values[self::PARAMETER_STRICTLY_BEFORE])) {
            $this->addWhere(
                $queryBuilder,
                $queryNameGenerator,
                $alias,
                $field,
                self::PARAMETER_STRICTLY_BEFORE,
                $values[self::PARAMETER_STRICTLY_BEFORE],
                $nullManagement,
                $type
            );
        }

        if (isset($values[self::PARAMETER_AFTER])) {
            $this->addWhere(
                $queryBuilder,
                $queryNameGenerator,
                $alias,
                $field,
                self::PARAMETER_AFTER,
                $values[self::PARAMETER_AFTER],
                $nullManagement,
                $type
            );
        }

        if (isset($values[self::PARAMETER_STRICTLY_AFTER])) {
            $this->addWhere(
                $queryBuilder,
                $queryNameGenerator,
                $alias,
                $field,
                self::PARAMETER_STRICTLY_AFTER,
                $values[self::PARAMETER_STRICTLY_AFTER],
                $nullManagement,
                $type
            );
        }
    }

    /**
     * Adds the where clause according to the chosen null management.
     *
     * @param QueryBuilder                $queryBuilder
     * @param QueryNameGeneratorInterface $queryNameGenerator
     * @param string                      $alias
     * @param string                      $field
     * @param string                      $operator
     * @param string                      $value
     * @param string|null                 $nullManagement
     * @param string|Type                 $type
     */
    protected function addWhere(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $field, string $operator, string $value, string $nullManagement = null, $type = null)
    {
        try {
            $value = false === strpos($type, '_immutable') ? new \DateTime($value) : new \DateTimeImmutable($value);
        } catch (\Exception $e) {
            // Silently ignore this filter if it can not be transformed to a \DateTime
            $this->logger->notice('Invalid filter ignored', [
              'exception' => new InvalidArgumentException(sprintf('The field "%s" has a wrong date format. Use one accepted by the \DateTime constructor', $field)),
          ]);

            return;
        }

        $valueParameter = $queryNameGenerator->generateParameterName($field);
        $operatorValue = [
            self::PARAMETER_BEFORE => '<=',
            self::PARAMETER_STRICTLY_BEFORE => '<',
            self::PARAMETER_AFTER => '>=',
            self::PARAMETER_STRICTLY_AFTER => '>',
        ];
        $baseWhere = sprintf('%s.%s %s :%s', $alias, $field, $operatorValue[$operator], $valueParameter);

        if (null === $nullManagement || self::EXCLUDE_NULL === $nullManagement) {
            $queryBuilder->andWhere($baseWhere);
        } elseif (
            (\in_array($operator, [self::PARAMETER_BEFORE, self::PARAMETER_STRICTLY_BEFORE], true) && self::INCLUDE_NULL_BEFORE === $nullManagement) ||
            (\in_array($operator, [self::PARAMETER_AFTER, self::PARAMETER_STRICTLY_AFTER], true) && self::INCLUDE_NULL_AFTER === $nullManagement)
        ) {
            $queryBuilder->andWhere($queryBuilder->expr()->orX(
                $baseWhere,
                $queryBuilder->expr()->isNull(sprintf('%s.%s', $alias, $field))
            ));
        } else {
            $queryBuilder->andWhere($queryBuilder->expr()->andX(
                $baseWhere,
                $queryBuilder->expr()->isNotNull(sprintf('%s.%s', $alias, $field))
            ));
        }

        $queryBuilder->setParameter($valueParameter, $value, $type);
    }

    /**
     * Determines whether the given property refers to a date field.
     *
     * @param string $property
     * @param string $resourceClass
     *
     * @return bool
     */
    protected function isDateField(string $property, string $resourceClass): bool
    {
        return isset(self::DOCTRINE_DATE_TYPES[$this->getDoctrineFieldType($property, $resourceClass)]);
    }

    /**
     * Gets filter description.
     *
     * @param string $property
     * @param string $period
     *
     * @return array
     */
    protected function getFilterDescription(string $property, string $period): array
    {
        return [
            sprintf('%s[%s]', $property, $period) => [
                'property' => $property,
                'type' => \DateTimeInterface::class,
                'required' => false,
            ],
        ];
    }
}


text:
package com.photon.phresco.uiconstants;

import java.io.File;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.lang.NullArgumentException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.photon.phresco.selenium.util.ScreenException;

public class ReadXMLFile {

	private  Element eElement;
	private Log log = LogFactory.getLog(getClass());
	private  final String phrsc = "src/main/resources/phresco-env-config.xml";
	private  final String Phpblogdata = "src/main/resources/WordPress.xml";
	private  final String constants = "src/main/resources/UIConstants.xml";
	private  final String UsrInfConst="src/main/resources/UserInfo.xml";

	public ReadXMLFile() throws ScreenException {
		log.info("@ReadXMLFile Constructor::loading *****PhrescoUIConstants******");
		loadPhrescoConstansts(phrsc);
	}

	public void loadPhrescoConstansts(String properties) throws ScreenException {

		try {
			File fXmlFile = new File(properties);
			DocumentBuilderFactory dbFactory = DocumentBuilderFactory
					.newInstance();
			DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
			Document doc = dBuilder.parse(fXmlFile);

			/*System.out.println("Root element :"
					+ doc.getDocumentElement().getNodeName());*/
			NodeList nList = doc.getElementsByTagName("environment");

			for (int temp = 0; temp < nList.getLength(); temp++) {

				Node nNode = nList.item(temp);
				if (nNode.getNodeType() == Node.ELEMENT_NODE) {

					eElement = (Element) nNode;

				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void loadPhpBlogData() throws ScreenException {
    	loadPhrescoConstansts(Phpblogdata);
	}
	public void loadUIConstants() throws ScreenException {
    	loadPhrescoConstansts(constants);
	}

	public void loadUserInfoConstants() throws ScreenException {
		loadPhrescoConstansts(UsrInfConst);

	}

	public String getValue(String elementName) {

		NodeList nlList = eElement.getElementsByTagName(elementName).item(0)
				.getChildNodes();
		Node nValue = (Node) nlList.item(0);
		if(nValue==null){
			 return null;
		  }

		return nValue.getNodeValue();
	}

}


text:
<?php
/**
 * @author Tomáš Blatný
 */

namespace Learn\Model;

use Nette\Database\Context;
use Nette\Object;

abstract class BaseRepository extends Object
{
	/** @var \Nette\Database\Context */
	protected $context;

	/** @var string */
	protected $table;

	/**
	 * @param Context $context
	 * @param string  $table
	 */
	public function __construct($table, Context $context)
	{
		$this->context = $context;
		$this->table = $table;
	}

	protected function getTable()
	{
		return $this->context->table($this->table);
	}
}


text:
class ColumnCtrl {
  constructor(boardSvc, tasksSvc, taskSvc) {
    this.boardSvc = boardSvc;
    this.tasksSvc = tasksSvc;
    this.isAddingTask = false;
    this.newTaskDescription = '';
    this.taskSvc = taskSvc;
    this.openModal = false;
  }

  openTask(taskId) {
    this.taskSvc.fetchTaskForBoard(taskId, this.boardSvc.board.id)
      .then((task) => {
        this.openModal = true;
      })
      .catch((err) => {
        console.error(err);
      })
  }

  addTask() {
    this.isAddingTask = true;
  }

  saveTask(columnId) {
    this.tasksSvc.addTask({
      boardId: this.boardSvc.board.id,
      shortDescription: this.newTaskDescription,
      columnIndex: this.tasksSvc.tasksForColumn(columnId).length + 1,
      columnId
    })
    .then((task) => {
      this.isAddingTask = false;
      this.addedTaskDescription = '';
    })
    .catch((err) => {
      console.error(err);
    });
  }
}

export default ColumnCtrl;


text:
/**
 * @ngdoc module
 * @name material.components.slider
 * @description Slider module!
 */
angular.module('material.components.slider', [])
  .directive('materialSlider', [
    '$window',
    materialSliderDirective
  ]);

/**
 * @ngdoc directive
 * @name materialSlider
 * @module material.components.slider
 * @restrict E
 *
 * @description
 * The `material-slider` directive creates a slider bar that you can use.
 *
 * Simply put a native `<input type="range">` element inside of a
 * `<material-slider>` container.
 *
 * On the range input, all HTML5 range attributes are supported.
 *
 * @usage
 * <hljs lang="html">
 * <material-slider>
 *   <input type="range" ng-model="slideValue" min="0" max="100">
 * </material-slider>
 * </hljs>
 */
function materialSliderDirective($window) {

  var MIN_VALUE_CSS = 'material-slider-min';
  var ACTIVE_CSS = 'material-active';

  function rangeSettings(rangeEle) {
    return {
      min: parseInt( rangeEle.min !== "" ? rangeEle.min : 0, 10 ),
      max: parseInt( rangeEle.max !== "" ? rangeEle.max : 100, 10 ),
      step: parseInt( rangeEle.step !== "" ? rangeEle.step : 1, 10 )
    };
  }

  return {
    restrict: 'E',
    scope: true,
    transclude: true,
    template: '

',
    link: link
  };

  // **********************************************************
  // Private Methods
  // **********************************************************

  function link(scope, element, attr) {
    var input = element.find('input');
    var ngModelCtrl = angular.element(input).controller('ngModel');

    if(!input || !ngModelCtrl || input[0].type !== 'range') return;

    var rangeEle = input[0];
    var trackEle = angular.element( element[0].querySelector('.material-track') );

    trackEle.append('

');
    var fillEle = trackEle[0].querySelector('.material-fill');

    if(input.attr('step')) {
      var settings = rangeSettings(rangeEle);
      var tickCount = (settings.max - settings.min) / settings.step;
      var tickMarkersEle = angular.element('

');
      for(var i=0; i<tickCount; i++) {
        tickMarkersEle.append('

');
      }
      trackEle.append(tickMarkersEle);
    }

    input.on('mousedown touchstart', function(e){
      trackEle.addClass(ACTIVE_CSS);
    });

    input.on('mouseup touchend', function(e){
      trackEle.removeClass(ACTIVE_CSS);
    });

    function render() {
      var settings = rangeSettings(rangeEle);
      var adjustedValue = parseInt(ngModelCtrl.$viewValue, 10) - settings.min;
      var fillRatio = (adjustedValue / (settings.max - settings.min));

      fillEle.style.width = (fillRatio * 100) + '%';

      if(fillRatio <= 0) {
        element.addClass(MIN_VALUE_CSS);
      } else {
        element.removeClass(MIN_VALUE_CSS);
      }

    }

    scope.$watch( function () { return ngModelCtrl.$viewValue; }, render );

  }

}


text:
#include <aws/pinpoint/model/PutEventStreamResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::Pinpoint::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

PutEventStreamResult::PutEventStreamResult()
{
}

PutEventStreamResult::PutEventStreamResult(const AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

PutEventStreamResult& PutEventStreamResult::operator =(const AmazonWebServiceResult<JsonValue>& result)
{
  const JsonValue& jsonValue = result.GetPayload();
  if(jsonValue.ValueExists("EventStream"))
  {
    m_eventStream = jsonValue.GetObject("EventStream");

  }

  return *this;
}


text:
'use strict';var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var abstract_control_directive_1 = require('./abstract_control_directive');
/**
 * An abstract class that all control directive extend.
 *
 * It binds a {@link Control} object to a DOM element.
 */
var NgControl = (function (_super) {
    __extends(NgControl, _super);
    function NgControl() {
        _super.apply(this, arguments);
        this.name = null;
        this.valueAccessor = null;
    }
    Object.defineProperty(NgControl.prototype, "validator", {
        get: function () { return null; },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NgControl.prototype, "path", {
        get: function () { return null; },
        enumerable: true,
        configurable: true
    });
    NgControl.prototype.viewToModelUpdate = function (newValue) { };
    return NgControl;
})(abstract_control_directive_1.AbstractControlDirective);
exports.NgControl = NgControl;
//# sourceMappingURL=ng_control.js.map