text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2014  Camptocamp
  ~
  ~ This file is part of MapFish Print
  ~
  ~ MapFish Print is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ MapFish Print 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 General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with MapFish Print.  If not, see <http://www.gnu.org/licenses/>.
  -->

<beans default-lazy-init="true" xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="!integer" class="org.mapfish.print.attribute.IntegerAttribute" scope="prototype" />
    <bean id="!float" class="org.mapfish.print.attribute.FloatAttribute" scope="prototype" />
    <bean id="!string" class="org.mapfish.print.attribute.StringAttribute" scope="prototype" />
    <bean id="!stringArray" class="org.mapfish.print.attribute.StringArrayAttribute" scope="prototype" />
    <bean id="!style" class="org.mapfish.print.attribute.StyleAttribute" scope="prototype" />
    <bean id="!features" class="org.mapfish.print.attribute.FeaturesAttribute" scope="prototype" />
    <bean id="!map" class="org.mapfish.print.attribute.map.MapAttribute" scope="prototype" />
    <bean id="!overviewMap" class="org.mapfish.print.attribute.map.OverviewMapAttribute" scope="prototype" />
    <bean id="!northArrow" class="org.mapfish.print.attribute.NorthArrowAttribute" scope="prototype" />
    <bean id="!paging" class="org.mapfish.print.attribute.map.PagingAttribute" scope="prototype" />
    <bean id="!legend" class="org.mapfish.print.attribute.LegendAttribute" scope="prototype" />
    <bean id="!table" class="org.mapfish.print.attribute.TableAttribute" scope="prototype" />
    <bean id="!scalebar" class="org.mapfish.print.attribute.ScalebarAttribute" scope="prototype" />
    <bean id="!datasource" class="org.mapfish.print.attribute.DataSourceAttribute" scope="prototype" />

    <bean id="!zoomLevels" class="org.mapfish.print.attribute.map.ZoomLevels" scope="prototype" />

</beans>

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

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

#### Published in
Annls mycol. 23(3/6): 348 (1925)

#### Original name
Phylloporthe Syd.

### Remarks
null


text:
	<textarea rows='10' mce_editable="true" class='theEditor' cols='40' name='<?php echo $this->name ?>' tabindex='2' id='content'><?php echo $this->value ?></textarea>
	<?php if (!$___tiny_mce_loaded): ?>


text:
package org.foxbpm.engine.impl.cmd;

import org.foxbpm.engine.impl.entity.TaskEntity;
import org.foxbpm.engine.impl.interceptor.CommandContext;
import org.foxbpm.engine.impl.util.ClockUtil;
import org.foxbpm.engine.impl.util.ExceptionUtil;

public class ClaimCmd extends NeedsActiveTaskCmd<Void> {

	private static final long serialVersionUID = 1L;
	private String userId;
	public ClaimCmd(String taskId,String userId) {
		super(taskId);
		this.userId = userId;
	}

	protected Void execute(CommandContext commandContext, TaskEntity task) {
		if(userId == null){
			throw ExceptionUtil.getException("10601001");
		}
		if (task.getAssignee() != null) {
			throw ExceptionUtil.getException("10603201",taskId);
		} else {
			task.setAssignee(userId);
			task.setClaimTime(ClockUtil.getCurrentTime());
		}
		return null;
	}
}


text:
(function(){
	"use strict";

	angular.module('app',
		[
        // Angular modules
        'ngAnimate',        // animations
        'ngRoute',          // routing
        'ngSanitize',       // sanitizes html bindings (ex: sidebar.js)
				'partialsModule',
				'ngMessages',
				'angular-locker',
				'angular-oauth2',

        // Custom modules
        'common',           // common functions, logger, spinner
        'common.bootstrap', // bootstrap dialog wrapper functions

        // 3rd Party Modules
        'ui.bootstrap',      // ui-bootstrap (ex: carousel, pagination, dialog)

				// local Party Modules
				'app.controllers',
				'app.filters',
				'app.services',
				'app.directives',
				'app.routes',
				'app.config',
		]);

	angular.module('app.routes', ['ui.router']);
	angular.module('app.controllers', ['ui.router', 'ngMaterial', 'ngStorage', 'restangular', 'angular-loading-bar', 'angular-locker', 'angular-oauth2']);
	angular.module('app.filters', []);
	angular.module('app.services', []);
	angular.module('app.directives', []);
	angular.module('app.config', ['ngMaterial']);
});


text:
$(document).ready(function() {

    tableToGrid("#listado_Seguimiento", {
        pager : '#pagerSeguimiento',
        rowNum:10,
	rownumbers: true,
        gridview: true,
        height:'100%',
        width:1800,
        caption: "Listado de seguimientos a receptores",
        colModel :[
            {name:'Nombre',width:50,align:'center'},
            {name:'Fecha', width:20,align:'center'},
            {name:'Periodo Evaluacion',width:25,align:'center', search:false},
            {name:'Semana', width:15,align:'center', search:false},
            {name:'Talla(cm)', width:15,align:'center', search:false},
            {name:'Ganancia/Pérdida talla(cm)', width:32,align:'center', search:false},
            {name:'Peso(g)', width:20,align:'center', search:false},
            {name:'Ganancia/Pérdida peso(g)', width:32,align:'center', search:false},
            {name:'Perímetro cefálico(cm)', width:30,align:'center', search:false},
            {name:'Ganancia/Pérdida PC(cm)', width:32,align:'center', search:false},
            {name:'Complicaciones', width:40,align:'center', search:false},
            {name:'Observaciones', width:40,align:'center', search:false},
            {name:'Acción', width:15,align:'center', search:false},

        ],

    });
    jQuery("#listado_Seguimiento").jqGrid('sortGrid',"Nombre",true);
    jQuery("#listado_Seguimiento").jqGrid('navGrid','#pagerSeguimiento', {
        edit:false,
        add:false,
        del:false,
        search:false,
        reload:true
    });
        jQuery("#listado_Seguimiento").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false});
});


text:
redirect_from: /docs/1.0.16/classes/resolve.uiinjectorimpl.html
---
<!doctype html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>UIInjectorImpl | @uirouter/angularjs</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
	<link rel="stylesheet" href="../assets/css/uirouter.css">

						Search
						<input id="tsd-search-field" type="text" />

Preparing search index...

The search index is not available

					@uirouter/angularjs

						Options

							<input type="checkbox" id="tsd-filter-externals" checked />
							Internal UI-Router API

					Menu

					@uirouter/angularjs

					resolve

					UIInjectorImpl

Class UIInjectorImpl

Hierarchy

						UIInjectorImpl

Implements

UIInjector

Index

Constructors

constructor

Properties

context

native

Methods

get

get<wbr>Async

get<wbr>Native

Constructors

new UIInjector<wbr>Impl(context: ResolveContext): UIInjectorImpl

Parameters

context ResolveContext

Returns UIInjectorImpl

Defined in ui-router-core/src/resolve/resolveContext.ts:193

Properties

context: ResolveContext

Defined in ui-router-core/src/resolve/resolveContext.ts:195

native: $InjectorLike

Defined in ui-router-core/src/resolve/resolveContext.ts:193

Methods

get(token: any): any

Parameters

token any

Returns any

Implementation of UIInjector.get

Defined in ui-router-core/src/resolve/resolveContext.ts:199

get<wbr>Async(token: any): Promise<any>

Parameters

token any

Returns Promise<any>

Implementation of UIInjector.getAsync

Defined in ui-router-core/src/resolve/resolveContext.ts:215

get<wbr>Native(token: any): any

Parameters

token any

Returns any

Implementation of UIInjector.getNative

Defined in ui-router-core/src/resolve/resolveContext.ts:221

						@uirouter/angularjs

						Public API

						core

						injectables

						ng1

						ng1_<wbr>state_<wbr>events

						params

						resolve

						transition

						Internal UI-<wbr><wbr>Router API

						common

						common_<wbr>hof

						common_<wbr>predicates

						common_<wbr>strings

						directives

						hooks

						path

						state

						trace

						url

						vanilla

						view

						Resolvable

						Resolve<wbr>Context

						UIInjector<wbr>Impl

								constructor

								context

								native

								get

								get<wbr>Async

								get<wbr>Native

						Provider<wbr>Like

						Resolvable<wbr>Literal

						Resolve<wbr>Policy

						Policy<wbr>Async

						Policy<wbr>When

						ALL_<wbr>WHENS

						EAGER_<wbr>WHENS

						NATIVE_<wbr>INJECTOR_<wbr>TOKEN

						whens

						default<wbr>Resolve<wbr>Policy

						resolve<wbr>Policies

Legend

Module

Object literal

Variable

Function

Function with type parameter

Index signature

Type alias

Enumeration

Enumeration member

Property

Method

Interface

Interface with type parameter

Constructor

Property

Method

Index signature

Class

Class with type parameter

Constructor

Property

Method

Accessor

Index signature

Inherited constructor

Inherited property

Inherited method

Inherited accessor

Protected property

Protected method

Protected accessor

Private property

Private method

Private accessor

Static property

Static method

Generated using TypeDoc


text:
using Bari.Core.Commands.Clean;
using Bari.Core.Exceptions;
using FluentAssertions;
using NUnit.Framework;

