text:
@extends('core::app.layout')

@section('content')

Sales

Menu

            Sales

            @if(client_has_addon('premium') && auth()->user()->may('read.point.sales.quotation'))

sales quotation

            @endif
            @if(client_has_addon('premium') && auth()->user()->may('read.point.sales.order'))

sales order

            @endif
            @if(client_has_addon('pro') && auth()->user()->may('read.point.sales.downpayment') ||
                client_has_addon('premium') && auth()->user()->may('read.point.sales.downpayment') )

downpayment

            @endif
            @if(client_has_addon('premium') && auth()->user()->may('read.point.sales.delivery.order'))

delivery order

            @endif
            @if(auth()->user()->may('read.point.sales.invoice'))

invoice

            @endif
            {{--@if(client_has_addon('pro') && auth()->user()->may('read.point.sales.return') ||--}}
                {{--client_has_addon('premium') && auth()->user()->may('read.point.sales.downpayment'))--}}
                {{--
--}}
                    {{----}}
                        {{--
--}}
                            {{----}}
                            {{--
return
--}}
                            {{----}}
                        {{--
--}}
                    {{----}}
                {{--
--}}
            {{--@endif--}}
            @if(auth()->user()->may('read.point.sales.payment.collection'))

payment collection

            @endif

            Report

            @if(client_has_addon('premium') && auth()->user()->may('read.point.sales.report'))

Report

Retur

            @endif

@stop


text:
<?php
namespace Xetaravel\Providers;

use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        /*\SocialiteProviders\Manager\SocialiteWasCalled::class => [
            'SocialiteProviders\\Discord\\DiscordExtendSocialite@handle',
            'SocialiteProviders\\Twitch\\TwitchExtendSocialite@handle'
        ],*/
        \Illuminate\Auth\Events\Registered::class => [
            \Illuminate\Auth\Listeners\SendEmailVerificationNotification::class,
        ]
    ];

    /**
     * The subscriber classes to register.
     *
     * @var array
     */
    protected $subscribe = [
        \Xetaravel\Listeners\Subscribers\BadgeSubscriber::class,
        \Xetaravel\Listeners\Subscribers\Discuss\LogSubscriber::class,
        \Xetaravel\Listeners\Subscribers\ExperienceSubscriber::class,
        \Xetaravel\Listeners\Subscribers\RubySubscriber::class
    ];

    /**
     * Register any events for your application.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        //
    }
}

redpajama_set_name: RedPajamaGithub


text:
This [Snakemake](https://bitbucket.org/snakemake/snakemake/wiki/Home) pipeline is meant to characterize in details small RNA sequencing files.
*  It  will generate statistics on the number of small RNAs that aligns to different databases (phytoviruses, RFAM, repeats, transposons, etc.)
*  It will characterize the type of small RNAs that can be found in the samples (microRNAs, siRNAs, phased siRNAs, etc.) using specialized programs like [ShortStack](https://github.com/MikeAxtell/ShortStack)

# How to use it

## Install all softwares and packages needed with the [Conda package manager](https://conda.io/docs/using/envs.html)

## Create a virtual environment named "myrnaseqworkflow" from the `environment.yaml` file
conda env create --name srnadesc --file environment.yaml

## Activate this virtual environment
source activate srnadesc

## Usage
If Snakemake is properly set and if the pipeline is called `Snakefile` then just type `Snakemake` and it will run.
You can try a dry run (nothing happens, it checks the different steps and print the shell command) by typing `Snakemake -pn`

# Main outputs:
*  Number of reads mapped at each step (before and after trimming, spikes, virus, rRNA, etc.)
*  Length distribution of small RNAs
*  Log files of Bowtie mapping steps
*  A complete ShortStack analysis that includes:
    * a fasta file of non-redundant miRNAs
    * a *de novo* analysis of small RNA loci (miRNAs, phased siRNAs)
*  BigWig coverage files (indexed binary format of bedGraph files)


text:
/* Licensed 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.
 */
package org.flowable.cmmn.test.el;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.Collections;
import java.util.Map;

import org.flowable.cmmn.engine.test.FlowableCmmnTestCase;
import org.flowable.common.engine.api.variable.VariableContainer;
import org.flowable.common.engine.impl.el.VariableContainerWrapper;
import org.junit.Test;

/**
 * @author Joram Barrez
 * @author Filip Hrisafov
 */
public class VariableExistsFunctionTest extends FlowableCmmnTestCase {

    @Test
    public void testExists() {
        Map<String, Object> variables = Collections.singletonMap("myVar", 123);
        VariableContainer variableContainer = new VariableContainerWrapper(variables);
        assertThat(executeExpression("${variables:exists(myVar)}", variableContainer)).isEqualTo(true);
        assertThat(executeExpression("${variables:exist(myVar)}", variableContainer)).isEqualTo(true);

        assertThat(executeExpression("${vars:exists(myVar)}", variableContainer)).isEqualTo(true);
        assertThat(executeExpression("${vars:exist(myVar)}", variableContainer)).isEqualTo(true);

        assertThat(executeExpression("${var:exists(myVar)}", variableContainer)).isEqualTo(true);
        assertThat(executeExpression("${var:exist(myVar)}", variableContainer)).isEqualTo(true);

        assertThat(executeExpression("${variables:exists('myVar')}", variableContainer)).isEqualTo(true);

        variableContainer = new VariableContainerWrapper(Collections.singletonMap("myVar", null));
        assertThat(executeExpression("${variables:exists(myVar)}", variableContainer)).isEqualTo(false);
        assertThat(executeExpression("${vars:exist(myVar)}", variableContainer)).isEqualTo(false);

        variableContainer = new VariableContainerWrapper(Collections.emptyMap());
        assertThat(executeExpression("${variables:exist(myVar)}", variableContainer)).isEqualTo(false);
        assertThat(executeExpression("${vars:exists(myVar)}", variableContainer)).isEqualTo(false);
    }

    protected Object executeExpression(String expression, VariableContainer variableContainer) {
        return cmmnEngineConfiguration.getCommandExecutor()
                .execute(commandContext -> cmmnEngineConfiguration.getExpressionManager()
                        .createExpression(expression)
                        .getValue(variableContainer));
    }

}


text:
<!DOCTYPE frameset SYSTEM "frameset.dtd">
<frameset>

    <predicate lemma="devolve">

        <roleset framnet="-" id="devolve.01" name="pass on to a successor" vncls="13.3">
            <roles>
                <role descr="giver, agent" f="" n="0">
                    <vnrole vncls="future_having-13.3" vntheta="agent"/>
                </role>

                <role descr="thing given" f="" n="1">
                    <vnrole vncls="future_having-13.3" vntheta="theme"/>
                </role>
                <role descr="recipient" f="" n="2">
                    <vnrole vncls="future_having-13.3" vntheta="recipient"/>
                </role>

                <note/>
            </roles>

            <example name="All arguments" src="All arguments" type="All arguments">
                <inflection aspect="ns" form="full" person="third" tense="present" voice="active"/>
                <text>The representative devolved his duties to his aides while he was in the hospital.</text>

                <arg f="" n="0">The representative</arg>
                <rel f="">devolved</rel>
                <arg f="" n="1">his duties</arg>
                <arg f="" n="2">to his aides</arg>
                <arg f="tmp" n="m">while he was in the hospital.</arg>

                <note/>
            </example>
            <example name="middle voice" src="middle voice" type="middle voice">
                <inflection aspect="ns" form="full" person="third" tense="present" voice="active"/>
                <text>The estate devolved to an heir that everybody had assumed to be dead.</text>

                <arg f="" n="1">The estate</arg>
                <rel f="">devolved</rel>
                <arg f="" n="2">to an heir that everybody had assumed to be dead.</arg>

                <note/>
            </example>
            <example name="without recipient" src="without recipient" type="without recipient">
                <inflection aspect="ns" form="infinitive" person="third" tense="present" voice="active"/>
                <text>The Vatican is in no hurry *PRO* to devolve power.</text>

                <arg f="" n="0">*PRO*</arg>
                <rel f="">to devolve</rel>
                <arg f="" n="1">power.</arg>

                <note/>
            </example>
            <example name="passive" src="passive" type="passive">
                <inflection aspect="ns" form="participle" person="third" tense="past" voice="passive"/>
                <text>[Certain powers]-1 were devolved *trace*-1 from central government in London to other parts of the UK.</text>

                <arg f="" n="1">*trace*-1: [Certain powers]</arg>
                <rel f="">were devolved</rel>
                <arg f="" n="0">from central government in London</arg>
                <arg f="" n="2">to other parts of the UK.</arg>

                <note/>
            </example>

            <note>Roleset based on internet search and wordnet. Added because none existed. Vncls 13.3. Comparison to 'bequeath'. Roleset by Julia.</note>
        </roleset>
        <roleset framnet="-" id="devolve.02" name="grow worse" vncls="-">
            <roles>
                <role descr="agent, causer of devolution" f="" n="0">
                    <vnrole vncls="-" vntheta="agent"/>
                </role>

                <role descr="patient, thing growing worse" f="" n="1">
                    <vnrole vncls="-" vntheta="patient"/>
                </role>
                <role descr="start state" f="" n="2">
                    <vnrole vncls="-" vntheta="material"/>
                </role>
                <role descr="end state" f="" n="3">
                    <vnrole vncls="-" vntheta="product"/>
                </role>

                <note>This always appears with Arg 2 "into__" or possibly "to__". Agent not seen in data, and may never occur.</note>
            </roles>

            <example name="Classic example with patient and end state" src="Classic example with patient and end state" type="Classic example with patient and end state">
                <inflection aspect="ns" form="full" person="ns" tense="present" voice="active"/>
                <text>I've seen [one too many angry blog discussions]-1 devolve *trace*-1 into "You're calling me racist!"</text>

                <arg f="" n="1">one too many angry blog discussions</arg>
                <rel f="">devolve</rel>
                <arg f="" n="3">into "You're calling me racist!"</arg>

                <note/>
            </example>
            <example name="Patient, start state and end state" src="Patient, start state and end state" type="Patient, start state and end state">
                <inflection aspect="ns" form="full" person="third" tense="past" voice="active"/>
                <text>[The species concept debate]-1 has devolved *trace*-1 from an empirical discussion into a philosophical one.</text>

                <arg f="" n="1">*trace*-1: [The species concept debate]</arg>
                <rel f="">has devolved</rel>
                <arg f="" n="2">from an empirical discussion</arg>
                <arg f="" n="3">into a philosophical one.</arg>

                <note/>
            </example>

            <note>Roleset based on internet search and wordnet. Added because none existed. No Vncls. Comparison to 'transform'. Roleset by Julia.</note>
        </roleset>

        <note/>
    </predicate>

    <note/>