namespace Bari.Core.Test.Build.Cache
{
    [TestFixture]
    public class CleanParametersTest
    {
        [Test]
        public void ByDefaultDoesNotKeepReferences()
        {
            var parameters = new CleanParameters(new string[0]);
            parameters.KeepReferences.Should().BeFalse();
        }

        [Test]
        public void ByDefaultNoSoftClean()
        {
            var parameters = new CleanParameters(new string[0]);
            parameters.SoftClean.Should().BeFalse();
        }

        [Test]
        public void AcceptsKeepReferencesParameter()
        {
            var parameters = new CleanParameters(new[] {"--keep-references"});
            parameters.KeepReferences.Should().BeTrue();
        }

        [Test]
        public void AcceptsAlternativeKeepReferencesParameter()
        {
            var parameters = new CleanParameters(new[] { "--keep-refs" });
            parameters.KeepReferences.Should().BeTrue();
        }

        [Test]
        public void AcceptsSoftCleanParameter()
        {
            var parameters = new CleanParameters(new[] {"--soft-clean"});
            parameters.SoftClean.Should().BeTrue();
        }

        [Test]
        public void AcceptsBothParametersInAnyOrder()
        {
            var parameters1 = new CleanParameters(new[] { "--soft-clean", "--keep-refs" });
            parameters1.SoftClean.Should().BeTrue();
            parameters1.KeepReferences.Should().BeTrue();

            var parameters2 = new CleanParameters(new[] { "--keep-references", "--soft-clean" });
            parameters2.SoftClean.Should().BeTrue();
            parameters2.KeepReferences.Should().BeTrue();
        }

        [Test]
        [ExpectedException(typeof(InvalidCommandParameterException))]
        public void ThrowsExceptionForMoreParameters()
        {
            new CleanParameters(new[] {"-test1", "-test2", "-test3"});
        }
    }
}


text:
TEST = true
require 'minitest/autorun'
Bundler.require(:default, :development)


text:
<?php

namespace Phpro\SoapClient\CodeGenerator\Assembler;

use Phpro\SoapClient\CodeGenerator\Context\ContextInterface;
use Phpro\SoapClient\CodeGenerator\Context\TypeContext;
use Phpro\SoapClient\Exception\AssemblerException;
use Phpro\SoapClient\Type\RequestInterface;

/**
 * Class RequestAssembler
 *
 * @package Phpro\SoapClient\CodeGenerator\Assembler
 */
class RequestAssembler implements AssemblerInterface
{
    /**
     * {@inheritdoc}
     */
    public function canAssemble(ContextInterface $context)
    {
        return $context instanceof TypeContext;
    }

    /**
     * @param ContextInterface|TypeContext $context
     *
     * @throws AssemblerException
     */
    public function assemble(ContextInterface $context)
    {
        try {
            $interfaceAssembler = new InterfaceAssembler(RequestInterface::class);
            if ($interfaceAssembler->canAssemble($context)) {
                $interfaceAssembler->assemble($context);
            }
        } catch (\Exception $e) {
            throw AssemblerException::fromException($e);
        }
    }
}


text:
package com.sonoport.freesound.query.search;

import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import com.sonoport.freesound.query.HTTPRequestMethod;
import com.sonoport.freesound.query.SoundPagingQuery;

/**
 * Class used to represent a Text Search of the freesound.org content library. The class presents a fluent API to allow
 * queries to be constructed more easily.
 *
 * Full details of the query can be found at http://www.freesound.org/docs/api/resources_apiv2.html#text-search.
 */
public class TextSearch extends SoundPagingQuery<TextSearch> {

	/** Name of the parameter to pass the names of fields to include in responses as. */
	protected static final String FIELDS_PARAMETER = "fields";

	/** The name of the query parameter to pass the search string over as. */
	private static final String SEARCH_STRING_PARAMETER = "query";

	/** The name of the query parameter to pass the sort order over as. */
	private static final String SORT_ORDER_PARAMETER = "sort";

	/** The name of the parameter to pass the 'group by pack' flag over as. */
	private static final String GROUP_BY_PACK_PARAMETER = "group_by_pack";

	/** The string to use as the search criteria. This value is used to populate the 'query' parameter on the request,
	 * so the full range of expressions permitted by the API can be specified. */
	private String searchString;

	/** The order in which to request results are sorted. The enum specified here contains the appropriate value to pass
	 * in the HTTP call. */
	private SortOrder sortOrder;

	/** Collection of filters that should be applied as part of the query. */
	private Set<SearchFilter> filters;

	/** Whether to group results by the pack to which they belong. */
	private Boolean groupByPack;

	/**
	 * No-arg constructor.
	 */
	public TextSearch() {
		super(HTTPRequestMethod.GET, "/search/text/");
	}

	/**
	 * @param searchString The search string to use in the query
	 */
	public TextSearch(final String searchString) {
		this();
		this.searchString = searchString;
	}

	/**
	 * Add the search string using the Fluent API approach.
	 *
	 * @param searchString The search string to use in the query
	 * @return The current query
	 */
	public TextSearch searchString(final String searchString) {
		this.searchString = searchString;
		return this;
	}

	/**
	 * Add a filter to the query using the Fluent API approach.
	 *
	 * @param filter The filter to add
	 * @return The current query
	 */
	public TextSearch filter(final SearchFilter filter) {
		if (filters == null) {
			filters = new HashSet<SearchFilter>();
		}
		filters.add(filter);

		return this;
	}

	/**
	 * Specify whether sound results should be grouped into the packs to which they belong, using the Fluent API
	 * approach.
	 *
	 * @param groupByPack Whether sounds should be grouped
	 * @return The current query
	 */
	public TextSearch groupByPack(final boolean groupByPack) {
		this.groupByPack = Boolean.valueOf(groupByPack);
		return this;
	}

	/**
	 * Add a sort order to the query, using the Fluent API approach.
	 *
	 * @param sortOrder The sort order to apply
	 * @return The current query
	 */
	public TextSearch sortOrder(final SortOrder sortOrder) {
		this.sortOrder = sortOrder;
		return this;
	}

	@Override
	public Map<String, Object> getQueryParameters() {
		final Map<String, Object> params = super.getQueryParameters();

		if (searchString != null) {
			params.put(SEARCH_STRING_PARAMETER, searchString);
		}

		if (sortOrder != null) {
			params.put(SORT_ORDER_PARAMETER, sortOrder.getParameterValue());
		}

		if (groupByPack != null) {
			String numericBooleanValue = "0";
			if (groupByPack) {
				numericBooleanValue = "1";
			}

			params.put(GROUP_BY_PACK_PARAMETER, numericBooleanValue);
		}

		if ((filters != null) && !filters.isEmpty()) {
			final StringBuilder filterString = new StringBuilder();

			for (final SearchFilter filter : filters) {
				filterString.append(String.format("%s:%s", filter.getField(), filter.getValue()));
				filterString.append(' ');
			}

			params.put("filter", filterString.toString().trim());
		}

		return params;
	}

	@Override
	public Map<String, String> getRouteParameters() {
		return Collections.emptyMap();
	}

}


text:
/***************************************************************
 *                                                             *
 *                   DO NOT MODIFY THIS FILE                   *
 *                                                             *
 * This file was generated by the flocoge tool. Any changes in *
 * this file will be lost on next file generation.             *
 * Generated by: flocoge-0.0.1                                 *
 * Generated on: 2015-12-07 23:04:18 +0100                     *
 ***************************************************************/

package pl.dpawlak.flocoge.diagram;

public class ElementInspectorFacade {

    private final ElementInspector elementInspector;

    public ElementInspectorFacade(ElementInspector elementInspector) {
        this.elementInspector = elementInspector;
    }

    public void inspectElement() {
        elementInspector.skipElements();
        if (elementInspector.isValidAndElementExists()) {
            elementInspector.validateBranches();
            if (elementInspector.isValid()) {
                elementInspector.validateConnections();
                if (elementInspector.isValid()) {
                    elementInspector.validateAndTransformConnectionsLabels();
                    if (elementInspector.isValid()) {
                        elementInspector.validateAndTransformElementLabel();
                        if (elementInspector.isValid()) {
                            elementInspector.markIfExternalCall();
                        }
                    }
                }
            }
        }
    }

}


text:
@extends('iframe-app')

@section('content')

Riwayat Jabatan Tambah Baru

	@if (Session::has('message'))

			<button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
			{{ Session::get('message') }}

	@endif

							Jabatan
							Satuan Kerja
              TMT. SK
							Ganti
							Hapus

				@foreach($riwayat_jabatan as $value)

								{{ $value->jabatan_utama }}
								{{ $value->unit_kerja }}
								{{ date('d-m-Y', strtotime($value->tmt_sk)) }}

										id . '/edit') }}">

										{!! Form::open(array('url' => 'riwayat-jabatan/' . $value->id)) !!}
												{!! Form::hidden('_method', 'DELETE') !!}
												<button class="btn btn-xs btn-danger" onClick="return confirm('Benar ingin menghapus?')" type="submit"></button>
										{!! Form::close() !!}

				@endforeach

@endsection


text:
import glob
import preprocess as pp
import preprocess_velocities as pml
import numpy as np
import os
import os.path
import pickle
import random
import shutil
import sys
import tempfile
from scipy.io import loadmat
from scipy.misc import toimage, imresize
from CameraParams import getCameraParams
from CameraReprojection import *
from GPSReader import *
from GPSReprojection import *
from GPSTransforms import *
from RandomVideoReader import *
from WGS84toENU import *
from WarpUtils import *
from WarpedVideoReader import *
from cv2 import imshow, waitKey, resize
import pdb
from copy import deepcopy