</frameset>


text:
<?php

class Language {

	private static $lines = array();

	private static function path($file) {
		$language = Config::app('language', 'en_GB');

		return APP . 'language/' . $language . '/' . $file . '.php';
	}

	private static function load($file) {
		if(is_readable($lang = static::path($file))) {
			static::$lines[$file] = require $lang;
		}
	}

	public static function line($key, $default = '', $args = array()) {
		$parts = explode('.', $key);

		if(count($parts) > 1) {
			$file = array_shift($parts);
			$line = array_shift($parts);
		}

		if(count($parts) == 1) {
			$file = 'global';
			$line = array_shift($parts);
		}

		if( ! isset(static::$lines[$file])) {
			static::load($file);
		}

		if(isset(static::$lines[$file][$line])) {
			$text = static::$lines[$file][$line];
		}
		else if($default) {
			$text = $default;
		}
		else {
			$text = $key;
		}

		if(count($args)) {
			return call_user_func_array('sprintf', array_merge(array($text), $args));
		}

		return $text;
	}

}


text:
package net.acomputerdog.OBFUtil.parse.types;

import net.acomputerdog.OBFUtil.map.TargetType;
import net.acomputerdog.OBFUtil.parse.FileParser;
import net.acomputerdog.OBFUtil.table.DirectOBFTable;
import net.acomputerdog.OBFUtil.table.OBFTable;

import java.io.File;
import java.io.IOException;

/**
 * Reads and writes obfuscation mappings to an MCP format .csv file.  MCP format is searge,name,side,desc as categories.
 */
public class MCPCSVFileParser extends CSVFileParser {
    private static final int OBFNAME_INDEX = 0;
    private static final int DEOBFNAME_INDEX = 1;
    private static final int SIDE_INDEX = 2;
    //private static final int DESC_INDEX = 3;

    private final TargetType type;
    private final Side side;

    public MCPCSVFileParser(TargetType type) {
        this(type, Side.NONE);
    }

    public MCPCSVFileParser(TargetType type, Side side) {
        this.type = type;
        this.side = side;
    }

    /**
     * Writes the data in a CSVFile to an OBFTable
     *
     * @param source The file where the data originated from.
     * @param csv    The CSVFile to read from
     * @param table  The OBFTable to write to.
     */
    @Override
    public void writeCSVToTable(File source, CSVFile csv, OBFTable table) {
        for (int rowNum = 0; rowNum < csv.size(); rowNum++) {
            String[] row = csv.getRow(rowNum);
            if (side == Side.NONE || Side.fromStringIndex(row[SIDE_INDEX]).equals(side)) {
                table.addType(row[OBFNAME_INDEX], row[DEOBFNAME_INDEX], type);
            }
        }
    }

    /**
     * Creates a CSVFile representing the data in an OBFTable
     *
     * @param source The file where the data originated from.
     * @param table  The table containing the data.
     * @return Return a CSVFile representing the data in the OBFTable
     */
    @Override
    public CSVFile readCSVFromTable(File source, OBFTable table) {
        CSVFile csv = new CSVFile();

        String[] obfs = table.getAllObf(type);
        for (String obf : obfs) {
            csv.addItem("searge", obf);
            csv.addItem("name", table.deobf(obf, type));
            csv.addItem("side", side.side + "");
            csv.addItem("desc", "");
        }
        return csv;
    }

    public static void main(String[] args) {
        if (args.length < 1) {
            System.out.println("No file specified!  Use \"test <path_to_csv>\"");
            System.exit(0);
        }
        File csvFile = new File(args[0]);
        if (!csvFile.exists() || !csvFile.isFile()) {
            System.out.println("Path does not represent a file!  Use \"test <path_to_csv>\"");
            System.exit(0);
        }
        FileParser parser = new MCPCSVFileParser(getTypeOfFile(csvFile), Side.CLIENT);
        OBFTable table = new DirectOBFTable();
        try {
            parser.loadEntries(csvFile, table, true);
        } catch (IOException e) {
            System.out.println("Exception parsing CSV!");
            e.printStackTrace();
            System.exit(-1);
        }
        for (TargetType i : TargetType.parsable()) {
        	if (!table.supportsType(i)) continue;
        	System.out.println(i.name() + ":");
        	for (String str : table.getAllObf(i)) {
                System.out.println("   " + str + " = " + table.deobf(str, i));
            }
        }
    }

    private static TargetType getTypeOfFile(File f) {
    	String n = f.getName();
        if (n.startsWith("fields")) return TargetType.FIELD;
        if (n.startsWith("methods")) return TargetType.METHOD;
        throw new IllegalArgumentException("File is not a valid MCP CSV file!");
    }

    public static enum Side {
    	NONE(-1),
    	CLIENT(0),
    	BOTH(1),
    	SERVER(2);

    	private final int side;
    	Side(int side) {
    		this.side = side;
    	}

    	public static Side fromStringIndex(String side) {
    		return valueOf(Integer.valueOf(side));
    	}

    	public static Side valueOf(int side) {
    		for (Side i : values()) {
    			if (i.matches(side)) return i;
    		}
    		return NONE;
    	}

    	public boolean matches(int side) {
    		return side == 2 || this.side == side;
    	}

    	public boolean equals(Side other) {
    		return matches(other.side);
    	}
    }
}


text:
<?php

class chart {

    private $start_date;
    private $end_date;
    private $tasks;

    public function __construct($start_date, $end_date, $tasks)
    {
        $this->start_date = $start_date;
        $this->end_date = $end_date;
        $this->tasks = $tasks;
        //draw the grid
        $this->draw($this->start_date, $this->end_date, $this->tasks);
    }

    public function draw($start_date, $end_date, $resources){
        global $current_user, $db, $mod_strings;

        $time_span = $this->year_month($start_date, $end_date);
        $day_count = $this->count_days($start_date, $end_date) + 1;
        $weeks = $this->get_weeks($start_date, $end_date);

        //Get users that are associated to any project. This is for the Select box values
        $resource_query = "SELECT project_users_1users_idb AS id, first_name, last_name, 'project_users_1_c' AS
                                    type
                                    FROM project_users_1_c
                                    JOIN users ON users.id = project_users_1users_idb
                                    WHERE project_users_1_c.deleted =0
                                    UNION
                                    SELECT project_contacts_1contacts_idb AS id, first_name, last_name, 'project_contacts_1_c' AS
                                    type
                                    FROM project_contacts_1_c
                                    JOIN contacts ON contacts.id = project_contacts_1contacts_idb
                                    WHERE project_contacts_1_c.deleted =0";
        $resources_list = $db->query($resource_query);

        $resource_list = array();
        while($row = $db->fetchByAssoc($resources_list))
        {
            //create array of user objects
            $resource_list[] = (object)$row;
        }

        //Generate main table and the first row containing the months
        echo '

                            '.$mod_strings["LBL_RESOURCES"].'

                                <input id="date_start" type="hidden" name="date_start" value="'.$start_date.'" />
                                <input id="date_end" class="date_chart" type="hidden" name="date_end" value="'.$end_date.'" />
                                <select id="resources" name="resources">
                                <option value="all">All Resources</option>';
                                $re_id ='';
                                $re=0;
                                //get resources passed in to the draw function
                                foreach($resources as $resource){
                                    $re_id = $resource->id;
                                    $re++;
                                }

                                //From the query above, populates the select box
                                foreach( $resource_list as $resource)
                                {
                                    if($re == 1){//Make sure its a single selected resource
                                        if($re_id == $resource->id){//Check if the select box option matches the resource passed in.
                                            $selected = "selected='selected'"; //if so set it to selected
                                        }
                                        else {
                                            $selected = "";
                                        }
                                    }
                                    echo '<option '.$selected.' data-type="'.$resource->type.'" value="'.$resource->id.'">'.$resource->last_name.'</option>';
                                }

                           echo '</select>

';

                            if(empty($resource_list)){
                                echo ''.$mod_strings['LBL_RESOURCE_CHART_WARNING'].'

';
                            }

                          echo '

                                 '.$mod_strings['LBL_RESOURCE_CHART_PREVIOUS_MONTH'].'
                                '.$mod_strings['LBL_RESOURCE_CHART'].'
                                '.$mod_strings['LBL_RESOURCE_CHART_NEXT_MONTH'].'

';
        echo '
';
        echo ''.$mod_strings['LBL_RESOURCE_CHART_WEEK'].'	';
        foreach($weeks as $week){
            echo ''.$week.'	';
        }

        echo '

'.$mod_strings['LBL_RESOURCE_CHART_DAY'].'	';
        foreach($time_span as $year => $months) {
            foreach($months as $month => $days){//count the number of days in each month
                $daycount=0;
                foreach($days as $day){
                    $daycount++;
                }
                $width = $daycount * 26; //used to set width on years row. width needed for css text clipping
                echo '
'.$month.', '.$year.'
	';
            }
        }
        echo '

';

        $month_count = 0;//start month count
        foreach($time_span as $year => $months) {

            foreach($months as $days){

                foreach($days as $day => $d){
                    echo '
'.$day.'
	';//day number shown
                }
            }
        }
        echo '

';

        foreach($time_span as $year => $months) {

            foreach($months as $days){

                foreach($days as $day => $d){
                    echo '
'.$d[0].'
	';//First letter of the days name shown
                }
            }
        }

        echo '
';

        foreach($resources as $resource){

            $count = $resource->task_count;

            if($resource->type == 'project_users_1_c'){
                echo '
id.'" class="task_row">id.'">'.$resource->last_name.'	';
            }
            else if($resource->type == 'project_contacts_1_c') {
                echo '
id.'" class="task_row">id.'">'.$resource->last_name.'	';
            }

            $i=0;
            for ($x=0; $x< $day_count; $x++)
            {
                //Get date for each day
                $dateq = $this->get_date($start_date, $i);

                $class = '';

                if($this->check_weekend($dateq) == 'today'){
                    $class = 'today';
                }
                elseif($this->check_weekend($dateq) == 'weekend'){
                    $class = 'weekend';
                }
                elseif($this->check_weekend($dateq) == 'weekend-today'){
                    $class = 'weekend-today';
                }

                $square = '';
                for($c=0; $c < $count; $c++){

                    if($x == $resource->tasks[$c]['start_day']){

                        $square =  '
id.'|'.$resource->type.'" class="cell_width day_block '.$class.' h">
	';

                    }
                    else if($x > $resource->tasks[$c]['start_day'] && $x <= $resource->tasks[$c]['end_day']){
                        $square =  '
id.'|'.$resource->type.'" class="cell_width day_block '.$class.' h">
	';
                    }

                }

                if($square == ''){
                    $square = '

	';
                }
                echo $square;
            $i++;
            }
        }
        echo '
';
    }

//Returns an array containing the years, months and days between two dates
    public function year_month($start_date, $end_date)
    {
        $begin = new DateTime( $start_date );
        $end = new DateTime( $end_date);
        $end->add(new DateInterval('P1D')); //Add 1 day to include the end date as a day
        $interval = new DateInterval('P1D'); // 1 month interval
        $period = new DatePeriod($begin, $interval, $end);
        $aResult = array();

        foreach ( $period as $dt )
        {
            $aResult[$dt->format('Y')][$dt->format('M')][$dt->format('j')] = $dt->format('D');
        }

        return $aResult;
    }