def outputDistances(distances, framenum, meters_per_point, points_fwd, start_offset):
    output = []
    point_num = 1
    dist = 0

    framenum += 1
    while framenum < distances.size and point_num <= points_fwd:
        dist += distances[framenum]
        if point_num * meters_per_point <= dist - start_offset:
            output.append(framenum)
            point_num += 1
        else:
            framenum += 1

    return output

def runBatch(video_reader, gps_dat, cam, output_base, start_frame, final_frame, left_lanes, right_lanes, ldist, rdist, tr):
    meters_per_point = 10
    points_fwd = 8
    frames_per_second = 50
    distances = GPSVelocities(gps_dat) / frames_per_second
    pts = GPSPos(gps_dat, cam, gps_dat[0, :]) # points wrt camera
    count = 0
    output_num = 0
    imgs = []
    labels = []
    success = True
    while True:
        (success, I, frame, P) = video_reader.getNextFrame()
        #P = np.eye(3)
        if count % 160 == 0:
            print count
        if success == False or frame >= tr.shape[0]:
            print success, frame, tr.shape[0]
            break
        if frame < start_frame or (final_frame != -1 and frame >= final_frame):
            continue

        important_frames = (outputDistances(distances, frame, meters_per_point, points_fwd, 2))
        if len(important_frames) < points_fwd:
            continue

        important_left = []
        important_right = []

        velocities = gps_dat[important_frames,4:7]
        velocities[:,[0, 1]] = velocities[:,[1, 0]]
        sideways = np.cross(velocities, np.array([0,0,1]), axisa=1)
        sideways/= np.sqrt((sideways ** 2).sum(-1))[..., np.newaxis]
        vel_start = ENU2IMU(np.transpose(velocities), gps_dat[0,:])
        vel_current = ENU2IMU(np.transpose(velocities), gps_dat[frame,:])
        sideways_start = GPSPosCamera(np.cross(vel_start, np.array([0,0,1]), axisa=0).transpose(), cam) # sideways vector wrt starting frame (camera)
        sideways_current = GPSPosCamera(np.cross(vel_current, np.array([0,0,1]), axisa=0).transpose(), cam) # sideways vector wrt starting frame (camera)
        sideways_start /= np.sqrt((sideways_start ** 2).sum(0))[np.newaxis, ...]
        sideways_current /= np.sqrt((sideways_current ** 2).sum(0))[np.newaxis, ...] # save sideways_current
        center = GPSPos(gps_dat[important_frames,:], cam, gps_dat[0, :]) # points wrt imu
        for ind in xrange(len(important_frames)):
            fr = important_frames[ind]
            min_val = max(fr - 50, 0)
            max_val = min(fr + 50, left_lanes.shape[0] - 1)

            l_distances = np.cross(left_lanes[min_val:max_val, 0:3] - np.transpose(center[:,ind]), np.transpose(sideways_start[:, ind]), axisa=1)
            l_distances = np.sqrt((l_distances ** 2).sum(-1))
            r_distances = np.cross(right_lanes[min_val:max_val, 0:3] - np.transpose(center[:,ind]), np.transpose(sideways_start[:, ind]), axisa=1)
            r_distances = np.sqrt((r_distances ** 2).sum(-1))
            important_left.append(np.argmin(l_distances)+min_val)
            important_right.append(np.argmin(r_distances)+min_val)
        important_left = np.array(important_left)
        important_right = np.array(important_right)
        max_idx = max(max(np.max(important_frames), np.max(important_left)), np.max(important_right))
        if max_idx >= left_lanes.shape[0] or max_idx >= right_lanes.shape[0]:
            print 'maxing out'
            continue

        temp_left = np.linalg.solve(tr[frame, :, :], left_lanes[important_left, :].transpose()) # save temp_left [0:3,:]
        #temp_left[0:3, :] += sideways_current*0.8

        temp_gps = GPSPos(gps_dat[important_frames], cam, gps_dat[frame, :]) # save temp_gps [0:3,:]

        temp_right = np.linalg.solve(tr[frame, :, :], right_lanes[important_right, :].transpose()) # save temp_right [0:3,:]
        #temp_right[0:3, :] -= sideways_current*0.8

        outputs = []
        for i in xrange(temp_left.shape[1]):
            outputs.append(temp_left[0, i])
            outputs.append(temp_left[1, i])
            outputs.append(temp_left[2, i])
        for i in xrange(temp_gps.shape[1]):
            outputs.append(temp_gps[0, i])
            outputs.append(temp_gps[1, i])
            outputs.append(temp_gps[2, i])
        for i in xrange(temp_left.shape[1]):
            outputs.append(temp_right[0, i])
            outputs.append(temp_right[1, i])
            outputs.append(temp_right[2, i])

        for i in xrange(sideways_current.shape[1]):
            outputs.append(sideways_current[0, i])
            outputs.append(sideways_current[1, i])
            outputs.append(sideways_current[2, i])

        for i in xrange(P.shape[0]):
            for j in xrange(P.shape[1]):
                outputs.append(P[i, j])

        labels.append(outputs)

        reshaped = pp.resize(I, (240, 320))[0]
        imgs.append(reshaped)
        if len(imgs) == 960:
            merge_file = "%s_%d" % (output_base, output_num)
            pml.save_merged_file(merge_file, imgs, labels, imgRows=len(labels[0]))
            imgs = []
            labels = []
            output_num += 1

        count += 1

def runLabeling(file_path, gps_filename, output_name, frames_to_skip, final_frame, lp, rp, pickle_loc):
    video_reader = WarpedVideoReader(file_path)
    #video_reader.setSubsample(True)
    video_reader.setPerspectives(pickle_loc)
    gps_reader = GPSReader(gps_filename)
    gps_dat = gps_reader.getNumericData()

    cam = getCameraParams()
    cam_to_use = cam[int(output_name[-1]) - 1]

    lp = pixelTo3d(lp, cam_to_use)
    rp = pixelTo3d(rp, cam_to_use)
    tr = GPSTransforms(gps_dat, cam_to_use)
    pitch = -cam_to_use['rot_x']
    height = 1.106
    R_camera_pitch = euler_matrix(cam_to_use['rot_x'], cam_to_use['rot_y'], cam_to_use['rot_z'], 'sxyz')[0:3, 0:3]
    Tc = np.eye(4)
    Tc[0:3, 0:3] = R_camera_pitch.transpose()
    Tc[0:3, 3] = [-0.2, -height, -0.5]
    lpts = np.zeros((lp.shape[0], 4))
    rpts = np.zeros((rp.shape[0], 4))
    for t in range(min(tr.shape[0], lp.shape[0])):
        lpts[t, :] = np.dot(tr[t, :, :], np.linalg.solve(Tc, np.array([lp[t, 0], lp[t, 1], lp[t, 2], 1])))
        rpts[t, :] = np.dot(tr[t, :, :], np.linalg.solve(Tc, np.array([rp[t, 0], rp[t, 1], rp[t, 2], 1])))

    ldist = np.apply_along_axis(np.linalg.norm, 1, np.concatenate((np.array([[0, 0, 0, 0]]), lpts[1:] - lpts[0:-1])))
    rdist = np.apply_along_axis(np.linalg.norm, 1, np.concatenate((np.array([[0, 0, 0, 0]]), rpts[1:] - rpts[0:-1])))
    start_frame = frames_to_skip
    runBatch(video_reader, gps_dat, cam_to_use, output_name, start_frame, final_frame, lpts, rpts, ldist, rdist, tr)

    print "Done with %s" % output_name

def parseFolder(args):
    (folder, output_folder, output_prefix, laneLoc, pickleLoc) = args
    gps_files = glob.glob(folder +  '*_gps.out')

    frames_to_skip = 0  #int(sys.argv[3]) if len(sys.argv) > 3 else 0
    final_frame = -1  #int(sys.argv[4]) if len(sys.argv) > 4 else -1
    for gps_file in gps_files:
        prefix = gps_file[0:-8]
        for i in [1,2]:
            file_path = prefix + str(i) + '.avi'

            path, output_base = os.path.split(prefix)
            pts_file = laneLoc + output_base + str(i) + '-interpolated.mat'
            if not os.path.isfile(pts_file):
                return
            pts = loadmat(pts_file)
            output_base = output_prefix + output_base
            output_name = os.path.join(os.path.join(output_folder, str(i)), output_base + str(i))
            print output_name
            lp = pts['left']
            rp = pts['right']

            runLabeling(file_path, gps_file, output_name, frames_to_skip, final_frame, lp, rp, pickleLoc)

if __name__ == '__main__':
    folder = (sys.argv[1], sys.argv[2], '', sys.argv[3], sys.argv[4])
    parseFolder(folder)


text:
require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } })

--[[ General configuration parameters ]]
config.defaultProtocolVersion = 2
config.ExitOnCrash = false

--[[ Required Shared Libraries ]]
local commonFunctions = require('user_modules/shared_testcases/commonFunctions')
local commonSteps = require('user_modules/shared_testcases/commonSteps')
local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions')
local sdl = require('SDL')
local testCasesForExternalUCS = require('user_modules/shared_testcases/testCasesForExternalUCS')
local testCasesForPolicySDLErrorsStops = require('user_modules/shared_testcases/testCasesForPolicySDLErrorsStops')
local utils = require ('user_modules/utils')

--[[ General Precondition before ATF start ]]
commonFunctions:SDLForceStop()
commonSteps:DeleteLogsFileAndPolicyTable()
commonPreconditions:BackupFile("sdl_preloaded_pt.json")

--[[ General Settings for configuration ]]
Test = require("user_modules/connecttest_resumption")
require('user_modules/AppTypes')

--[[ Preconditions ]]
commonFunctions:newTestCasesGroup("Preconditions")

function Test:CheckSDLStatus_1_RUNNING()
  testCasesForExternalUCS.checkSDLStatus(self, sdl.RUNNING)
end

function Test:ConnectMobile()
  self:connectMobile()
end

function Test:StartSession()
  testCasesForExternalUCS.startSession(self, 1)
end

function Test:RAI()
  testCasesForExternalUCS.registerApp(self, 1)
end

function Test:StopSDL_IGNITION_OFF()
  testCasesForExternalUCS.ignitionOff(self)
end

function Test:CheckSDLStatus_2_STOPPED()
  testCasesForExternalUCS.checkSDLStatus(self, sdl.STOPPED)
end

function Test.UpdatePreloadedPT()
  local updateFunc = function(preloadedTable)
    preloadedTable.policy_table.module_config.preloaded_date = os.date("%Y-%m-%d")
    preloadedTable.policy_table.device_data = {
      [utils.getDeviceMAC()] = {
        user_consent_records = {
          [config.application1.registerAppInterfaceParams.fullAppID] = {
            external_consent_status_groups = {
              Location = false
            }
          }
        }
      }
    }
  end
  testCasesForExternalUCS.updatePreloadedPT(updateFunc)
end

--[[ Test ]]
commonFunctions:newTestCasesGroup("Test")

function Test.StartSDL()
  StartSDL(config.pathToSDL, config.ExitOnCrash)
  os.execute("sleep 5")
end

function Test:CheckSDLStatus_3_STOPPED()
  testCasesForExternalUCS.checkSDLStatus(self, sdl.STOPPED)
end

function Test:CheckLog()
  local result = testCasesForPolicySDLErrorsStops.ReadSpecificMessage("Parsed table is not valid policy_table")
  if result ~= true then
    self:FailTestCase("Error message was not found in log file")
  end
end

--[[ Postconditions ]]
commonFunctions:newTestCasesGroup("Postconditions")

function Test.StopSDL()
  StopSDL()
end

function Test.RestorePreloadedFile()
  commonPreconditions:RestoreFile("sdl_preloaded_pt.json")
end

return Test


text:
<?php namespace Aginev\Datagrid;

use Config;
use Aginev\Datagrid\Rows\Row;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Request;
use Aginev\Datagrid\Exceptions\DataException;
use Illuminate\Contracts\Pagination\Paginator;
use Aginev\Datagrid\Exceptions\ColumnException;

/**
 * Description of Datagrid
 *
 * @author Atanas Ginev
 */
class Datagrid
{

    /*
     * Datagrid config
     *
     *  @var array
     */
    private $config = [];

    /**
     * Grid rows
     *
     * @var Collection
     */
    private $rows = null;

    /**
     * Grid columns
     *
     * @var Collection
     */
    private $columns = null;

    /**
     * Grid filters
     *
     * @var Collection
     */
    private $filters = null;

    /**
     * Hidden search form fields
     *
     * @var array
     */
    private $hiddens = [];

    /**
     * Did the Datagrid will have bulk <input type="checkbox"> fields.
     *
     * @var bool
     */
    private $has_bulks = false;

    /**
     * Pagination object
     *
     * @var \Illuminate\View\View
     */
    private $pagination = false;

    /**
     * Create new datagrid instance
     *
     * @param mixed $rows Data to be rendered. It can be array or \Illuminate\Support\Collection.
     * @param null  $filters
     * @param array $config
     *
     * @throws Exceptions\CellException
     */
    public function __construct($rows = null, $filters = null, array $config = [])
    {
        $this->rows = new Collection();
        $this->columns = new Collection();
        $this->filters = new Collection();

        $this->initPagination($rows);
        $this->setRows($rows);
        $this->setFilters($filters);

        $this->config = $config;
    }

    /**
     * Get datagrid HTML
     *
     * @param string|null $id
     *
     * @return mixed
     */
    public function show($id = null)
    {
        return View::make('datagrid::datagrid', ['grid' => $this, 'id' => $id])->render();
    }

    /*
    |--------------------------------------------------------------------------
    | Rows
    |--------------------------------------------------------------------------
    */

    /**
     * Set grid row
     *
     * @param $row
     *
     * @return $this
     * @throws Exceptions\CellException
     */
    public function setRow($row)
    {
        $this->rows->push(Row::getRowInstance($row));

        return $this;
    }

    /**
     * Get grid rows
     *
     * @return Collection
     */
    public function getRows()
    {
        return $this->rows;
    }

    /**
     * Set grid rows
     *
     * @param $rows
     *
     * @return $this
     * @throws Exceptions\CellException
     */
    public function setRows($rows)
    {
        if ($rows && count($rows) > 0) {
            foreach ($rows as $row) {
                $this->setRow($row);
            }
        }

        return $this;
    }

    /*
    |--------------------------------------------------------------------------
    | Columns
    |--------------------------------------------------------------------------
    */

    /**
     * Get column by key
     *
     * @param $column
     *
     * @return mixed
     * @throws ColumnException
     */
    public function getColumn($column)
    {
        if ($this->columns->has($column)) {
            return $this->columns[$column];
        }

        throw new ColumnException('Column not found!');
    }

    /**
     * Set column
     *
     * @param string $key
     * @param string $title
     * @param array  $config
     *
     * @return $this
     */
    public function setColumn($key, $title, $config = [])
    {
        $this->columns->put($key, new Column($key, $title, $config));

        return $this;
    }

    /**
     * Set grid action column
     * TODO Refactor this to be able to use setColumn method
     *
     * @param array  $config
     * @param string $key
     * @param string $title
     *
     * @return $this
     */
    public function setActionColumn($config = [], $key = 'actions', $title = 'Actions')
    {
        $column = new Column($key, $title, $config);
        $column->setAction(true);

        $this->columns->put($key, $column);

        return $this;
    }

    /**
     * Get grid columns
     *
     * @return Collection
     */
    public function getColumns()
    {
        return $this->columns;
    }

    /**
     * Get grid columns count
     *
     * @return int
     */
    public function getColumnsCount()
    {
        $count = count($this->getColumns());

        if ($this->isBulkable()) {
            $count++;
        }

        //TODO Check if there are actions and if so add 1 for the actions column
        return $count + 1;
    }

    /*
    |--------------------------------------------------------------------------
    | Filters
    |--------------------------------------------------------------------------
    */

    /**
     * Get single filter by key
     *
     * @param        $key
     * @param string $default_value Default value if key is not found
     *
     * @return mixed|string
     */
    public function getFilter($key, $default_value = '')
    {
        if ($this->filters->has($key)) {
            return $this->filters[$key];
        }

        return $default_value;
    }

    /**
     * Set single filter
     *
     * @param mixed $key   Filter key
     * @param mixed $value Filter value
     *
     * @return $this
     */
    public function setFilter($key, $value)
    {
        $this->filters->put($key, $value);

        return $this;
    }

    /**
     * Get all filters
     *
     * @param bool $to_array If true will return filters as array. Default set to false.
     *
     * @return array|Collection
     */
    public function getFilters($to_array = true)
    {
        if ($to_array === true) {
            return $this->filters->toArray();
        }

        return $this->filters;
    }

    /**
     * Set many filters
     *
     * @param array $filters Array of key => value pairs
     *
     * @return $this
     */
    public function setFilters($filters = [])
    {
        if ($filters) {
            foreach ($filters as $key => $value) {
                $this->setFilter($key, $value);
            }
        }

        return $this;
    }

    /**
     * Check if the grid has a specific filter
     *
     * @param $key
     *
     * @return mixed|string
     */
    public function hasFilter($key)
    {
        return $this->getFilter($key);
    }

    /**
     * Check if the datagrid has filters. Will loop through all columns
     * and if any of the columns has filters this will mean that the datagrid
     * will have filters in general.
     *
     * @return boolean
     */
    public function hasFilters()
    {
        foreach ($this->columns as $col) {
            if ($col->hasFilters() === true) {
                return true;
            }
        }

        return false;
    }

    /**
     * Get array of data for sort links at the header of the grid
     *
     * @param $field
     *
     * @return array
     */
    public function getSortParams($field)
    {
        // Clone the filters object. If you do not do this it will be passed
        // by reference and the values will be modified!
        $filters = clone $this->getFilters(false);

        if (!$filters->has('order_by')) {
            $filters->put('order_by', '');
        }

        if (!$filters->has('order_dir')) {
            $filters->put('order_dir', 'ASC');
        }

        if ($filters['order_by'] == $field) {
            if (!$filters->has('order_dir') || $filters['order_dir'] == 'ASC') {
                $filters->put('order_dir', 'DESC');
            } else {
                $filters->put('order_dir', 'ASC');
            }
        } else {
            $filters->put('order_by', $field);
            $filters->put('order_dir', 'ASC');
        }

        $per_page = intval(Request::get('per_page', Config::get('pagination.per_page')));
        $per_page = $per_page > 0 ? $per_page : Config::get('pagination.per_page');

        return ['f' => $filters->toArray(), 'page' => 1, 'per_page' => $per_page];
    }