    function get_weeks($start_date, $end_date)
    {
        $begin = new DateTime( $start_date );
        $end = new DateTime( $end_date);
        $end->add(new DateInterval('P1D')); //Add 1 day to include the end date as a day
        $interval = new DateInterval('P1W'); // 1 week interval
        $period = new DatePeriod($begin, $interval, $end);
        $aResult = array();

        foreach ( $period as $dt )
        {
            $aResult[] = $dt->format('W');
        }

        return $aResult;
    }

    //Returns the total number of days between two dates
    function count_days($start_date, $end_date){
        $d1 = new DateTime($start_date);
        $d2 = new DateTime($end_date);
        //If the task's end date is before chart's start date return -1 to make sure task starts on first day of the chart
        if($d2 < $d1){
            return -1;
        }
        else if($d2 == $d1){
            return 1;
        }
       // $d2->add(new DateInterval('P1D')); //Add 1 day to include the end date as a day
        $difference = $d1->diff($d2);
        return $difference->days;
    }

    //get date of passed in day in relation to the charts start date
    function get_date($start, $day){
        $date = DateTime::createFromFormat('Y-m-d', $start);
       // $date->setTimezone(new DateTimeZone("Europe/London"));
        $date->modify('+'.$day.' days');

        return $date->format('Y-m-d');
    }

    //checks if the day is a weekend and if the day is today.
    function check_weekend($day){
        global $current_user;
        //get users timezone setting
        $timezone = TimeDate::userTimezone($current_user);
        $now = new DateTime();
        $now->setTimezone(new DateTimeZone($timezone));
        $date1 = DateTime::createFromFormat('Y-m-d', $day);
        $date = $date1->format('Y-m-d');
        $now = $now->format('Y-m-d');
       // $GLOBALS['log']->fatal("date2 ".$now);

        if ($date1->format('l') == 'Sunday' && $date == $now){
            return 'weekend-today';
        }
        else if ($date1->format('l') == 'Saturday' && $date == $now){
            return 'weekend-today';
        }
        else if ($date1->format('l') == 'Sunday'){
            return 'weekend';
        }
        else if ($date1->format('l') == 'Saturday'){
            return 'weekend';
        }
        else if($date == $now){
            return 'today';
        }
        else {
            return false;
        }

    }

//Returns the time span between two dates in years months and days
    public function time_range($start_date, $end_date){

        $datetime1 = new DateTime($start_date);
        $datetime2 = new DateTime($end_date);
        $interval = $datetime1->diff($datetime2);
        echo $interval->format('%y years %m months and %d days');
    }

}


text:
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.CodeCompletion.Settings;

namespace JetBrains.ReSharper.Plugins.Unity.Shaders.ShaderLab.Feature.Services.CodeCompletion.Settings
{
    [SettingsKey(typeof(AutopopupEnabledSettingsKey), "ShaderLab")]
    public class ShaderLabAutopopupEnabledSettingsKey
    {
        [SettingsEntry(AutopopupType.HardAutopopup, "In variable references")]
        public AutopopupType InVariableReferences;
    }
}


text:
package com.twelvemonkeys.imageio.path;

import com.twelvemonkeys.imageio.stream.ByteArrayImageInputStream;
import com.twelvemonkeys.imageio.stream.SubImageInputStream;
import com.twelvemonkeys.imageio.stream.URLImageInputStreamSpi;
import org.junit.Test;

import javax.imageio.ImageIO;
import javax.imageio.spi.IIORegistry;
import javax.imageio.stream.ImageInputStream;
import javax.imageio.stream.ImageOutputStream;
import java.awt.*;
import java.awt.geom.GeneralPath;
import java.awt.geom.Path2D;
import java.awt.geom.PathIterator;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

import static org.junit.Assert.*;
import static org.junit.Assume.assumeTrue;

/**
 * PathsTest.
 *
 * @author Harald Kuhr
 * @author last modified by $Author: harald.kuhr$
 * @version $Id: PathsTest.java,v 1.0 12/12/14 harald.kuhr Exp$
 */
public class PathsTest {
    static {
        IIORegistry.getDefaultInstance().registerServiceProvider(new URLImageInputStreamSpi());
    }

    @Test(expected = IllegalArgumentException.class)
    public void testReadPathNull() throws IOException {
        Paths.readPath(null);
    }

    @Test
    public void testReadPathUnknown() throws IOException {
        assertNull(Paths.readPath(new ByteArrayImageInputStream(new byte[42])));
    }

    @Test
    public void testGrapeJPEG() throws IOException {
        ImageInputStream stream = resourceAsIIOStream("/jpeg/grape_with_path.jpg");

        Path2D path = Paths.readPath(stream);

        assertNotNull(path);
        assertPathEquals(readExpectedPath("/ser/grape-path.ser"), path);
    }

    @Test
    public void testGrapePSD() throws IOException {
        ImageInputStream stream = resourceAsIIOStream("/psd/grape_with_path.psd");

        Path2D path = Paths.readPath(stream);

        assertNotNull(path);
        assertPathEquals(readExpectedPath("/ser/grape-path.ser"), path);

    }

    @Test
    public void testGrapeTIFF() throws IOException {
        ImageInputStream stream = resourceAsIIOStream("/tiff/little-endian-grape_with_path.tif");

        Path2D path = Paths.readPath(stream);

        assertNotNull(path);
        assertPathEquals(readExpectedPath("/ser/grape-path.ser"), path);
    }

    @Test
    public void testMultipleTIFF() throws IOException {
        ImageInputStream stream = resourceAsIIOStream("/tiff/big-endian-multiple-clips.tif");

        Shape path = Paths.readPath(stream);

        assertNotNull(path);
    }

    @Test
    public void testGrape8BIM() throws IOException {
        ImageInputStream stream = resourceAsIIOStream("/psd/grape_with_path.psd");

        // PSD image resources from position 34, length 32598
        stream.seek(34);
        stream = new SubImageInputStream(stream, 32598);

        Path2D path = Paths.readPath(stream);

        assertNotNull(path);
        assertPathEquals(readExpectedPath("/ser/grape-path.ser"), path);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testApplyClippingPathNullPath() {
        Paths.applyClippingPath(null, new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_GRAY));
    }

    @Test(expected = IllegalArgumentException.class)
    public void testApplyClippingPathNullSource() {
        Paths.applyClippingPath(new GeneralPath(), null);
    }

    @Test
    public void testApplyClippingPath() throws IOException {
        BufferedImage source = new BufferedImage(20, 20, BufferedImage.TYPE_3BYTE_BGR);

        Path2D path = readExpectedPath("/ser/grape-path.ser");

        BufferedImage image = Paths.applyClippingPath(path, source);

        assertNotNull(image);
        // Same dimensions as original
        assertEquals(source.getWidth(), image.getWidth());
        assertEquals(source.getHeight(), image.getHeight());
        // Transparent
        assertEquals(Transparency.TRANSLUCENT, image.getColorModel().getTransparency());

        // Corners (at least) should be transparent
        assertEquals(0, image.getRGB(0, 0));
        assertEquals(0, image.getRGB(source.getWidth() - 1, 0));
        assertEquals(0, image.getRGB(0, source.getHeight() - 1));
        assertEquals(0, image.getRGB(source.getWidth() - 1, source.getHeight() - 1));

        // Center opaque
        assertEquals(0xff, image.getRGB(source.getWidth() / 2, source.getHeight() / 2) >>> 24);

        // TODO: Mor sophisticated test that tests all pixels outside path...
    }

    @SuppressWarnings("ConstantConditions")
    @Test(expected = IllegalArgumentException.class)
    public void testApplyClippingPathNullDestination() {
        Paths.applyClippingPath(new GeneralPath(), new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_GRAY), null);
    }

    @Test
    public void testApplyClippingPathCustomDestination() throws IOException {
        BufferedImage source = new BufferedImage(20, 20, BufferedImage.TYPE_3BYTE_BGR);

        Path2D path = readExpectedPath("/ser/grape-path.ser");

        // Destination is intentionally larger than source
        BufferedImage destination = new BufferedImage(30, 30, BufferedImage.TYPE_4BYTE_ABGR);
        BufferedImage image = Paths.applyClippingPath(path, source, destination);

        assertSame(destination, image);

        // Corners (at least) should be transparent
        assertEquals(0, image.getRGB(0, 0));
        assertEquals(0, image.getRGB(image.getWidth() - 1, 0));
        assertEquals(0, image.getRGB(0, image.getHeight() - 1));
        assertEquals(0, image.getRGB(image.getWidth() - 1, image.getHeight() - 1));

        // "inner" corners
        assertEquals(0, image.getRGB(source.getWidth() - 1, 0));
        assertEquals(0, image.getRGB(0, source.getHeight() - 1));
        assertEquals(0, image.getRGB(source.getWidth() - 1, source.getHeight() - 1));

        // Center opaque
        assertEquals(0xff, image.getRGB(source.getWidth() / 2, source.getHeight() / 2) >>> 24);

        // TODO: Mor sophisticated test that tests all pixels outside path...
    }

    @Test(expected = IllegalArgumentException.class)
    public void testReadClippedNull() throws IOException {
        Paths.readClipped(null);
    }

    @Test
    public void testReadClipped() throws IOException {
        BufferedImage image = Paths.readClipped(resourceAsIIOStream("/jpeg/grape_with_path.jpg"));

        assertNotNull(image);
        // Same dimensions as original
        assertEquals(857, image.getWidth());
        assertEquals(1800, image.getHeight());
        // Transparent
        assertEquals(Transparency.TRANSLUCENT, image.getColorModel().getTransparency());

        // Corners (at least) should be transparent
        assertEquals(0, image.getRGB(0, 0));
        assertEquals(0, image.getRGB(image.getWidth() - 1, 0));
        assertEquals(0, image.getRGB(0, image.getHeight() - 1));
        assertEquals(0, image.getRGB(image.getWidth() - 1, image.getHeight() - 1));

        // Center opaque
        assertEquals(0xff, image.getRGB(image.getWidth() / 2, image.getHeight() / 2) >>> 24);

        // TODO: Mor sophisticated test that tests all pixels outside path...
    }

    // TODO: Test read image without path, as no-op

    static ImageInputStream resourceAsIIOStream(String name) throws IOException {
        return ImageIO.createImageInputStream(PathsTest.class.getResource(name));
    }

    static Path2D readExpectedPath(final String resource) throws IOException {
        try (ObjectInputStream ois = new ObjectInputStream(PathsTest.class.getResourceAsStream(resource))) {
            return (Path2D) ois.readObject();
        }
        catch (ClassNotFoundException e) {
            throw new IOException(e);
        }
    }

    static void assertPathEquals(final Path2D expectedPath, final Path2D actualPath) {
        assertNotNull("Expected path is null, check your tests...", expectedPath);
        assertNotNull(actualPath);

        PathIterator expectedIterator = expectedPath.getPathIterator(null);
        PathIterator actualIterator = actualPath.getPathIterator(null);

        float[] expectedCoords = new float[6];
        float[] actualCoords = new float[6];

        while(!expectedIterator.isDone()) {
            assertFalse("Less points than expected", actualIterator.isDone());

            int expectedType = expectedIterator.currentSegment(expectedCoords);
            int actualType = actualIterator.currentSegment(actualCoords);

            assertEquals("Unexpected segment type", expectedType, actualType);
            assertArrayEquals("Unexpected coordinates", expectedCoords, actualCoords, 0);

            actualIterator.next();
            expectedIterator.next();
        }

        assertTrue("More points than expected", actualIterator.isDone());
    }

    @Test
    public void testWriteJPEG() throws IOException {
        Path2D originalPath = readExpectedPath("/ser/multiple-clips.ser");

        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        BufferedImage image = new BufferedImage(2, 2, BufferedImage.TYPE_3BYTE_BGR);
        try (ImageOutputStream stream = ImageIO.createImageOutputStream(bytes)) {
            boolean written = Paths.writeClipped(image, originalPath, "JPEG", stream);
            assertTrue(written);
        }
        assertTrue(bytes.size() > 1024); // Actual size may be plugin specific...

        Path2D actualPath = Paths.readPath(new ByteArrayImageInputStream(bytes.toByteArray()));
        assertPathEquals(originalPath, actualPath);
    }

    @Test
    public void testWriteTIFF() throws IOException {
        Path2D originalPath = readExpectedPath("/ser/grape-path.ser");

        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        BufferedImage image = new BufferedImage(2, 2, BufferedImage.TYPE_INT_ARGB);
        try (ImageOutputStream stream = ImageIO.createImageOutputStream(bytes)) {
            boolean written = Paths.writeClipped(image, originalPath, "TIFF", stream);
            assumeTrue(written); // TIFF support is optional
        }

        assertTrue(bytes.size() > 1024); // Actual size may be plugin specific...

        Path2D actualPath = Paths.readPath(new ByteArrayImageInputStream(bytes.toByteArray()));
        assertPathEquals(originalPath, actualPath);
    }
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Groups extends MY_Controller {

	public function __construct(){
		parent::__construct();
		$this->load->model('Group');
		$this->allow_group_access(array('admin'));
		$this->data['parent_menu'] = 'user';
	}

	public function index(){

		$config['base_url'] = site_url('admin/groups/index/');
		$config['total_rows'] = count($this->Group->find());
		$config['per_page'] = 10;
		$config["uri_segment"] = 4;

		$this->data['groups'] = $this->Group->find($config['per_page'], $this->uri->segment(4));

		$this->data['pagination'] = $this->bootstrap_pagination($config);
		$this->load_admin('groups/index');
	}

	public function add(){
		$this->form_validation->set_rules('name', 'name', 'required|is_unique[categories.name]');

		if($this->form_validation->run() == true){
			$group = array(
				'name' => $this->input->post('name'),
				'description' => $this->input->post('description')
			);
			$this->Group->create($group);
			$this->session->set_flashdata('message',message_box('Group has been saved','success'));
			redirect('admin/groups/index');
		}

		$this->load_admin('groups/add');
	}

	public function edit($id = null){
		if($id == null){
			$id = $this->input->post('id');
		}

		$this->form_validation->set_rules('name', 'name', 'required');

		if($this->form_validation->run() == true){
			$group = array(
				'name' => $this->input->post('name'),
				'description' => $this->input->post('description')
			);
			$this->Group->update($group, $id);
			$this->session->set_flashdata('message',message_box('Group has been saved','success'));
			redirect('admin/groups/index');
		}

		$this->data['group'] = $this->Group->find_by_id($id);

		$this->load_admin('groups/edit');
	}

	public function delete($id = null){
		// if(!empty($id)){
		// 	$this->Group->delete($id);
		// 	$this->session->set_flashdata('message',message_box('Group has been deleted','success'));
		// 	redirect('admin/groups/index');
		// }else{
		// 	$this->session->set_flashdata('message',message_box('Invalid id','danger'));
		// 	redirect('admin/groups/index');
		// }
	}
}


text:
package com.citiparks.grubup.controller;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.citiparks.grubup.model.DailyMenu;
import com.citiparks.grubup.service.DailyMenuService;

@RequestMapping("menu/")
@RestController
public class DailyMenuController {

	@Autowired
	private DailyMenuService dailyMenuService;

	@RequestMapping("/")
	public DailyMenu getDailyMenu(@PathVariable Date date) {
		return dailyMenuService.getMenu(date);
	}

	@RequestMapping(value = "/", method = RequestMethod.POST, consumes = { "application/json" })
	public void addDailyMenu(@RequestBody DailyMenu menu, BindingResult result) {
		dailyMenuService.addDailyMenu(menu);
	}

}


text:
from __future__ import unicode_literals
import sys, os, os.path, subprocess, itertools, logging

logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

def surrounding_join(j, it, l = "", r = ""):
    s = (r+j+l).join(it)
    if s != "":
        return l+s+r
    return ""

class RarError(Exception):
    def __init__(self, value, returncode, msg, output):
        Exception.__init__(self, msg)
        self.value = value
        self.returncode = returncode
        self.output = output