    /*
    |--------------------------------------------------------------------------
    | Pagination
    |--------------------------------------------------------------------------
    */

    /**
     * Init the grid pagination
     *
     * @param $rows
     */
    public function initPagination($rows)
    {
        if ($rows instanceof Paginator) {
            $this->setPagination($rows->appends(Request::all()));
        }
    }

    /**
     * Get grid pagination
     *
     * @return \Illuminate\View\View
     */
    public function getPagination()
    {
        return $this->pagination;
    }

    /**
     * Set grid pagination
     *
     * @param Paginator $pagination
     *
     * @return $this
     */
    public function setPagination(Paginator $pagination)
    {
        $this->pagination = $pagination;

        return $this;
    }

    /**
     * Check if the grid set has pagination
     *
     * @return bool
     */
    public function hasPagination()
    {
        return (bool)$this->getPagination();
    }

    /*
    |--------------------------------------------------------------------------
    | Config
    |--------------------------------------------------------------------------
    */

    /**
     * Get config item by key
     *
     * @param $key
     *
     * @return mixed
     * @throws DataException
     */
    public function getConfig($key)
    {
        if (array_key_exists($key, $this->config)) {
            return $this->config[$key];
        }

        throw new DataException('Configuration value not found!');
    }

    /**
     * Set custom configuration values
     *
     * @param array $config Array of key => value pairs
     *
     * @return $this
     */
    public function setConfig(array $config = [])
    {
        $this->config = array_replace($this->config, $config);

        return $this;
    }

    /*
    |--------------------------------------------------------------------------
    | Bulks
    |--------------------------------------------------------------------------
    */

    /**
     * Tell grid that it needs to have bulk checkboxes
     *
     * @param bool $flag   Default false but when set to column from the result set it's values will be set as checkbox
     *                     value
     *
     * @return $this
     */
    public function isBulkable($flag = false)
    {
        $this->has_bulks = $flag;

        return $this;
    }

    /**
     * Did the grid has to have bulk checkboxes
     *
     * @return bool
     */
    public function isItBulkable()
    {
        return (bool)$this->has_bulks;
    }

    /**
     * Get bulk column
     */
    public function getBulk()
    {
        return $this->has_bulks;
    }

    /*
    |--------------------------------------------------------------------------
    | Hidden Fields
    |--------------------------------------------------------------------------
    */

    /**
     * Get grid hidden fields
     *
     * @return array
     */
    public function getHiddens()
    {
        return $this->hiddens;
    }

    /**
     * Set grid hidden fields
     *
     * @param array $hiddens
     *
     * @return $this
     */
    public function setHiddens($hiddens)
    {
        $this->hiddens = $hiddens;

        return $this;
    }

    /*
    |--------------------------------------------------------------------------
    | Helpers
    |--------------------------------------------------------------------------
    */

    /**
     *
     * @param array  $arr1
     * @param array  $arr2
     * @param string $separator
     *
     * @return array
     */
    public static function concatStringArrays($arr1, $arr2, $separator = '')
    {
        $result = [];

        foreach ($arr1 as $key => $value) {
            // Fill with values from first array
            $result[$key] = $value;

            // If the same key exists in second array concatenate the values
            if (array_key_exists($key, $arr2)) {
                $result[$key] .= $separator . $arr2[$key];
            }
        }

        // Loop in second array to check if there are any missing key value pairs in the result
        foreach ($arr2 as $key => $value) {
            if (!array_key_exists($key, $result)) {
                $result[$key] = $value;
            }
        }

        return $result;
    }

    /**
     * Current route link
     *
     * @param array $get_params
     *
     * @return string
     */
    public static function getCurrentRouteLink($get_params = [])
    {
        $current_action = Route::current()->getAction();
        $controller = '\\' . $current_action['controller'];
        $parameters = Route::current()->parameters();

        return action($controller, $parameters) . ($get_params ? '?' . http_build_query($get_params) : '');
    }
}


text:
/**
 * On Request, find all hrefs and assign green or grey icon
 */
function getAnswer(theMessageEvent) {
   if (theMessageEvent.name === "greencheckSearchResult") {
      data = theMessageEvent.message;
      $(".result > li").each(function (i) {
        var loc = getUrl($(this).find('a').first().attr('href'));

        if(data[loc]){
            $(this).find('.TGWF').first()
              .html(getResultNode(data[loc]).append(' '))
              .qtip({
                  content: {
                    text: function(api) {
                      return getTitleWithLink(data[loc]);
                      }
                    },
                    show: { delay: 700 },
                    hide: { fixed:true,  delay:500 }
              });
              if(data[loc].green){
                $(this).find('.TGWF').first().qtip('option', { 'style.classes': 'qtip-green'});
              } else {
                $(this).find('.TGWF').first().qtip('option', { 'style.classes': 'qtip-light'});
              }
        }
    });
   }
}
safari.self.addEventListener("message", getAnswer, false);

/**
 * If document is ready, find the urls to check
 */
$(document).ready(function() {
    var page = $(location).attr('href');
    // Check if this is a bing.com domain
    if(page.indexOf("ecosia.org") != -1){
        $('#left').append(searchMessage());

        var locs = new Object();
        if ( $(".result > li").length > 0 ) {
             $(".result > li").each(function (i) {
                 $(this).find('a').first().prepend($('<span>', { class: 'TGWF'}).append(getImageNode('greenquestion')).append(' '));
                 var loc = getUrl($(this).find('a').first().attr('href'));
                 locs[loc] = loc;
             });
        }
        if(Object.keys(locs).length > 0) {
            safari.self.tab.dispatchMessage("greencheckSearch",locs);
        }
    }
});


text:
Diaspora JSXC Integration
=========================