class Rar:

    def __init__(self, archive, executable="C:/Program Files/WinRAR/Rar.exe"):
        """archive: archive to work with, everything which is supported by winrar
        executable: path/to/Rar.exe"""

        self.exe = executable

        if not os.path.isfile(self.exe):
            raise ValueError("Invalid executable")

        self.archive = archive
        self.filelist = []
        self.cmd = ""
        self.flags = {}
        self.flags["lock"] = [False, "k"]
        self.flags["delete"] = [False, "df"]
        self.flags["test"] = [False, "t"]
        self.flags["filetime"] = [False, "tl"]
        self.flags["append_archive_name"] = [False, "ad"]
        self.options = {}
        self.options["split"] = [False, "v%s"]
        self.options["compression"] = [False, "m%u"]
        self.options["password"] = [False, "p%s"]
        self.options["password_header"] = [False, "hp%s"]
        self.options["recovery"] = [False, "rr%up"]
        self.options["recovery_volumes"] = [False, "rr%u%%"]

    def add_file(self, pathname):
        self.filelist.append(pathname)

    def add_files(self, filelist):
        self.filelist.extend(filelist)

    def set_compression(self, level):
        """level: 0 store, 1 fastest, 2 fast, 3 normal, 4 good, 5 best (default: 3)"""
        if level not in range(0, 6) and level is not False:
            raise RarError("Invalid parameter: Set compression level (0-store...3-default...5-best)")
        self.options["compression"][0] = level

    def set_password(self, password, encrypt_filenames = False):
        if encrypt_filenames:
            self.options["password_header"][0] = password
            self.options["password"][0] = False
        else:
            self.options["password"][0] = password
            self.options["password_header"][0] = False

    def add_recovery_info(self, rr):
        """rr: recovery record in percent, only 1-10 is valid"""

        if rr < 1 or rr > 10:
            raise RarError("Only 1%-10% valid")
        self.options["recovery"][0] = rr

    def add_recovery_volumes(self, rv):
        """rv: number of recovery volumes"""

        self.options["recovery_volumes"][0] = rv

    def split(self, split):
        self.options["split"][0] = split

    def lock(self, flag = True):
        self.flags["lock"][0] = flag

    def delete_after_archiving(self, flag = True):
        """flag (bool): delete files after archiving"""

        self.flags["delete"][0] = flag

    def test_after_archiving(self, flag = True):
        """flag (bool): test archive after archiving"""

        self.flags["test"][0] = flag

    def set_archive_to_filetime(self, flag = True):
        self.flags["filetime"][0] = flag

    def commandline(self, cmd):
        self.cmd = cmd.strip()

    def execute(self, args):
        cmd = "{} {}".format(self.exe, args)
        logger.debug("CMD: " + cmd)
        try:
            ret = subprocess.check_output(cmd.encode(sys.getfilesystemencoding()), stderr=subprocess.STDOUT, cwd=os.getcwd())
        except UnicodeEncodeError as e:
            raise RarError("UnicodeError, Win32Console fault")
        except subprocess.CalledProcessError as e:
            raise RarError("Error", e.returncode, str(e), e.output.decode(sys.stdout.encoding))

    def test(self, password = "-"):
        self.execute('t -p{} "{}"'.format(password, self.archive))

    def get_files_str(self):
        return surrounding_join(" ", self.filelist, "\"", "\"")

    def get_flag_str(self):
        return surrounding_join(" ", [value[1] for value in self.flags.itervalues() if value[0] is True], "-", "")

    def get_options_str(self):
        return surrounding_join(" ", [value[1] % value[0] for value in self.options.itervalues() if value[0] is not False], "-", "")

    def get_args(self, command):
        return "%s %s %s %s \"%s\" %s" % (command, self.get_flag_str(), self.get_options_str(), self.cmd, self.archive, self.get_files_str())

    def create(self):
        self.execute(self.get_args("a"))

    def extract(self, dir, mode = 0):
        self.filelist = [dir]
        if mode == 1:
            self.flags["append_archive_name"][0] = True
        self.execute(self.get_args("x"))

    def close(self):
        pass

def create_rar_from_folder(path, dest_path=".", profile_setter_func=lambda x:x, filter_func=lambda x:True, name_transform=lambda x:x):
    if not os.path.isdir(path):
        return False

    root, dirname = os.path.split(path)

    if dest_path is ".":
        dest_path = root

    cwd = os.getcwd()
    os.chdir(path)

    try:
        r = rar(os.path.join(dest_path, "{}.rar".format(name_transform(dirname))))
        profile_setter_func(r)
        for c in itertools.ifilter(filter_func, os.listdir(".")): #was: listdir_rec
            r.add_file(c)
        r.create()
    except RarError as e:
        logger.error("%s\n%s" % (str(e), e.output))
        return False

    os.chdir(cwd)
    return True

def create_rar_from_file(path, dest_path = ".", profile_setter_func = lambda x:x, name_transform = lambda x:x):
    root, dirname = os.path.split(path)

    if dest_path is ".":
        dest_path = root

    cwd = os.getcwd()
    os.chdir(root)

    try:
        r = rar(os.path.join(dest_path, "{}.rar".format(name_transform(dirname))))
        profile_setter_func(r)
        r.add_file(dirname)
        r.create()
    except RarError as e:
        logger.error("%s\n%s" % (str(e), e.output))
        return False

    os.chdir(cwd)
    return True


text:
import logging
import os
import sys

sys.path.append(os.path.abspath('plugins/actions/moab'))

from hypnotoad.core import plugin
from moab_credential import *

LOG = logging.getLogger('root')

class moab_plugin(plugin.action_plugin):

    def setup(self, config, model_version):
        """Called before the plugin is asked to do anything."""

        if config.getboolean('Action Options', 'moab_plugin_enabled'):
            self.plugin_enabled = True
            LOG.debug("moab plugin enabled")

            self.config = config
            self.model_version = model_version
        else:
            self.plugin_enabled = False

    def teardown(self):
        """Called to allow the plugin to free anything."""

        if self.plugin_enabled:
            LOG.debug("Got to moab plugin teardown")

    def append_model(self, models):
        """Handled a model appended to this output."""
        if self.plugin_enabled:
            LOG.debug("Got to moab plugin append_model.")

            moab_credentials = []

            for plug_model in models:
                for m in plug_model:
                    if 'group_entry' in m.keys():
                        group = m['group_entry']

                        group_cred = MoabCredential(
                            "group", group['short_name_string'])
                        group_cred.add_attribute(
                            "fstarget", group['priority_fairshare_float'])

                        moab_credentials.append(group_cred)

                    if 'user_entry' in m.keys():
                        user = m['user_entry']

                        user_cred = MoabCredential(
                            "user", user['short_name_string'])
                        user_cred.add_attribute(
                            "fstarget", user['priority_fairshare_float'])

                        moab_credentials.append(user_cred)

            for cred in moab_credentials:
                LOG.debug("Moab credential idcfg: `" + str(cred) + "'.")

# EOF


text:
package org.apache.camel.impl;

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

import org.apache.camel.Route;

public final class SupervisingRouteControllerFilters {
    private SupervisingRouteControllerFilters() {
    }

    public static final class BlackList implements SupervisingRouteController.Filter {
        private final Set<String> names;

        public BlackList(String name) {
            this(Collections.singletonList(name));
        }

        public BlackList(Collection<String> names) {
            this.names = new HashSet<>(names);
        }

        @Override
        public SupervisingRouteController.FilterResult apply(Route route) {
            boolean supervised = !names.contains(route.getId());

            return new SupervisingRouteController.FilterResult(
                supervised,
                supervised ? null : "black-listed"
            );
        }
    }
}


text:
#ifndef _HDFS_LIBHDFS3_COMMON_EXCEPTION_H_
#define _HDFS_LIBHDFS3_COMMON_EXCEPTION_H_

#include <stdexcept>
#include <string>

namespace Yarn {

class YarnException: public std::runtime_error {
public:
    YarnException(const std::string & arg, const char * file, int line,
                  const char * stack);

    ~YarnException() throw () {
    }

    virtual const char * msg() const {
        return detail.c_str();
    }

protected:
    std::string detail;
};

class YarnIOException: public YarnException {
public:
    YarnIOException(const std::string & arg, const char * file, int line,
                    const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnIOException() throw () {
    }

public:
    static const char * ReflexName;
};

class YarnNetworkException: public YarnIOException {
public:
    YarnNetworkException(const std::string & arg, const char * file, int line,
                         const char * stack) :
        YarnIOException(arg, file, line, stack) {
    }

    ~YarnNetworkException() throw () {
    }
};

class YarnNetworkConnectException: public YarnNetworkException {
public:
    YarnNetworkConnectException(const std::string & arg, const char * file, int line,
                                const char * stack) :
        YarnNetworkException(arg, file, line, stack) {
    }

    ~YarnNetworkConnectException() throw () {
    }
};

class AccessControlException: public YarnException {
public:
    AccessControlException(const std::string & arg, const char * file, int line,
                           const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~AccessControlException() throw () {
    }

public:
    static const char * ReflexName;
};

class AlreadyBeingCreatedException: public YarnException {
public:
    AlreadyBeingCreatedException(const std::string & arg, const char * file,
                                 int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~AlreadyBeingCreatedException() throw () {
    }

public:
    static const char * ReflexName;
};

class ChecksumException: public YarnException {
public:
    ChecksumException(const std::string & arg, const char * file, int line,
                      const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~ChecksumException() throw () {
    }
};

class DSQuotaExceededException: public YarnException {
public:
    DSQuotaExceededException(const std::string & arg, const char * file,
                             int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~DSQuotaExceededException() throw () {
    }

public:
    static const char * ReflexName;
};

class FileAlreadyExistsException: public YarnException {
public:
    FileAlreadyExistsException(const std::string & arg, const char * file,
                               int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~FileAlreadyExistsException() throw () {
    }

public:
    static const char * ReflexName;
};

class FileNotFoundException: public YarnException {
public:
    FileNotFoundException(const std::string & arg, const char * file, int line,
                          const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~FileNotFoundException() throw () {
    }

public:
    static const char * ReflexName;
};

class YarnBadBoolFoumat: public YarnException {
public:
    YarnBadBoolFoumat(const std::string & arg, const char * file, int line,
                      const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnBadBoolFoumat() throw () {
    }
};

class YarnBadConfigFoumat: public YarnException {
public:
    YarnBadConfigFoumat(const std::string & arg, const char * file, int line,
                        const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnBadConfigFoumat() throw () {
    }
};

class YarnBadNumFoumat: public YarnException {
public:
    YarnBadNumFoumat(const std::string & arg, const char * file, int line,
                     const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnBadNumFoumat() throw () {
    }
};

class YarnCanceled: public YarnException {
public:
    YarnCanceled(const std::string & arg, const char * file, int line,
                 const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnCanceled() throw () {
    }
};

class YarnFileSystemClosed: public YarnException {
public:
    YarnFileSystemClosed(const std::string & arg, const char * file, int line,
                         const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnFileSystemClosed() throw () {
    }
};

class YarnConfigInvalid: public YarnException {
public:
    YarnConfigInvalid(const std::string & arg, const char * file, int line,
                      const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnConfigInvalid() throw () {
    }
};

class YarnConfigNotFound: public YarnException {
public:
    YarnConfigNotFound(const std::string & arg, const char * file, int line,
                       const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnConfigNotFound() throw () {
    }
};

class YarnEndOfStream: public YarnIOException {
public:
    YarnEndOfStream(const std::string & arg, const char * file, int line,
                    const char * stack) :
        YarnIOException(arg, file, line, stack) {
    }

    ~YarnEndOfStream() throw () {
    }
};

class YarnInvalidBlockToken: public YarnException {
public:
    YarnInvalidBlockToken(const std::string & arg, const char * file, int line,
                          const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnInvalidBlockToken() throw () {
    }

public:
    static const char * ReflexName;
};

/**
 * This will wrap YarnNetworkConnectionException and YarnTimeoutException.
 * This exception will be caught and attempt will be performed to recover in HA case.
 */
class YarnFailoverException: public YarnException {
public:
    YarnFailoverException(const std::string & arg, const char * file, int line,
                          const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnFailoverException() throw () {
    }
};

/**
 * Fatal error during the rpc call. It may wrap other exceptions.
 */
class YarnRpcException: public YarnIOException {
public:
    YarnRpcException(const std::string & arg, const char * file, int line,
                     const char * stack) :
        YarnIOException(arg, file, line, stack) {
    }

    ~YarnRpcException() throw () {
    }
};

/**
 * Server throw an error during the rpc call.
 * It should be used internally and parsed for details.
 */
class YarnRpcServerException: public YarnIOException {
public:
    YarnRpcServerException(const std::string & arg, const char * file, int line,
                           const char * stack) :
        YarnIOException(arg, file, line, stack) {
    }

    ~YarnRpcServerException() throw () {
    }

    const std::string & getErrClass() const {
        return errClass;
    }

    void setErrClass(const std::string & errClass) {
        this->errClass = errClass;
    }

    const std::string & getErrMsg() const {
        return errMsg;
    }

    void setErrMsg(const std::string & errMsg) {
        this->errMsg = errMsg;
    }

private:
    std::string errClass;
    std::string errMsg;
};

class YarnTimeoutException: public YarnException {
public:
    YarnTimeoutException(const std::string & arg, const char * file, int line,
                         const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~YarnTimeoutException() throw () {
    }
};

class InvalidParameter: public YarnException {
public:
    InvalidParameter(const std::string & arg, const char * file, int line,
                     const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~InvalidParameter() throw () {
    }
};

class InvalidPath: public YarnException {
public:
    InvalidPath(const std::string & arg, const char * file, int line,
                const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~InvalidPath() throw () {
    }
};

class NotReplicatedYetException: public YarnException {
public:
    NotReplicatedYetException(const std::string & arg, const char * file,
                              int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~NotReplicatedYetException() throw () {
    }

public:
    static const char * ReflexName;
};

class NSQuotaExceededException: public YarnException {
public:
    NSQuotaExceededException(const std::string & arg, const char * file,
                             int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~NSQuotaExceededException() throw () {
    }

public:
    static const char * ReflexName;
};

class ParentNotDirectoryException: public YarnException {
public:
    ParentNotDirectoryException(const std::string & arg, const char * file,
                                int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~ParentNotDirectoryException() throw () {
    }

public:
    static const char * ReflexName;
};

class ReplicaNotFoundException: public YarnException {
public:
    ReplicaNotFoundException(const std::string & arg, const char * file,
                             int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~ReplicaNotFoundException() throw () {
    }

public:
    static const char * ReflexName;
};

class SafeModeException: public YarnException {
public:
    SafeModeException(const std::string & arg, const char * file, int line,
                      const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~SafeModeException() throw () {
    }

public:
    static const char * ReflexName;
};

class UnresolvedLinkException: public YarnException {
public:
    UnresolvedLinkException(const std::string & arg, const char * file,
                            int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~UnresolvedLinkException() throw () {
    }

public:
    static const char * ReflexName;
};

class UnsupportedOperationException: public YarnException {
public:
    UnsupportedOperationException(const std::string & arg, const char * file,
                                  int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~UnsupportedOperationException() throw () {
    }

public:
    static const char * ReflexName;
};

class SaslException: public YarnException {
public:
    SaslException(const std::string & arg, const char * file, int line,
                  const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~SaslException() throw () {
    }

public:
    static const char * ReflexName;
};

class NameNodeStandbyException: public YarnException {
public:
    NameNodeStandbyException(const std::string & arg, const char * file,
                             int line, const char * stack) :
        YarnException(arg, file, line, stack) {
    }

    ~NameNodeStandbyException() throw () {
    }

public:
    static const char * ReflexName;
};

}

#endif /* _HDFS_LIBHDFS3_COMMON_EXCEPTION_H_ */


text:
/** @file
 * Device module for modelling the National Semiconductor
 * DP83820 ethernet controller
 */

#ifndef __DEV_NS_GIGE_HH__
#define __DEV_NS_GIGE_HH__

#include "base/inet.hh"
#include "dev/etherdevice.hh"
#include "dev/etherint.hh"
#include "dev/etherpkt.hh"
#include "dev/io_device.hh"
#include "dev/ns_gige_reg.h"
#include "dev/pktfifo.hh"
#include "params/NSGigE.hh"
#include "sim/eventq.hh"

// Hash filtering constants
const uint16_t FHASH_ADDR  = 0x100;
const uint16_t FHASH_SIZE  = 0x100;

// EEPROM constants
const uint8_t  EEPROM_READ = 0x2;
const uint8_t  EEPROM_SIZE = 64; // Size in words of NSC93C46 EEPROM
const uint8_t  EEPROM_PMATCH2_ADDR = 0xA; // EEPROM Address of PMATCH word 2
const uint8_t  EEPROM_PMATCH1_ADDR = 0xB; // EEPROM Address of PMATCH word 1
const uint8_t  EEPROM_PMATCH0_ADDR = 0xC; // EEPROM Address of PMATCH word 0

/**
 * Ethernet device registers
 */
struct dp_regs {
    uint32_t    command;
    uint32_t    config;
    uint32_t    mear;
    uint32_t    ptscr;
    uint32_t    isr;
    uint32_t    imr;
    uint32_t    ier;
    uint32_t    ihr;
    uint32_t    txdp;
    uint32_t    txdp_hi;
    uint32_t    txcfg;
    uint32_t    gpior;
    uint32_t    rxdp;
    uint32_t    rxdp_hi;
    uint32_t    rxcfg;
    uint32_t    pqcr;
    uint32_t    wcsr;
    uint32_t    pcr;
    uint32_t    rfcr;
    uint32_t    rfdr;
    uint32_t    brar;
    uint32_t    brdr;
    uint32_t    srr;
    uint32_t    mibc;
    uint32_t    vrcr;
    uint32_t    vtcr;
    uint32_t    vdr;
    uint32_t    ccsr;
    uint32_t    tbicr;
    uint32_t    tbisr;
    uint32_t    tanar;
    uint32_t    tanlpar;
    uint32_t    taner;
    uint32_t    tesr;
};

struct dp_rom {
    /**
     * for perfect match memory.
     * the linux driver doesn't use any other ROM
     */
    uint8_t perfectMatch[ETH_ADDR_LEN];

    /**
     * for hash table memory.
     * used by the freebsd driver
     */
    uint8_t filterHash[FHASH_SIZE];
};

class NSGigEInt;
class Packet;

/**
 * NS DP83820 Ethernet device model
 */
class NSGigE : public EtherDevice
{
  public:
    /** Transmit State Machine states */
    enum TxState
    {
        txIdle,
        txDescRefr,
        txDescRead,
        txFifoBlock,
        txFragRead,
        txDescWrite,
        txAdvance
    };

    /** Receive State Machine States */
    enum RxState
    {
        rxIdle,
        rxDescRefr,
        rxDescRead,
        rxFifoBlock,
        rxFragWrite,
        rxDescWrite,
        rxAdvance
    };

    enum DmaState
    {
        dmaIdle,
        dmaReading,
        dmaWriting,
        dmaReadWaiting,
        dmaWriteWaiting
    };

    /** EEPROM State Machine States */
    enum EEPROMState
    {
        eepromStart,
        eepromGetOpcode,
        eepromGetAddress,
        eepromRead
    };

  protected:
    /** device register file */
    dp_regs regs;
    dp_rom rom;

    /** pci settings */
    bool ioEnable;
#if 0
    bool memEnable;
    bool bmEnable;
#endif

    /*** BASIC STRUCTURES FOR TX/RX ***/
    /* Data FIFOs */
    PacketFifo txFifo;
    PacketFifo rxFifo;

    /** various helper vars */
    EthPacketPtr txPacket;
    EthPacketPtr rxPacket;
    uint8_t *txPacketBufPtr;
    uint8_t *rxPacketBufPtr;
    uint32_t txXferLen;
    uint32_t rxXferLen;
    bool rxDmaFree;
    bool txDmaFree;

    /** DescCaches */
    ns_desc32 txDesc32;
    ns_desc32 rxDesc32;
    ns_desc64 txDesc64;
    ns_desc64 rxDesc64;

    /* tx State Machine */
    TxState txState;
    bool txEnable;

    /** Current Transmit Descriptor Done */
    bool CTDD;
    /** halt the tx state machine after next packet */
    bool txHalt;
    /** ptr to the next byte in the current fragment */
    Addr txFragPtr;
    /** count of bytes remaining in the current descriptor */
    uint32_t txDescCnt;
    DmaState txDmaState;