**master** [ ![Build Status](https://travis-ci.org/diaspora/jsxc.svg?branch=master) ](https://travis-ci.org/diaspora/jsxc)
**develop** [ ![Build Status](https://travis-ci.org/diaspora/jsxc.svg?branch=develop) ](https://travis-ci.org/diaspora/jsxc)

This XMPP client was forked from [jsxc.org](http://www.jsxc.org/)
and was slimmed down for [Diaspora](https://diasporafoundation.org) usage only!

**DO NOT** use this jsxc version unless you know what you're doing!!


text:
package liquibase.sqlgenerator.core;

import liquibase.change.AddColumnConfig;
import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.sql.Sql;
import liquibase.sql.UnparsedSql;
import liquibase.sqlgenerator.SqlGeneratorChain;
import liquibase.statement.core.CreateIndexStatement;
import liquibase.structure.core.Index;
import liquibase.util.StringUtils;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

public class CreateIndexGeneratorPostgres extends CreateIndexGenerator {

    @Override
    public int getPriority() {
        return PRIORITY_DATABASE;
    }

    @Override
    public boolean supports(CreateIndexStatement statement, Database database) {
        return database instanceof PostgresDatabase;
    }

    @Override
    public Sql[] generateSql(CreateIndexStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {

        // Default filter of index creation:
        // creation of all indexes with associations are switched off.
        List<String> associatedWith = StringUtils.splitAndTrim(statement.getAssociatedWith(), ",");
        if ((associatedWith != null) && (associatedWith.contains(Index.MARK_PRIMARY_KEY) || associatedWith.contains
            (Index.MARK_UNIQUE_CONSTRAINT) || associatedWith.contains(Index.MARK_FOREIGN_KEY))) {
            return new Sql[0];
        }

        StringBuilder buffer = new StringBuilder();

        buffer.append("CREATE ");
        if ((statement.isUnique() != null) && statement.isUnique()) {
            buffer.append("UNIQUE ");
        }
        buffer.append("INDEX ");

        if (statement.getIndexName() != null) {
            // for postgres setting the schema name for the index name is invalid
            buffer.append(database.escapeObjectName(statement.getIndexName(), Index.class)).append(" ");
        }
        buffer.append("ON ");
        buffer.append(database.escapeTableName(statement.getTableCatalogName(), statement.getTableSchemaName(), statement.getTableName())).append("(");
        Iterator<AddColumnConfig> iterator = Arrays.asList(statement.getColumns()).iterator();
        while (iterator.hasNext()) {
            AddColumnConfig column = iterator.next();
            if (column.getComputed() == null) {
                buffer.append(database.escapeColumnName(statement.getTableCatalogName(), statement.getTableSchemaName(), statement.getTableName(), column.getName(), false));
            } else {
                if (column.getComputed()) {
                    buffer.append(column.getName());
                } else {
                    buffer.append(database.escapeColumnName(statement.getTableCatalogName(), statement.getTableSchemaName(), statement.getTableName(), column.getName()));
                }
            }
            if (iterator.hasNext()) {
                buffer.append(", ");
            }
        }
        buffer.append(")");

        if ((StringUtils.trimToNull(statement.getTablespace()) != null) && database.supportsTablespaces()) {
            if ((database instanceof MSSQLDatabase) || (database instanceof SybaseASADatabase)) {
                buffer.append(" ON ").append(statement.getTablespace());
            } else if ((database instanceof AbstractDb2Database) || (database instanceof InformixDatabase)) {
                buffer.append(" IN ").append(statement.getTablespace());
            } else {
                buffer.append(" TABLESPACE ").append(statement.getTablespace());
            }
        }

        if ((statement.isClustered() != null) && statement.isClustered()) {
            return new Sql[]{
                    new UnparsedSql(buffer.toString(), getAffectedIndex(statement)),
                    new UnparsedSql("CLUSTER " + database.escapeTableName(statement.getTableCatalogName(), statement.getTableSchemaName(), statement.getTableName()) + " USING " + database.escapeObjectName(statement.getIndexName(), Index.class))
            };
        } else {
            return new Sql[]{new UnparsedSql(buffer.toString(), getAffectedIndex(statement))};
        }
    }
}


text:
/**
 * bus.js - The browser-bus
 * @author wanghe
 */
watt.ns('bus',function(watt){

    watt.WVS.BUS = {};

    var Bus = function (ns){
        this.ns = ns || this._DEF_NAMESPACE;
        this.events={};
        if(watt.WVS.BUS[this.ns])
        return watt.WVS.BUS[this.ns];
        watt.WVS.BUS[this.ns] = this;
        return this;
    }

    Bus.prototype = {
        _DEF_NAMESPACE:'_defaultNS',
        /**
         * Bind events
         * @param name A string containing One or more space-separated event types.
         * @param callback A function to execute at the time the event is triggered.
         * @return {*}
         */
        on : function(name, callback) {
            var events = name.split(/\s+/),event;
            if(callback&&typeof callback == "function"){
                while (event = events.shift()) {
                    (this.events[event] || (this.events[event] = [])).push(callback);
                }
            }
            return this;
        },
        /**
         * Remove events.
         * If `callback` is undefined, remove all callbacks for the event types.
         * If `name` and `callback` are both undefined, remove all callbacks for all event types
         * @param name name of events
         * @param callback the handler of given event types.
         * @return {*}
         */
        off : function(name, callback) {
            if (!(name || callback)) {
                this.events = {};
            }else{
                var events = name.split(/\s+/),event,calls;
                while (event = events.shift()) {
                    calls = this.events[event];
                    if (calls) {
                        if (callback) {
                            for (var i = calls.length - 1; i >= 0; i--) {
                                if (calls[i] === callback) {
                                    calls.splice(i, 1)
                                }
                            }
                        }
                        else {
                            delete this.events[event];
                        }
                    }
                }
            }
            return this
        },
        /**
         * Bind once events
         * The handler is executed at most once per event type.
         * @param name A string containing One or more space-separated event types.
         * @param callback A function to execute at the time the event is triggered.
         */
        one:function (name, callback) {
            var that = this;
            var cb = function() {
                that.off(name, cb);
                callback.apply(this, arguments);
            }
            this.on(name, cb);
        },
        /**
         * Execute all handlers for the given event types.
         * @param name A string containing One or more space-separated event types
         * @param data Additional parameters to pass along to the event handler.
         * @param scope context of handler when it was executed.
         * @return {*}
         */
        emit : function(name, data , scope) {
            var events = name.split(/\s+/),event,calls,call;

            while (event = events.shift()) {
                //Copy callback lists to prevent modification.
                calls = (this.events[event]||[]).slice();
                while (call = calls.shift()) {
                    //aop------filter?
                    try{
                        call.apply(scope||this,data||[]);
                    }catch (e){
                        this.emit('error',[e],this);
                    }
                }
            }
            return this;
        }
    }

    var handler = function (args,handler) {
        if(args.length == 4){
            //ns,name,data ,scope
            if(typeof args[1] != "string"){
                args[3] = args[2];
                args[2] = args[1];
                args[1] = args[0];
                args[0] = watt['bus'].Bus._DEF_NAMESPACE;
            }
        }else{
            //ns, name, callback
            if(typeof args[1] == "function"){
                args[2] = args[1];
                args[1] = args[0];
                args[0] = watt['bus'].Bus._DEF_NAMESPACE;
            }
        }
        var buses = args.shift().split(/\s+/g),bus,_bus;
        while (bus = buses.shift()) {
            _bus = watt.WVS.BUS[bus||watt['bus'].Bus._DEF_NAMESPACE];
            if(_bus){
                _bus[handler].apply(_bus,args);
            }
        }
    }

    watt.ns({
        /**
         * Bind events
         * @param ns namespace of bus.
         * @param name A string containing One or more space-separated event types.
         * @param callback A function to execute at the time the event is triggered.
         * @return {*}
         */
        on : function(ns, name, callback) {
            handler([ns, name, callback],'on');
            return this;
        },
        /**
         * Remove events.
         * If `callback` is undefined, remove all callbacks for the event types.
         * If `name` and `callback` are both undefined, remove all callbacks for all event types
         * @param ns namespace of bus.
         * @param name name of events
         * @param callback the handler of given event types.
         * @return {*}
         */
        off : function(ns,name, callback) {
            handler([ns, name, callback],'off');
            return this
        },
        /**
         * Bind once events
         * The handler is executed at most once per event type.
         * @param ns namespace of bus.
         * @param name A string containing One or more space-separated event types.
         * @param callback A function to execute at the time the event is triggered.
         */
        one:function (ns,name, callback) {
            handler([ns, name, callback],'one');
            return this;
        },
        /**
         * Execute all handlers for the given event types.
         * @param ns namespace of bus.
         * @param name A string containing One or more space-separated event types
         * @param data A array.Additional parameters to pass along to the event handler.
         * @param scope context of handler when it was executed.
         * @return {*}
         */
        emit : function(ns,name,data ,scope) {
            handler([ns,name,data ,scope],'emit');
            return this;
        },
        Bus:function (ns) {
            new watt['bus'].Bus(ns);
        }
    },0);

    /**
     * build a bus use default namespace
     */
    return {Bus:new Bus()};
});


text:
package org.fogbeam.foaf.api;

import java.util.List;

/**
 *
 * 	Class: foaf:Person
	Person - A person.
	Status: 	stable
	in-range-of:	foaf:knows
	in-domain-of:	foaf:geekcode foaf:firstName foaf:surname foaf:family_name
					foaf:plan foaf:img foaf:myersBriggs foaf:workplaceHomepage
					foaf:workInfoHomepage foaf:schoolHomepage foaf:knows foaf:interest
					foaf:topic_interest foaf:publications foaf:currentProject foaf:pastProject

	The foaf:Person class represents people. Something is a foaf:Person if it is a person.
	We don't nitpic about whether they're alive, dead, real, or imaginary. The foaf:Person class
	is a sub-class of the foaf:Agent class, since all people are considered 'agents' in FOAF.
 *
 *
 */

public interface FoafPerson extends FoafAgent
{

	public String getGeekcode();
	public void setGeekcode( String geekcode );

	public String getFirstName();
	public void setFirstName( String firstName );

	public String getSurname();
	public void setSurname( String surname );

	public String getFamily_name();
	public void setFamily_name( String family_name );

	public String getPlan();
	public void setPlan( String plan );

	public String getImg();
	public void setImg( String img );

	public String getMyersBriggs();
	public void setMyersBriggs( String myersBriggs );

	public String getWorkplaceHomepage();
	public void setWorkplaceHomepage( String workplaceHomepage );

	public String getSchoolHomepage();
	public void setSchoolHomepage( String schoolHomepage );

	public List<FoafPerson> getKnows();
	public void setKnows( final List<FoafPerson> knows );
	public void addKnows( final FoafPerson knows );

	public List<FoafDocument> getInterests();
	public void setInterests( final List<FoafDocument> interests );
	public void addInterest( final FoafDocument interest );

	public List<String> getTopic_interests();
	public void setTopic_interests( final List<String> topic_interests );
	public void addTopic_interest( final String topic_interest );

	public List<FoafDocument> getPublications();
	public void setPublications( final List<FoafDocument> publications );
	public void addPublication( final FoafDocument publication );

	public FoafProject getCurrentProject();
	public void setCurrentProject( final FoafProject currentProject );

	public List<FoafProject> getPastProjects();
	public void setPastProjects( final List<FoafProject> pastProjects );
	public void addPastProject( final FoafProject pastProject );

	public List<FoafOnlineAccount> getAccounts();
	public void setAccounts( final List<FoafOnlineAccount> onlineAccounts );
	public void addAccount( final FoafOnlineAccount account );

}


text:
/**
 * Object.assign polyfill
 *
 * @param {object} target Target object to merge properties onto
 * @param {...object} sources  Source object to merge properties from
 * @return {object} Target object with merged properties
 */
function assign(target, ...sources) {
    if (target === 'undefined' || target === null) {
        throw new TypeError('Cannot convert first argument to object');
    }

    const to = Object(target);

    for (let inc = 0; inc < sources.length; inc += 1) {
        let nextSource = sources[inc];

        if (nextSource === 'undefined' || nextSource === null) {
            continue;
        }

        nextSource = Object(nextSource);

        const keysArray = Object.keys(nextSource);

        for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
            const nextKey = keysArray[nextIndex];
            const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);

            if (desc !== 'undefined' && desc.enumerable) {
                to[nextKey] = nextSource[nextKey];
            }
        }
    }

    return to;
}

export default assign;


text:
using System;
using System.Diagnostics;
using System.Text;

namespace SP.LoggerByChangingColumn
{
    public abstract class ChangeHistoryLogger<S> : ICloneable
        where S : class
    {
        S historyObject;
        public ILogLogic LogLogic { get; set; }

        protected void SetValue(S currentObject)
        {
            if (historyObject == null)
            {
                if (currentObject is ICloneable)
                {
                    historyObject = (currentObject as ICloneable).Clone() as S;
                }
            }
        }

        public void WriteLog(S leastObject)
        {
            if (historyObject == null || LogLogic == null)
                return;

            var properties = historyObject.GetType().GetProperties();

            foreach (var property in properties)
            {
                var attributes = property.GetCustomAttributes(false);

                foreach (var attribute in attributes)
                {
                    if (attribute is IsWriteLogChangeValue)
                    {
                        var customAttribute = attribute as IsWriteLogChangeValue;

                        if (customAttribute.WriteHistoryLog)
                        {
                            var leastValue = leastObject.GetType().GetProperty(property.Name).GetValue(leastObject) ?? "";
                            var historyValue = property.GetValue(historyObject) ?? "";

                            var isEqual = leastValue.Equals(historyValue);

                            //if (!leastValue.ToString().Equals(historyValue.ToString()))
                            if (!isEqual)
                            {
                                #region Test Console Write Value
                                //Debug.WriteLine("---Log---");
                                //foreach (var item in historyObject.GetType().GetProperties())
                                //{
                                //    Debug.WriteLine(item.GetValue(historyObject));
                                //}
                                //Debug.WriteLine("------");
                                #endregion

                                LogLogic.WriteLog();

                                if (leastObject is ICloneable)
                                {
                                    var logData = new StringBuilder();

                                    foreach (var item in historyObject.GetType().GetProperties())
                                    {
                                        logData.Append("--");
                                        logData.Append(item.GetValue(historyObject));
                                    }

                                    Debug.WriteLine(logData.ToString());

                                    historyObject = (leastObject as ICloneable).Clone() as S;
                                }

                                return;
                            }
                        }
                    }
                }
            }
        }

        public object Clone()
        {
            return MemberwiseClone();
        }
    }
}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>qmaze.Controller</title>
<meta name="date" content="2017-11-06">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

qmaze.Controller

Classes

Episode

LearningController

OptimalEpisode

Exceptions

EpisodeInterruptedException

TrainingInterruptedException


text:
package org.apache.polygene.runtime.composite;

import org.apache.polygene.api.sideeffect.SideEffectDescriptor;

/**
 * JAVADOC
 */
public final class SideEffectModel
    extends AbstractModifierModel
    implements SideEffectDescriptor
{
    public SideEffectModel( Class<?> sideEffectClass, Class<?> instantiationClass )
    {
        super( sideEffectClass, instantiationClass );
    }
}


text:
package org.apache.tika.extractor;

import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Map;

import org.apache.tika.config.TikaConfig;
import org.apache.tika.detect.Detector;
import org.apache.tika.io.TikaInputStream;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.metadata.TikaCoreProperties;
import org.apache.tika.mime.MediaType;
import org.apache.tika.mime.MimeType;
import org.apache.tika.mime.MimeTypeException;
import org.apache.tika.mime.MimeTypes;
import org.apache.tika.parser.AutoDetectParser;
import org.apache.tika.parser.CompositeParser;
import org.apache.tika.parser.ParseContext;
import org.apache.tika.parser.Parser;
import org.apache.tika.parser.ParserDecorator;
import org.apache.tika.parser.PasswordProvider;
import org.apache.tika.utils.ExceptionUtils;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;

/**
 * Utility class to handle common issues with embedded documents.
 *

 * Use statically if all that is needed is getting the EmbeddedDocumentExtractor.
 * Otherwise, instantiate an instance.
 *

 * Note: This is not thread safe.  Make sure to instantiate one per thread.
 */
public class EmbeddedDocumentUtil implements Serializable {

    private final ParseContext context;
    private final EmbeddedDocumentExtractor embeddedDocumentExtractor;
    //these are lazily initialized and can be null
    private TikaConfig tikaConfig;
    private MimeTypes mimeTypes;
    private Detector detector;

    public EmbeddedDocumentUtil(ParseContext context) {
        this.context = context;
        this.embeddedDocumentExtractor = getEmbeddedDocumentExtractor(context);
    }

    /**
     * This offers a uniform way to get an EmbeddedDocumentExtractor from a ParseContext.
     * As of Tika 1.15, an AutoDetectParser will automatically be added to parse
     * embedded documents if no Parser.class is specified in the ParseContext.
     *

     * If you'd prefer not to parse embedded documents, set Parser.class
     * to {@link org.apache.tika.parser.EmptyParser} in the ParseContext.
     *
     * @param context
     * @return EmbeddedDocumentExtractor
     */
    public static EmbeddedDocumentExtractor getEmbeddedDocumentExtractor(ParseContext context) {
        EmbeddedDocumentExtractor extractor = context.get(EmbeddedDocumentExtractor.class);
        if (extractor == null) {
            //ensure that an AutoDetectParser is
            //available for parsing embedded docs TIKA-2096
            Parser embeddedParser = context.get(Parser.class);
            if (embeddedParser == null) {
                TikaConfig tikaConfig = context.get(TikaConfig.class);
                if (tikaConfig == null) {
                    context.set(Parser.class, new AutoDetectParser());
                } else {
                    context.set(Parser.class, new AutoDetectParser(tikaConfig));
                }
            }
            extractor = new ParsingEmbeddedDocumentExtractor(context);
        }
        return extractor;
    }

    public PasswordProvider getPasswordProvider() {
        return context.get(PasswordProvider.class);
    }

    public Detector getDetector() {
        //be as lazy as possible and cache the detector
        if (detector == null) {
            detector = context.get(Detector.class);
            if (detector == null) {
                detector = getTikaConfig().getDetector();
            }
        }
        return detector;
    }

    public MimeTypes getMimeTypes() {
        //be as lazy as possible and cache the mimeTypes
        if (mimeTypes == null) {
            mimeTypes = context.get(MimeTypes.class);
            if (mimeTypes == null) {
                mimeTypes = getTikaConfig().getMimeRepository();
            }
        }
        return mimeTypes;
    }

    public TikaConfig getTikaConfig() {
        //be as lazy as possible and cache the TikaConfig
        if (tikaConfig == null) {
            tikaConfig = context.get(TikaConfig.class);
            if (tikaConfig == null) {
                tikaConfig = TikaConfig.getDefaultConfig();
            }
        }
        return tikaConfig;
    }

    public String getExtension(TikaInputStream is, Metadata metadata) {
        String mimeString = metadata.get(Metadata.CONTENT_TYPE);
        TikaConfig config = getConfig();
        MimeType mimeType = null;
        MimeTypes types = config.getMimeRepository();
        boolean detected = false;
        if (mimeString != null) {
            try {
                mimeType = types.forName(mimeString);
            } catch (MimeTypeException e) {
                //swallow
            }
        }
        if (mimeType == null) {
            Detector detector = config.getDetector();
            try {
                MediaType mediaType = detector.detect(is, metadata);
                mimeType = types.forName(mediaType.toString());
                detected = true;
                is.reset();
            } catch (IOException e) {
                //swallow
            } catch (MimeTypeException e) {
                //swallow
            }
        }
        if (mimeType != null) {
            if (detected) {
                //set or correct the mime type
                metadata.set(Metadata.CONTENT_TYPE, mimeType.toString());
            }
            return mimeType.getExtension();
        }
        return ".bin";
    }

    public TikaConfig getConfig() {
        TikaConfig config = context.get(TikaConfig.class);
        if (config == null) {
            config = TikaConfig.getDefaultConfig();
        }
        return config;
    }

    public static void recordException(Throwable t, Metadata m) {
        String ex = ExceptionUtils.getFilteredStackTrace(t);
        m.add(TikaCoreProperties.TIKA_META_EXCEPTION_WARNING, ex);
    }

    public static void recordEmbeddedStreamException(Throwable t, Metadata m) {
        String ex = ExceptionUtils.getFilteredStackTrace(t);
        m.add(TikaCoreProperties.TIKA_META_EXCEPTION_EMBEDDED_STREAM, ex);
    }

    public boolean shouldParseEmbedded(Metadata m) {
        return getEmbeddedDocumentExtractor().shouldParseEmbedded(m);
    }

    private EmbeddedDocumentExtractor getEmbeddedDocumentExtractor() {
        return embeddedDocumentExtractor;
    }

    public void parseEmbedded(InputStream inputStream, ContentHandler handler,
                              Metadata metadata, boolean outputHtml) throws IOException, SAXException {
        embeddedDocumentExtractor.parseEmbedded(inputStream, handler, metadata, outputHtml);
    }

    /**
     * Tries to find an existing parser within the ParseContext.
     * It looks inside of CompositeParsers and ParserDecorators.
     * The use case is when a parser needs to parse an internal stream
     * that is _part_ of the document, e.g. rtf body inside an msg.
     *

     * Can return null if the context contains no parser or
     * the correct parser can't be found.
     *
     * @param clazz parser class to search for
     * @param context
     * @return
     */
    public static Parser tryToFindExistingLeafParser(Class clazz, ParseContext context) {
        Parser p = context.get(Parser.class);
        if (equals(p, clazz)) {
            return p;
        }
        Parser returnParser = null;
        if (p != null) {
            if (p instanceof ParserDecorator) {
                p = ((ParserDecorator)p).getWrappedParser();
            }
            if (equals(p, clazz)) {
                return p;
            }
            if (p instanceof CompositeParser) {
                returnParser = findInComposite((CompositeParser) p, clazz, context);
            }
        }
        if (returnParser != null && equals(returnParser, clazz)) {
            return returnParser;
        }

        return null;
    }

    private static Parser findInComposite(CompositeParser p, Class clazz, ParseContext context) {
        Map<MediaType, Parser> map = p.getParsers(context);
        for (Map.Entry<MediaType, Parser> e : map.entrySet()) {
            Parser candidate = e.getValue();
            if (equals(candidate, clazz)) {
                return candidate;
            }
            if (candidate instanceof ParserDecorator) {
                candidate = ((ParserDecorator)candidate).getWrappedParser();
            }
            if (equals(candidate, clazz)) {
                return candidate;
            }
            if (candidate instanceof CompositeParser) {
                candidate = findInComposite((CompositeParser) candidate, clazz, context);
            }
            if (equals(candidate, clazz)) {
                return candidate;
            }
        }
        return null;
    }

    private static boolean equals(Parser parser, Class clazz) {
        if (parser == null) {
            return false;
        }
        return parser.getClass().equals(clazz);
    }
}


text:
#ifndef ARITHM_H
#define ARITHM_H

typedef struct
       {
       double re;
       double im;
       }           complex;

complex cmplx (double a, double b);
complex add (complex x, complex y);
complex sub (complex x, complex y);
complex multpl(complex x, complex y);
complex divide(complex x, complex y);
complex conj (complex x);
double  module (complex x);
double  arg (complex x);
complex cmult (complex x, double c);

#endif


text:
package com.lazy.testproject1_weather.mvp.contract;

import com.lazy.testproject1_weather.entity.datasupport.City;
import com.lazy.testproject1_weather.entity.datasupport.County;
import com.lazy.testproject1_weather.entity.datasupport.Province;

import java.util.List;

import io.reactivex.Flowable;
import retrofit2.Retrofit;

/**
 * Created by liming on 2017/6/15.
 */

public interface AreaContract {
    interface Model {

        /**
         * 查询全国所有的省份
         *
         * @return
         */
        List<Province> getProvinceList();

        /**
         * 根据省份信息查询所有的城市
         *
         * @param province
         * @return
         */
        List<City> getCityList(Province province);

        /**
         * 根据城市信息查询所有的县
         *
         * @param city
         * @return
         */
        List<County> getCountyList(City city);

        /**
         * 根据类型级别从服务器获取数据并存入到本地数据库中,所以第二个参数需要传递Retrofit对象
         *
         * @param retrofit
         * @return
         */
        Flowable<String> queryProvinceFromServer(Retrofit retrofit);

        /**
         * 根据省份编号查询所有的城市信息
         *
         * @param retrofit
         * @param provinceCode 省份编号
         * @return
         */
        Flowable<String> queryCityFromServer(Retrofit retrofit, int provinceCode);

        /**
         * 根据城市编号查询所有的县级信息
         *
         * @param retrofit
         * @param provinceCode 省份编号
         * @param cityCode     城市编号
         * @return
         */
        Flowable<String> queryCountyFromServer(Retrofit retrofit, int provinceCode, int cityCode);
    }

    interface View {

        void queryProvinces();

        void queryCities(Province province);

        void queryCounties(City city);

        void showProgressDialog();

        void dismissDialog();
    }

    interface Presenter {

        List<Province> getProvinceList();

        List<City> getCityList(Province province);

        List<County> getCountyList(City city);

        void queryFromServer(int typeLevel, Province province, City city, Integer... integers);
    }
}


text:
<!DOCTYPE html>

    <title>继续</title>

>


text:
module Voltex
  module Generators
    class ViewsGenerator < Rails::Generators::Base
      source_root File.expand_path('../../../../app/views/voltex', __FILE__)
      desc 'Creates voltex views.'

      def create_views
        directory 'roles', 'app/views/voltex/roles'
      end
    end
  end
end


text:
package org.sakaiproject.tool.assessment.shared.api.assessment;

import java.util.List;
import java.util.Map;

import org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentIfc;
import org.sakaiproject.tool.assessment.data.ifc.assessment.ItemDataIfc;
import org.sakaiproject.tool.assessment.data.ifc.assessment.ItemMetaDataIfc;
import org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc;
import org.sakaiproject.tool.assessment.data.ifc.assessment.PublishedAssessmentIfc;

/**
 * The PublishedAssessmentServiceAPI declares a shared interface to get/set assessment
 * information for published assessments.
 * @author Ed Smiley <esmiley@stanford.edu>
 */
public interface PublishedAssessmentServiceAPI {

  public List getBasicInfoOfAllPublishedAssessments(String agentId, String orderBy,
                                             boolean ascending, String siteId);

  public List getAllActivePublishedAssessments(String orderBy);

  public List getAllActivePublishedAssessments(
      int pageSize, int pageNumber, String orderBy);

  public List getAllInActivePublishedAssessments(String orderBy);

  public List getAllInActivePublishedAssessments(
      int pageSize, int pageNumber, String orderBy);

  public List getAllPublishedAssessments(String orderBy, Integer status);

  public List getAllPublishedAssessments(
      int pageSize, int pageNumber, String orderBy, Integer status);

  public PublishedAssessmentIfc getPublishedAssessment(String assessmentId);

  public Long getPublishedAssessmentId(String assessmentId);

  public PublishedAssessmentIfc publishAssessment(AssessmentIfc assessment);

  public PublishedAssessmentIfc publishPreviewAssessment(AssessmentIfc
      assessment, String protocol);

  public void saveAssessment(PublishedAssessmentIfc assessment);

  public void removeAssessment(String assessmentId);

  public List getBasicInfoOfAllActivePublishedAssessments(String orderBy, boolean ascending);

  public List getBasicInfoOfAllInActivePublishedAssessments(String orderBy, boolean ascending);

  public PublishedAssessmentIfc getSettingsOfPublishedAssessment(String assessmentId);

  public ItemDataIfc loadPublishedItem(String itemId);

  public ItemTextIfc loadPublishedItemText(String itemTextId);

  public List getBasicInfoOfLastSubmittedAssessments(String agentId,
      String orderBy, boolean ascending);

  public Map getTotalSubmissionPerAssessment(String agentId);

  public Integer getTotalSubmission(String agentId, String publishedAssessmentId);

  public PublishedAssessmentIfc getPublishedAssessmentIdByAlias(String alias);

  public void saveOrUpdateMetaData(ItemMetaDataIfc meta);

  public Map getFeedbackHash();

  public Map getAllAssessmentsReleasedToAuthenticatedUsers();

  public String getPublishedAssessmentOwner(Long publishedAssessmentId);

}


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

<title>org.bouncycastle.asn1.anssi (Bouncy Castle Library 1.54 API Specification)</title>
<meta name="date" content="2015-12-29">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

org.bouncycastle.asn1.anssi

Interfaces

ANSSIObjectIdentifiers

Classes

ANSSINamedCurves


text:
var webpack = require('webpack');

module.exports = {
  entry: './',
  devtool: 'source-map',
  output: {
    filename: 'bundle.js',
  },
  resolve: {
    extensions: ['', '.js', '.jsx', '.less', '.css']
  },
  plugins: [
    new webpack.optimize.UglifyJsPlugin({ output: {comments: false} }),
    new webpack.DefinePlugin({
      "process.env": {
        // This has effect on the react lib size
        "NODE_ENV": JSON.stringify("production")
      }
    }),
    new webpack.NormalModuleReplacementPlugin( // allow examples to include react-mentions
      /^react-mentions$/,
      __dirname + '/../src'
    )
  ],
  module: {
    loaders: [
      { test: /\.jsx$/, loaders: [ 'jsx-loader?harmony'] },
      { test: /\.css$/, loader: 'style-loader!css-loader' },
      {
        test: /\.less$/,
        loaders: [
          'style-loader',
          'css-loader',
          'less-loader'
        ],
      }
    ]
  }
};


text:
import os
import re

from acmd.jcr.path import join

ROOT_IMPORT_DIR = "/tmp/acmd_assets_ingest"

class AssetException(Exception):
    pass

def get_dam_path(filepath, local_import_root, dam_import_root):
    local_dir = os.path.dirname(filepath)
    if dam_import_root is None:
        dam_import_root = join('/', os.path.basename(local_import_root))
    dam_path = create_dam_path(local_dir, local_import_root, dam_import_root)
    return clean_path(dam_path)

def create_dam_path(local_path, local_import_root, dam_import_root):
    """ Returns <ok>, <path> """
    ret = local_path.replace(local_import_root, dam_import_root)
    ret = ret.replace("\\", "/")
    return ret

def clean_path(path):
    """ Replace spaces in target path """
    ret = path.replace(' ', '_')
    pattern = re.compile("[a-zA-Z0-9_/-]+")
    if pattern.match(ret) is None:
        raise AssetException("File path {} contains unallowed characters".format(path))
    return ret

def filter_unwanted(filename):
    """ Returns true for hidden or unwanted files """
    return filename.startswith(".")

def status_ok(status_code):
    """ Returns true if http status code is considered success """
    return status_code == 200 or status_code == 201