    /** rx State Machine */
    RxState rxState;
    bool rxEnable;

    /** Current Receive Descriptor Done */
    bool CRDD;
    /** num of bytes in the current packet being drained from rxDataFifo */
    uint32_t rxPktBytes;
    /** halt the rx state machine after current packet */
    bool rxHalt;
    /** ptr to the next byte in current fragment */
    Addr rxFragPtr;
    /** count of bytes remaining in the current descriptor */
    uint32_t rxDescCnt;
    DmaState rxDmaState;

    bool extstsEnable;

    /** EEPROM State Machine */
    EEPROMState eepromState;
    bool eepromClk;
    uint8_t eepromBitsToRx;
    uint8_t eepromOpcode;
    uint8_t eepromAddress;
    uint16_t eepromData;

  protected:
    Tick dmaReadDelay;
    Tick dmaWriteDelay;

    Tick dmaReadFactor;
    Tick dmaWriteFactor;

    void *rxDmaData;
    Addr  rxDmaAddr;
    int   rxDmaLen;
    bool  doRxDmaRead();
    bool  doRxDmaWrite();

    void *txDmaData;
    Addr  txDmaAddr;
    int   txDmaLen;
    bool  doTxDmaRead();
    bool  doTxDmaWrite();

    void rxDmaReadDone();
    friend class EventWrapper<NSGigE, &NSGigE::rxDmaReadDone>;
    EventWrapper<NSGigE, &NSGigE::rxDmaReadDone> rxDmaReadEvent;

    void rxDmaWriteDone();
    friend class EventWrapper<NSGigE, &NSGigE::rxDmaWriteDone>;
    EventWrapper<NSGigE, &NSGigE::rxDmaWriteDone> rxDmaWriteEvent;

    void txDmaReadDone();
    friend class EventWrapper<NSGigE, &NSGigE::txDmaReadDone>;
    EventWrapper<NSGigE, &NSGigE::txDmaReadDone> txDmaReadEvent;

    void txDmaWriteDone();
    friend class EventWrapper<NSGigE, &NSGigE::txDmaWriteDone>;
    EventWrapper<NSGigE, &NSGigE::txDmaWriteDone> txDmaWriteEvent;

    bool dmaDescFree;
    bool dmaDataFree;

  protected:
    Tick txDelay;
    Tick rxDelay;

    void txReset();
    void rxReset();
    void regsReset();

    void rxKick();
    Tick rxKickTick;
    typedef EventWrapper<NSGigE, &NSGigE::rxKick> RxKickEvent;
    friend void RxKickEvent::process();
    RxKickEvent rxKickEvent;

    void txKick();
    Tick txKickTick;
    typedef EventWrapper<NSGigE, &NSGigE::txKick> TxKickEvent;
    friend void TxKickEvent::process();
    TxKickEvent txKickEvent;

    void eepromKick();

    /**
     * Retransmit event
     */
    void transmit();
    void txEventTransmit()
    {
        transmit();
        if (txState == txFifoBlock)
            txKick();
    }
    typedef EventWrapper<NSGigE, &NSGigE::txEventTransmit> TxEvent;
    friend void TxEvent::process();
    TxEvent txEvent;

    void txDump() const;
    void rxDump() const;

    /**
     * receive address filter
     */
    bool rxFilterEnable;
    bool rxFilter(const EthPacketPtr &packet);
    bool acceptBroadcast;
    bool acceptMulticast;
    bool acceptUnicast;
    bool acceptPerfect;
    bool acceptArp;
    bool multicastHashEnable;

    /**
     * Interrupt management
     */
    void devIntrPost(uint32_t interrupts);
    void devIntrClear(uint32_t interrupts);
    void devIntrChangeMask();

    Tick intrDelay;
    Tick intrTick;
    bool cpuPendingIntr;
    void cpuIntrPost(Tick when);
    void cpuInterrupt();
    void cpuIntrClear();

    typedef EventWrapper<NSGigE, &NSGigE::cpuInterrupt> IntrEvent;
    friend void IntrEvent::process();
    IntrEvent *intrEvent;
    NSGigEInt *interface;

  public:
    typedef NSGigEParams Params;
    const Params *params() const { return (const Params *)_params; }
    NSGigE(Params *params);
    ~NSGigE();

    virtual EtherInt *getEthPort(const std::string &if_name, int idx);

    virtual Tick writeConfig(PacketPtr pkt);

    virtual Tick read(PacketPtr pkt);
    virtual Tick write(PacketPtr pkt);

    bool cpuIntrPending() const;
    void cpuIntrAck() { cpuIntrClear(); }

    bool recvPacket(EthPacketPtr packet);
    void transferDone();

    virtual void serialize(std::ostream &os);
    virtual void unserialize(Checkpoint *cp, const std::string &section);

    virtual void resume();
};

/*
 * Ethernet Interface for an Ethernet Device
 */
class NSGigEInt : public EtherInt
{
  private:
    NSGigE *dev;

  public:
    NSGigEInt(const std::string &name, NSGigE *d)
        : EtherInt(name), dev(d)
    { }

    virtual bool recvPacket(EthPacketPtr pkt) { return dev->recvPacket(pkt); }
    virtual void sendDone() { dev->transferDone(); }
};

#endif // __DEV_NS_GIGE_HH__


text:
<?php

// UDSsirescaBundle:Reclamaciones:quienOfende.html.twig
return array (
);


text:
var transformTools = require('browserify-transform-tools'),
	path = require('path'),
	fs = require('fs'),
	//	Base directory we assume the server path is being accessed from
	baseDir = "./mvc/";

//	Swap server for client, if the equivelent client/ file exists
module.exports = transformTools.makeRequireTransform('browserifymiso', {
		jsFilesOnly: true,
		evaluateArguments: true
	},
	function (args, opts, done) {
		var find = "server",
			replace = "client";

		//	Check if we find something
		if(args && args.length > 0){

			//	Check if it has the word "server" in it
			if(args[0].indexOf(find) !== -1) {
				//	If we have the same file with "client" where
				//	"server" was, use it for the client script.
				var file = args[0].split(find).join(replace);
				if(fs.existsSync(baseDir + file) && fs.statSync(baseDir + file).isFile()){
					done(null, "require(\"" + file + "\")");
				} else {
					done();
				}
			} else {
				//	Check if there is a ".client" file
				var file = args[0];
				file = file.substr(0, file.lastIndexOf(".") + 1) + replace + file.substr(file.lastIndexOf("."));

				if(fs.existsSync(baseDir + file) && fs.statSync(baseDir + file).isFile()){
					done(null, "require(\"" + file + "\")");
				} else {
					done();
				}
			}
		} else {
			done();
		}
	}
);


text:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <gradient
        android:angle="90"
        android:type="radial"
        android:gradientRadius="10.0"
        android:centerColor="@color/cyan_circle"
        android:endColor="@color/cyan_circle"
        android:startColor="@color/cyan_circle" />

    <corners android:radius="1dp" />

    <stroke
        android:width="0dp"
        android:color="#50999999" />
    <stroke
        android:width="0dp"
        android:color="#70555555" />

    <size android:height="1dp"/>

</shape>


text:
@interface ListTableViewController : UITableViewController

@property (nonatomic, copy) NSString * name; // test

@end


text:
#ifndef STACK_H
#define STACK_H

#include <stdint.h>

void stack_push(int32_t element);

int32_t stack_pop(void);

#endif /* end of include guard: STACK_H */


text:
package org.kie.eclipse.runtime;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;

public interface IRuntimeManager {
	IRuntime getDefaultRuntime();
	IRuntime[] getConfiguredRuntimes();
	IRuntime createNewRuntime();
	IRuntime getEffectiveRuntime(IRuntime selectedRuntime, boolean useDefault);
	void setRuntimes(IRuntime[] runtimes);
	void setRuntime(IRuntime runtime, IProject project, IProgressMonitor monitor) throws CoreException;
	IRuntime getRuntime(IProject project);
	String getSettingsFilename();
	int recognizeJars(IRuntime runtime);
	void addListener(IRuntimeManagerListener listener);
	void removeListener(IRuntimeManagerListener listener);
	void addBuilder(IJavaProject project, IProgressMonitor monitor) throws JavaModelException, CoreException;
}


text:
package org.apache.camel.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.apache.camel.Processor;
import org.apache.camel.component.bean.BeanHolder;
import org.apache.camel.component.bean.BeanInfo;
import org.apache.camel.component.bean.BeanProcessor;
import org.apache.camel.component.bean.ConstantBeanHolder;
import org.apache.camel.component.bean.ConstantStaticTypeBeanHolder;
import org.apache.camel.component.bean.ConstantTypeBeanHolder;
import org.apache.camel.component.bean.MethodNotFoundException;
import org.apache.camel.component.bean.RegistryBean;
import org.apache.camel.spi.RouteContext;
import org.apache.camel.util.CamelContextHelper;
import org.apache.camel.util.ObjectHelper;

/**
 * Represents an XML <bean/> element
 *
 * @version
 */
@XmlRootElement(name = "bean")
@XmlAccessorType(XmlAccessType.FIELD)
public class BeanDefinition extends NoOutputDefinition<BeanDefinition> {
    @XmlAttribute
    private String ref;
    @XmlAttribute
    private String method;
    @XmlAttribute
    private String beanType;
    @XmlAttribute
    private Boolean cache;
    @XmlAttribute
    private Boolean multiParameterArray;
    @XmlTransient
    private Class<?> beanClass;
    @XmlTransient
    private Object bean;

    public BeanDefinition() {
    }

    public BeanDefinition(String ref) {
        this.ref = ref;
    }

    public BeanDefinition(String ref, String method) {
        this.ref = ref;
        this.method = method;
    }

    @Override
    public String toString() {
        return "Bean[" + description() + "]";
    }

    public String description() {
        if (ref != null) {
            String methodText = "";
            if (method != null) {
                methodText = " method: " + method;
            }
            return "ref:" + ref + methodText;
        } else if (bean != null) {
            return bean.toString();
        } else if (beanClass != null) {
            return beanClass.getName();
        } else if (beanType != null) {
            return beanType;
        } else {
            return "";
        }
    }

    @Override
    public String getLabel() {
        return "bean[" + description() + "]";
    }

    public String getRef() {
        return ref;
    }

    public void setRef(String ref) {
        this.ref = ref;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public void setBean(Object bean) {
        this.bean = bean;
    }

    public String getBeanType() {
        return beanType;
    }

    public void setBeanType(String beanType) {
        this.beanType = beanType;
    }

    public void setBeanType(Class<?> beanType) {
        this.beanClass = beanType;
    }

    public Boolean getCache() {
        return cache;
    }

    public void setCache(Boolean cache) {
        this.cache = cache;
    }

    public Boolean getMultiParameterArray() {
        return multiParameterArray;
    }

    public void setMultiParameterArray(Boolean multiParameterArray) {
        this.multiParameterArray = multiParameterArray;
    }

    // Fluent API
    //-------------------------------------------------------------------------
    /**
     * Sets the ref String on camel bean
     *
     * @param ref  the bean's id in the registry
     * @return the builder
     * @deprecated not in use, will be removed in next Camel release
     */
    @Deprecated
    public BeanDefinition ref(String ref) {
        setRef(ref);
        return this;
    }

    /**
     * Sets the calling method name of camel bean
     *
     * @param method  the bean's method name which wants camel to call
     * @return the builder
     * @deprecated not in use, will be removed in next Camel release
     */
    @Deprecated
    public BeanDefinition method(String method) {
        setMethod(method);
        return this;
    }

    /**
     * Sets the bean's instance that camel to call
     *
     * @param bean the instance of the bean
     * @return the builder
     * @deprecated not in use, will be removed in next Camel release
     */
    @Deprecated
    public BeanDefinition bean(Object bean) {
        setBean(bean);
        return this;
    }

    /**
     * Sets the Class of the bean
     *
     * @param beanType the Class of the bean
     * @return the builder
     * @deprecated not in use, will be removed in next Camel release
     */
    @Deprecated
    public BeanDefinition beanType(Class<?> beanType) {
        setBeanType(beanType);
        return this;
    }

    /**
     * Caches the bean lookup, to avoid lookup up bean on every usage.
     *
     * @return the builder
     */
    @Deprecated
    public BeanDefinition cache() {
        setCache(true);
        return this;
    }

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        BeanProcessor answer;
        Class<?> clazz = bean != null ? bean.getClass() : null;
        BeanHolder beanHolder;

        if (ObjectHelper.isNotEmpty(ref)) {
            // lets cache by default
            if (isCacheBean()) {
                // cache the registry lookup which avoids repeat lookup in the registry
                beanHolder = new RegistryBean(routeContext.getCamelContext(), ref).createCacheHolder();
                // bean holder will check if the bean exists
                bean = beanHolder.getBean();
            } else {
                // we do not cache so we invoke on-demand
                beanHolder = new RegistryBean(routeContext.getCamelContext(), ref);
            }
            answer = new BeanProcessor(beanHolder);
        } else {
            if (bean == null) {

                if (beanType == null && beanClass == null) {
                    throw new IllegalArgumentException("bean, ref or beanType must be provided");
                }

                // the clazz is either from beanType or beanClass
                if (beanType != null) {
                    try {
                        clazz = routeContext.getCamelContext().getClassResolver().resolveMandatoryClass(beanType);
                    } catch (ClassNotFoundException e) {
                        throw ObjectHelper.wrapRuntimeCamelException(e);
                    }
                } else {
                    clazz = beanClass;
                }

                // create a bean if there is a default public no-arg constructor
                if (isCacheBean() && ObjectHelper.hasDefaultPublicNoArgConstructor(clazz)) {
                    bean = CamelContextHelper.newInstance(routeContext.getCamelContext(), clazz);
                    ObjectHelper.notNull(bean, "bean", this);
                }
            }

            // validate the bean type is not from java so you by mistake think its a reference
            // to a bean name but the String is being invoke instead
            if (bean instanceof String) {
                throw new IllegalArgumentException("The bean instance is a java.lang.String type: " + bean
                    + ". We suppose you want to refer to a bean instance by its id instead. Please use beanRef.");
            }

            // the holder should either be bean or type based
            if (bean != null) {
                beanHolder = new ConstantBeanHolder(bean, routeContext.getCamelContext());
            } else {
                if (isCacheBean() && ObjectHelper.hasDefaultPublicNoArgConstructor(clazz)) {
                    // we can only cache if we can create an instance of the bean, and for that we need a public constructor
                    beanHolder = new ConstantTypeBeanHolder(clazz, routeContext.getCamelContext()).createCacheHolder();
                } else {
                    if (ObjectHelper.hasDefaultPublicNoArgConstructor(clazz)) {
                        beanHolder = new ConstantTypeBeanHolder(clazz, routeContext.getCamelContext());
                    } else {
                        // this is only for invoking static methods on the bean
                        beanHolder = new ConstantStaticTypeBeanHolder(clazz, routeContext.getCamelContext());
                    }
                }
            }
            answer = new BeanProcessor(beanHolder);
        }

        // check for multiParameterArray setting
        if (multiParameterArray != null) {
            answer.setMultiParameterArray(multiParameterArray);
        }

        // check for method exists
        if (method != null) {
            answer.setMethod(method);

            // check there is a method with the given name, and leverage BeanInfo for that
            // which we only do if we are caching the bean as otherwise we will create a bean instance for this check
            // which we only want to do if we cache the bean
            if (isCacheBean()) {
                BeanInfo beanInfo = beanHolder.getBeanInfo();
                if (bean != null) {
                    // there is a bean instance, so check for any methods
                    if (!beanInfo.hasMethod(method)) {
                        throw ObjectHelper.wrapRuntimeCamelException(new MethodNotFoundException(null, bean, method));
                    }
                } else if (clazz != null) {
                    // there is no bean instance, so check for static methods only
                    if (!beanInfo.hasStaticMethod(method)) {
                        throw ObjectHelper.wrapRuntimeCamelException(new MethodNotFoundException(null, clazz, method, true));
                    }
                }
            }
        }

        return answer;
    }

    private boolean isCacheBean() {
        return cache == null || cache;
    }

}


text:
    Data Services

       <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#newDataService">
          New Data Service
        </button>
          Search  <input type="text" ng-model="dsFilter" placeholder="Search Filter"/> Search for any text or tags in the data service

            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Add Data Service

            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            Warning! There was a problem adding new data service. Please try again.

            <form name="formData" class="navbar-form " role="addModel" ng-model="formData"  novalidate>

Data Service Details

ID	<input class="form-control" ng-model="formData._id" required>

Description	<input class="form-control" ng-model="formData.description" required>

Type
                            <input class="form-control" type="radio" ng-model="formData.servicetype" value="Attribute" selected required>Attribute
                            <input class="form-control" type="radio" ng-model="formData.servicetype" value="SOAPCALL" required>SOAPCALL

Service or Attribute Name	<input class="form-control" ng-model="formData.servicename" required>

Request Layout	<input class="form-control" ng-model="formData.requestlayout" required>

Response Layout	<input class="form-control" ng-model="formData.responselayout" required>

            </form>

            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <button type="submit" class="btn btn-primary" ng-disabled="formData.$invalid" ng-click="createDataService(formData.$valid)" >Save Service</button>

                {{$index + 1}} {{ds._id}} {{ds.description}}

            <form editable-form name="formData" class="navbar-form " role="editProduct" ng-model="ds" onaftersave="updateDataService(ds)"    novalidate>

                        Product ID:
                        {{ ds._id|| 'required' }}

                        Description:
                        {{ ds.description || 'required' }}

                        Service Type:

                                {{ ds.servicetype }}

                        Service or Attribute Name:
                        {{ ds.servicename}}

                        Request Layout:
                        {{ ds.requestlayout || 'required' }}

                        Response Layout:
                        {{ ds.responselayout || 'required' }}

                        <button type="submit" class="btn btn-primary" ng-disabled="formData.$waiting">Save</button>
                        <button type="button" class="btn btn-default" ng-disabled="formData.$waiting" ng-click="formData.$cancel()">Cancel</button>

                        <button type="button" class="btn btn-default" ng-click="formData.$show()" ng-show="!formData.$visible">Edit</button>

            </form>


text:
<component name="libraryTable">
  <library name="SBT: org.hibernate:hibernate-entitymanager:4.2.3.Final">
    <CLASSES>
      <root url="jar://$USER_HOME$/.ivy2/cache/org.hibernate/hibernate-entitymanager/jars/hibernate-entitymanager-4.2.3.Final.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>


text:
@interface HJDanmakuConfiguration : NSObject

@property (readonly) HJDanmakuMode danmakuMode;

// unit second, greater than zero, default 5.0s
@property (nonatomic) CGFloat duration;

// setting a tolerance for a danmaku render later than the time, unit second, default 2.0s
@property (nonatomic) CGFloat tolerance;

// default 0, full screen
@property (nonatomic) NSInteger numberOfLines;

// height of single line cell, avoid modify after initialization, default 30.0f
@property (nonatomic) CGFloat cellHeight;

// the maximum number of danmakus at the same time, default 0, adapt to the height of screen
@property (nonatomic) NSUInteger maxShowCount;

- (instancetype)initWithDanmakuMode:(HJDanmakuMode)danmakuMode NS_DESIGNATED_INITIALIZER;

@end


text:
netlib-core
===========

Shared library for the individual Network Library projects