text:
<#
    .Synopsis
        Searches for Nuget packages by the name of a type.
    .DESCRIPTION
        Searches Jet Brain's awesome Resharper API for Nuget packages by type name, and returns
        a paged list of objects. Results are limited to 20 per page, so this function also returns
        the total number of items, the total pages and the current page (if applicable).

    .PARAMETER Search
        Type name to search, can be with full namespace.

    .PARAMETER AllowPrerelease
        Allow searching for prerelease nuget packages, false by default.

    .PARAMETER CaseSensitive
        Use case sensitive matching for type name, false by default.

    .PARAMETER LatestVersion
        Search only latest versions of packages, true by default

    .PARAMETER PageIndex
        Search results page index, page size is 20 items.

    .EXAMPLE
        Simple search for a specific type:

        Search-NugetForType OpenStreetMapLayer

    .EXAMPLE
        Go to a specific page in the search results:

        Search-NugetForType Date -PageIndex 8

    .EXAMPLE
        Display the Nuget.org page for the first result in the default browser:

        Search-NugetForType Mapping | Select-Object -First 1 | % { start $("https://www.nuget.org/packages/{0}/" -f $_.id) }
#>
Function Search-NugetForType {
    [CmdletBinding()] param(
        [Parameter(Mandatory=$true, Position=0 )] [String] $Search,
        [Parameter()] [Switch]$AllowPrerelease = $false,
        [Parameter()] [Switch]$CaseSensitive = $false,
        [Parameter()] [Switch]$LatestVersion,
        [Parameter()] [Int32]$PageIndex = 0
    )
    Begin
    {
        $rootUri = "http://resharper-nugetsearch.jetbrains.com/api/v1/find-type?"

        # Fix for Invoke-RestMethod through authenticated proxies
        [System.Net.WebRequest]::DefaultWebProxy = [System.Net.WebRequest]::GetSystemWebProxy()
        [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    }
    Process
    {
        $queryUri = "$($rootUri)name={0}&allowPrerelease={1}&caseSensitive={2}&latestVersion={3}&pageIndex={4}" -f $Search, `
            $AllowPrerelease, `
            $CaseSensitive, `
            $LatestVersion, `
            $PageIndex
        $results = Invoke-RestMethod -Uri $queryUri
    }
    End
    {
        Write-Host "    Total Results : $($results.totalResults)" -ForegroundColor DarkCyan
        Write-Host "    Total Pages   : $($results.totalPages)" -ForegroundColor DarkCyan
        if ($results.pageIndex -ne 0) {
            Write-Host "    Page Index    : $($results.pageIndex)" -ForegroundColor DarkCyan
        }

        Write-Verbose "NuGet root: $($results.nuGetRoot)"
        Write-Verbose "Page size: $($result.pageSize)"

        if ($results.packages.Count -eq 0) {
            Write-Host "No packages found."
        }
        return $results.packages
    }
}

<#
    .Synopsis
        Searches for Nuget packages by a namespace name.
    .DESCRIPTION
        Searches Jet Brain's awesome Resharper API for Nuget packages by namespace, and returns
        a paged list of objects. Results are limited to 20 per page, so this function  also returns
        the total number of items, the total pages and the current page (if applicable).

    .PARAMETER Search
        Namespace name to search.

    .PARAMETER AllowPrerelease
        Allow searching for prerelease nuget packages, false by default.

    .PARAMETER CaseSensitive
        Use case sensitive matching for type name, false by default.

    .PARAMETER LatestVersion
        Search only latest versions of packages, true by default

    .PARAMETER PageIndex
        Search results page index, page size is 20 items.

    .EXAMPLE
        Simple search for a specific type:

        Search-NugetForNamespace Esri

    .EXAMPLE
        Go to a specific page in the search results:

        Search-NugetForNamespace Date -PageIndex 8
#>
Function Search-NugetForNamespace {
    [CmdletBinding()] param(
        [Parameter(Mandatory=$true, Position=0 )] [String] $Search,
        [Parameter()] [Switch]$AllowPrerelease = $false,
        [Parameter()] [Switch]$CaseSensitive = $false,
        [Parameter()] [Switch]$LatestVersion,
        [Parameter()] [Int32]$PageIndex = 0
    )
    Begin
    {
        $rootUri = "http://resharper-nugetsearch.jetbrains.com/api/v1/find-namespace?"

        # Fix for Invoke-RestMethod through authenticated proxies
        [System.Net.WebRequest]::DefaultWebProxy = [System.Net.WebRequest]::GetSystemWebProxy()
        [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    }
    Process
    {
        $queryUri = "$($rootUri)name={0}&allowPrerelease={1}&caseSensitive={2}&latestVersion={3}&pageIndex={4}" -f $Search, `
            $AllowPrerelease, `
            $CaseSensitive, `
            $LatestVersion, `
            $PageIndex
        $results = Invoke-RestMethod -Uri $queryUri
    }
    End
    {
        Write-Host "    Total Results : $($results.totalResults)" -ForegroundColor DarkCyan
        Write-Host "    Total Pages   : $($results.totalPages)" -ForegroundColor DarkCyan
        if ($results.pageIndex -ne 0) {
            Write-Host "    Page Index    : $($results.pageIndex)" -ForegroundColor DarkCyan
        }

        Write-Verbose "NuGet root: $($results.nuGetRoot)"
        Write-Verbose "Page size: $($result.pageSize)"

        if ($results.packages.Count -eq 0) {
            Write-Host "No packages found."
        }
        return $results.packages
    }
}


text:
**Easily and intuitively set conditional breakpoints**

## Overview

***Conditional Breakpoints*** can make debugging so much more productive, but without OzCode, using them feels like a chore. OzCode makes adding a Conditional Breakpoint super easy! In just a single click, OzCode will set up a Conditional Breakpoint based on a specific property value, and pre-fill the predicate for you.

## Using Conditional breakpoints

In order to run this demo click the _Conditional Breakpoins_ button in the demo application.

![Conditional breakpoints button](Resources/ConditionalBreakpointsButton.PNG)

Everything seems ok, no exception was thrown and the run finished successfully!
Until we get an (imaginary) email or phone call telling us that at least one customer ('Robert Williams') was not approved, and did not get his order...

Since we have no clue why that happened, we add a breakpoint at the beginning of the __PaymentValidation.Validate__ method.
Running the method for all of the customers is nearly impossible. Instead, we want to run until we get to 'Robert Williams'.
* Pass the 'foreach' line and place the caret on the customer.
* When the Watch Window appears, expand customer properties and look for 'FirstName'.
* Place the caret on the first name property, and 'Custom Actions' (wand) will appear
* Choose 'Add conditional Breakpoint'

![Custom actions](Resources/CustomActions.PNG)

In the new dialog, replace the current customer first name with 'Robert'

![Conditional breakpoint FirstName](Resources/ConditionalBreakPoint1_1.PNG)

To make sure that we do not accidentally break on the wrong customer we want to add the customer surname as well ('Williams').
There are two ways to achieve this:
- Add '&&', copy the existing text, and replace 'Robert' with 'Williams' 'FirstName' with 'SurName' (or any other property - OzCode supports code completion).
- While **keeping the Conditional Breakpoint editor window open**, hover over "customer" to make the DataTip window appear, hover over the  'SurName' property and then press the little '+' sign.

 ![Conditional breakpoint Surname](Resources/ConditionalBreakPoint1_2.PNG)

And we're ready to go!

 ![Conditional breakpoint](Resources/ConditionalBreakPoint1_3.PNG)

Press 'OK' to close the Conditional Breakpoint dialog, and press F5 to continue running until we reach 'Robert Williams'.

Now if we follow the code execution  (F11), we reach the problematic method. It seems someone forgot to add support for Robert's credit card (or a new card was added without support).

 ![Bug found](Resources/problemFound.PNG)

 Now we can use a conditional breakpoint in order to check if there are other unsupported credit cards:
 - Place your caret on 'CCType' and select 'Add conditional Breakpoint'
 - Update the condtion so that the execution breaks for any other credit card which is not 'Visa' or 'MasterCard'.

 ![Conditionl breakpoint](Resources/conditionalBreakPoint2_1.PNG)

 Run the application again and check.

 [Back to Main](../../README.md)

redpajama_set_name: RedPajamaGithub


text:
+ Use full stops to end full sentences
+ Don't use full stops to end fragmented sentences
+ Choose either full sentences or fragments (not both) in lists and headings


text:
-> VOXINN is a simple Voxel-based 3D game engine, built using my game engine - DJINN-IV. VOXINN engine, has algorithms which procedurally generates a world, using voxels, in the form of blocks. Procedural generation of the world is still under development, and is far from completion.

-> At the moment, hills have been implemented in VOXINN, as a part of the procedurally generated terrain. Other terrain entities, will be added in future commits.

VOXINN Engine is licensed under MIT License.


text:
<!DOCTYPE html>

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Closure Unit Tests - goog.demos.editor.HelloWorld</title>


text:
/**
 * Convert an array-like object into an `Array`.
 * If `collection` is already an `Array`, then will return a clone of `collection`.
 *
 * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`
 * @return {Array} Naive conversion of `collection` to a new `Array`.
 * @api private
 */

module.exports = function toArray(collection) {
  if (typeof collection === 'undefined') return []
  if (collection === null) return [null]
  if (collection === window) return [window]
  if (typeof collection === 'string') return [collection]
  if (Array.isArray(collection)) return collection.slice()
  if (typeof collection.length != 'number') return [collection]
  if (typeof collection === 'function') return [collection]

  var arr = []
  for (var i = 0; i < collection.length; i++) {
    if (collection.hasOwnProperty(i) || i in collection) {
      arr.push(collection[i])
    }
  }
  if (!arr.length) return []
  return arr
}


text:
from setuptools import setup

setup(
    name='bnm-dl',
    version='0.3',
    description=u'Proste pobieranie pobieranie filmów z cyklu "Było... nie minęło. Kronika zwiadowców historii"',
    url="https://github.com/bohdanbobrowski/BnmDl",
    author="Bohdan Bobrowski",
    author_email="bohdanbobrowski@gmail.com",
    license="MIT",
    packages=[
        "bnmdl"
    ],
    install_requires=[
        "lxml",
        "pycurl",
        "download"
    ],
    entry_points={
        'console_scripts': [
            'bnmdl = bnmdl.BnmDlCli:main',
        ]
    },
)


text:
package com.boundlessgeo.spatialconnect.scutilities.Json;

import android.util.Log;

import com.boundlessgeo.spatialconnect.geometries.SCGeometry;
import com.boundlessgeo.spatialconnect.geometries.SCGeometryFactory;
import com.boundlessgeo.spatialconnect.geometries.SCSpatialFeature;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

public class JsonUtilities
{
    private final String TAG = "JsonUtilities";

    public JsonUtilities()
    {
    }

    public Map<String, Object> getMapFromJson(String json)
    {
        Map<String, Object> map = new HashMap<>();
        try
        {
            map = SCObjectMapper.getMapper().readValue(json, new TypeReference<HashMap<String, Object>>() {});
        }
        catch (Exception ex)
        {
            Log.e(TAG, "Error in getMapFromJson()", ex);
        }
        return map;
    }

    public String getTypeFromJson(String json)
    {
        String type = "";
        HashMap<String, Object> map = (HashMap<String, Object>) getMapFromJson(json);
        if (map.containsKey("type"))
        {
            type = map.get("type").toString();
        }
        return type.toLowerCase(Locale.US);
    }

    public SCSpatialFeature getSpatialDataTypeFromJson(String json)
    {
        String type = getTypeFromJson(json);
        SCGeometryFactory factory = new SCGeometryFactory();
        switch (type)
        {
            case "point":
                return factory.getPointFromGeoJson(json);
            case "linestring":
                return factory.getLineStringFromGeoJson(json);
            case "polygon":
                return factory.getPolygonFromGeoJson(json);
            case "multipoint":
                return factory.getMultiPointFromGeoJson(json);
            case "multilinestring":
                return factory.getMultiLineStringFromGeoJson(json);
            case "multipolygon":
                return factory.getMultiPolygonFromGeoJson(json);
            case "feature":
                return getSpatialFeatureFromJson(json);
            default:
                return null;
        }
    }

    public SCSpatialFeature getSpatialFeatureFromJson(String json)
    {
        SCGeometryFactory factory = new SCGeometryFactory();
        SCSpatialFeature feature = new SCSpatialFeature();

        String id = null;
        String created = null;
        String modified = null;
        Map<String, Object> properties = null;

        try
        {
            ObjectMapper mapper = SCObjectMapper.getMapper();
            JsonNode node = mapper.readTree(json);

            JsonNode idNode = node.get("id");
            if(idNode != null)
            {
                id = idNode.asText();
            }

            JsonNode dateNode = node.get("created");
            if (dateNode != null)
            {
                created = dateNode.asText();
            }

            dateNode = node.get("modified");
            if (dateNode != null)
            {
                modified = dateNode.asText();
            }

            JsonNode geometryNode = node.get("geometry");

            if (geometryNode != null) {
                SCGeometry scGeometry;
                String type = geometryNode.get("type").asText();
                String geomJson = geometryNode.toString();

                switch (type.toLowerCase(Locale.US))
                {
                    case "point":
                        scGeometry = factory.getPointFromGeoJson(geomJson);
                        break;
                    case "linestring":
                        scGeometry = factory.getLineStringFromGeoJson(geomJson);
                        break;
                    case "polygon":
                        scGeometry = factory.getPolygonFromGeoJson(geomJson);
                        break;
                    case "multipoint":
                        scGeometry = factory.getMultiPointFromGeoJson(geomJson);
                        break;
                    case "multilinestring":
                        scGeometry = factory.getMultiLineStringFromGeoJson(geomJson);
                        break;
                    case "multipolygon":
                        scGeometry = factory.getMultiPolygonFromGeoJson(geomJson);
                        break;
                    default:
                        return null;
                }
                feature = scGeometry;
            }

            JavaType javaType = mapper.getTypeFactory().constructMapType(Map.class, String.class, Object.class);

            JsonNode propertiesNode = node.get("properties");
            if (propertiesNode != null)
            {
                properties = mapper.readValue(propertiesNode.traverse(), javaType);
            }

            if(id != null)
            {
                feature.setId(id);
            }
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
            if(created != null)
            {
                feature.setCreated(formatter.parse(created));
            }
            if(modified != null)
            {
                feature.setModified(formatter.parse(modified));
            }
            if(properties != null)
            {
                feature.setProperties(properties);
            }
            JsonNode layerIdNode = node.get("layerId");
            if(layerIdNode != null)
            {
                feature.setLayerId(layerIdNode.asText());
            }
            JsonNode storeIdNode = node.get("storeId");
            if(storeIdNode != null)
            {
                feature.setStoreId(storeIdNode.asText());
            }
        }
        catch (Exception ex)
        {
            //Log.e(TAG, "Error in getFeatureFromGeoJson(String)", ex);
            ex.printStackTrace();
        }

        return feature;
    }
}


text:
<?php

/**
 * @file
 * Contains \Drupal\views\Tests\Handler\ArgumentDateTest.
 */

namespace Drupal\views\Tests\Handler;

use Drupal\views\Tests\ViewKernelTestBase;
use Drupal\views\Views;

/**
 * Tests the core date argument handlers.
 *
 * @group views
 * @see \Drupal\views\Plugin\views\argument\Date
 */
class ArgumentDateTest extends ViewKernelTestBase {

  /**
   * Views used by this test.
   *
   * @var array
   */
  public static $testViews = array('test_argument_date');

  /**
   * Stores the column map for this testCase.
   *
   * @var array
   */
  protected $columnMap = array(
    'id' => 'id',
  );

  /**
   * {@inheritdoc}
   */
  public function viewsData() {
    $data = parent::viewsData();

    $date_plugins = array(
      'date_fulldate',
      'date_day',
      'date_month',
      'date_week',
      'date_year',
      'date_year_month',
    );
    foreach ($date_plugins as $plugin_id) {
      $data['views_test_data'][$plugin_id] = $data['views_test_data']['created'];
      $data['views_test_data'][$plugin_id]['real field'] = 'created';
      $data['views_test_data'][$plugin_id]['argument']['id'] = $plugin_id;
    }
    return $data;
  }

  /**
   * Tests the CreatedFullDate handler.
   *
   * @see \Drupal\node\Plugin\views\argument\CreatedFullDate
   */
  public function testCreatedFullDateHandler() {
    $view = Views::getView('test_argument_date');
    $view->setDisplay('default');
    $this->executeView($view, array('20000102'));
    $expected = array();
    $expected[] = array('id' => 2);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('default');
    $this->executeView($view, array('20000101'));
    $expected = array();
    $expected[] = array('id' => 1);
    $expected[] = array('id' => 3);
    $expected[] = array('id' => 4);
    $expected[] = array('id' => 5);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('default');
    $this->executeView($view, array('20001023'));
    $expected = array();
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();
  }

  /**
   * Tests the Day handler.
   *
   * @see \Drupal\node\Plugin\views\argument\CreatedDay
   */
  public function testDayHandler() {
    $view = Views::getView('test_argument_date');
    $view->setDisplay('embed_1');
    $this->executeView($view, array('02'));
    $expected = array();
    $expected[] = array('id' => 2);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_1');
    $this->executeView($view, array('01'));
    $expected = array();
    $expected[] = array('id' => 1);
    $expected[] = array('id' => 3);
    $expected[] = array('id' => 4);
    $expected[] = array('id' => 5);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_1');
    $this->executeView($view, array('23'));
    $expected = array();
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
  }

  /**
   * Tests the Month handler.
   *
   * @see \Drupal\node\Plugin\views\argument\CreatedMonth
   */
  public function testMonthHandler() {
    $view = Views::getView('test_argument_date');
    $view->setDisplay('embed_2');
    $this->executeView($view, array('01'));
    $expected = array();
    $expected[] = array('id' => 1);
    $expected[] = array('id' => 2);
    $expected[] = array('id' => 3);
    $expected[] = array('id' => 4);
    $expected[] = array('id' => 5);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_2');
    $this->executeView($view, array('12'));
    $expected = array();
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
  }

  /**
   * Tests the Week handler.
   *
   * @see \Drupal\node\Plugin\views\argument\CreatedWeek
   */
  public function testWeekHandler() {
    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 9, 26, 2008)))
      ->condition('id', 1)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 2, 29, 2004)))
      ->condition('id', 2)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 1, 1, 2000)))
      ->condition('id', 3)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 1, 10, 2000)))
      ->condition('id', 4)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 2, 1, 2000)))
      ->condition('id', 5)
      ->execute();

    $view = Views::getView('test_argument_date');
    $view->setDisplay('embed_3');
    // Check the week calculation for a leap year.
    // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
    $this->executeView($view, array('39'));
    $expected = array();
    $expected[] = array('id' => 1);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_3');
    // Check the week calculation for the 29th of February in a leap year.
    // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
    $this->executeView($view, array('09'));
    $expected = array();
    $expected[] = array('id' => 2);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_3');
    // The first jan 2000 was still in the last week of the previous year.
    $this->executeView($view, array('52'));
    $expected = array();
    $expected[] = array('id' => 3);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_3');
    $this->executeView($view, array('02'));
    $expected = array();
    $expected[] = array('id' => 4);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_3');
    $this->executeView($view, array('05'));
    $expected = array();
    $expected[] = array('id' => 5);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_3');
    $this->executeView($view, array('23'));
    $expected = array();
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
  }

  /**
   * Tests the Year handler.
   *
   * @see \Drupal\node\Plugin\views\argument\CreatedYear
   */
  public function testYearHandler() {
    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 1, 1, 2001)))
      ->condition('id', 3)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 1, 1, 2002)))
      ->condition('id', 4)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 1, 1, 2002)))
      ->condition('id', 5)
      ->execute();

    $view = Views::getView('test_argument_date');
    $view->setDisplay('embed_4');
    $this->executeView($view, array('2000'));
    $expected = array();
    $expected[] = array('id' => 1);
    $expected[] = array('id' => 2);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_4');
    $this->executeView($view, array('2001'));
    $expected = array();
    $expected[] = array('id' => 3);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_4');
    $this->executeView($view, array('2002'));
    $expected = array();
    $expected[] = array('id' => 4);
    $expected[] = array('id' => 5);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_4');
    $this->executeView($view, array('23'));
    $expected = array();
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
  }

  /**
   * Tests the YearMonth handler.
   *
   * @see \Drupal\node\Plugin\views\argument\CreatedYearMonth
   */
  public function testYearMonthHandler() {
    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 1, 1, 2001)))
      ->condition('id', 3)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 4, 1, 2001)))
      ->condition('id', 4)
      ->execute();

    $this->container->get('database')->update('views_test_data')
      ->fields(array('created' => gmmktime(0, 0, 0, 4, 1, 2001)))
      ->condition('id', 5)
      ->execute();

    $view = Views::getView('test_argument_date');
    $view->setDisplay('embed_5');
    $this->executeView($view, array('200001'));
    $expected = array();
    $expected[] = array('id' => 1);
    $expected[] = array('id' => 2);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_5');
    $this->executeView($view, array('200101'));
    $expected = array();
    $expected[] = array('id' => 3);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_5');
    $this->executeView($view, array('200104'));
    $expected = array();
    $expected[] = array('id' => 4);
    $expected[] = array('id' => 5);
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
    $view->destroy();

    $view->setDisplay('embed_5');
    $this->executeView($view, array('201301'));
    $expected = array();
    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Acta microbiol. sin. 18(2): 114 (1978)

#### Original name
Phyllactinia suffulta f. ailanthi Golovin & Bunkina

### Remarks
null


text:
package net.lightstone.msg;

public final class MultiBlockChangeMessage extends Message {

	private final int chunkX, chunkZ;
	private final short[] coordinates;
	private final byte[] types, metadata;

	public MultiBlockChangeMessage(int chunkX, int chunkZ, short[] coordinates, byte[] types, byte[] metadata) {
		if (coordinates.length != types.length || types.length != metadata.length) {
			throw new IllegalArgumentException();
		}

		this.chunkX = chunkX;
		this.chunkZ = chunkZ;
		this.coordinates = coordinates;
		this.types = types;
		this.metadata = metadata;
	}

	public int getChunkX() {
		return chunkX;
	}

	public int getChunkZ() {
		return chunkZ;
	}

	public int getChanges() {
		return coordinates.length;
	}

	public short[] getCoordinates() {
		return coordinates;
	}

	public byte[] getTypes() {
		return types;
	}

	public byte[] getMetadata() {
		return metadata;
	}

}


text:
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package io.flutter.app;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.content.res.Resources.NotFoundException;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager.LayoutParams;
import io.flutter.Log;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.platform.PlatformPlugin;
import io.flutter.util.Preconditions;
import io.flutter.view.FlutterMain;
import io.flutter.view.FlutterNativeView;
import io.flutter.view.FlutterRunArguments;
import io.flutter.view.FlutterView;
import java.util.ArrayList;

/**
 * Deprecated class that performs the actual work of tying Android {@link android.app.Activity}
 * instances to Flutter.
 *
 *
This exists as a dedicated class (as opposed to being integrated directly into {@link
 * FlutterActivity}) to facilitate applications that don't wish to subclass {@code FlutterActivity}.
 * The most obvious example of when this may come in handy is if an application wishes to subclass
 * the Android v4 support library's {@code FragmentActivity}.
 *
 *
Usage:

 *
 *
To wire this class up to your activity, simply forward the events defined in {@link
 * FlutterActivityEvents} from your activity to an instance of this class. Optionally, you can make
 * your activity implement {@link PluginRegistry} and/or {@link
 * io.flutter.view.FlutterView.Provider} and forward those methods to this class as well.
 *
 * @deprecated {@link io.flutter.embedding.android.FlutterActivity} is the new API that now replaces
 *     this class and {@link io.flutter.app.FlutterActivity}. See
 *     https://flutter.dev/go/android-project-migration for more migration details.
 */
@Deprecated
public final class FlutterActivityDelegate
    implements FlutterActivityEvents, FlutterView.Provider, PluginRegistry {
  private static final String SPLASH_SCREEN_META_DATA_KEY =
      "io.flutter.app.android.SplashScreenUntilFirstFrame";
  private static final String TAG = "FlutterActivityDelegate";
  private static final LayoutParams matchParent =
      new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);

  /**
   * Specifies the mechanism by which Flutter views are created during the operation of a {@code
   * FlutterActivityDelegate}.
   *
   *
A delegate's view factory will be consulted during {@link #onCreate(Bundle)}. If it returns
   * {@code null}, then the delegate will fall back to instantiating a new full-screen {@code
   * FlutterView}.
   *
   *
A delegate's native view factory will be consulted during {@link #onCreate(Bundle)}. If it
   * returns {@code null}, then the delegate will fall back to instantiating a new {@code
   * FlutterNativeView}. This is useful for applications to override to reuse the FlutterNativeView
   * held e.g. by a pre-existing background service.
   */
  public interface ViewFactory {
    FlutterView createFlutterView(Context context);

    FlutterNativeView createFlutterNativeView();

    /**
     * Hook for subclasses to indicate that the {@code FlutterNativeView} returned by {@link
     * #createFlutterNativeView()} should not be destroyed when this activity is destroyed.
     *
     * @return Whether the FlutterNativeView is retained.
     */
    boolean retainFlutterNativeView();
  }

  private final Activity activity;
  private final ViewFactory viewFactory;
  private FlutterView flutterView;
  private View launchView;

  public FlutterActivityDelegate(Activity activity, ViewFactory viewFactory) {
    this.activity = Preconditions.checkNotNull(activity);
    this.viewFactory = Preconditions.checkNotNull(viewFactory);
  }

  @Override
  public FlutterView getFlutterView() {
    return flutterView;
  }

  // The implementation of PluginRegistry forwards to flutterView.
  @Override
  public boolean hasPlugin(String key) {
    return flutterView.getPluginRegistry().hasPlugin(key);
  }

  @Override
  @SuppressWarnings("unchecked")
  public <T> T valuePublishedByPlugin(String pluginKey) {
    return (T) flutterView.getPluginRegistry().valuePublishedByPlugin(pluginKey);
  }

  @Override
  public Registrar registrarFor(String pluginKey) {
    return flutterView.getPluginRegistry().registrarFor(pluginKey);
  }

  @Override
  public boolean onRequestPermissionsResult(
      int requestCode, String[] permissions, int[] grantResults) {
    return flutterView
        .getPluginRegistry()
        .onRequestPermissionsResult(requestCode, permissions, grantResults);
  }

  @Override
  public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
    return flutterView.getPluginRegistry().onActivityResult(requestCode, resultCode, data);
  }

  @Override
  public void onCreate(Bundle savedInstanceState) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      Window window = activity.getWindow();
      window.addFlags(LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
      window.setStatusBarColor(0x40000000);
      window.getDecorView().setSystemUiVisibility(PlatformPlugin.DEFAULT_SYSTEM_UI);
    }

    String[] args = getArgsFromIntent(activity.getIntent());
    FlutterMain.ensureInitializationComplete(activity.getApplicationContext(), args);

    flutterView = viewFactory.createFlutterView(activity);
    if (flutterView == null) {
      FlutterNativeView nativeView = viewFactory.createFlutterNativeView();
      flutterView = new FlutterView(activity, null, nativeView);
      flutterView.setLayoutParams(matchParent);
      activity.setContentView(flutterView);
      launchView = createLaunchView();
      if (launchView != null) {
        addLaunchView();
      }
    }

    if (loadIntent(activity.getIntent())) {
      return;
    }

    String appBundlePath = FlutterMain.findAppBundlePath();
    if (appBundlePath != null) {
      runBundle(appBundlePath);
    }
  }

  @Override
  public void onNewIntent(Intent intent) {
    // Only attempt to reload the Flutter Dart code during development. Use
    // the debuggable flag as an indicator that we are in development mode.
    if (!isDebuggable() || !loadIntent(intent)) {
      flutterView.getPluginRegistry().onNewIntent(intent);
    }
  }

  private boolean isDebuggable() {
    return (activity.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
  }

  @Override
  public void onPause() {
    Application app = (Application) activity.getApplicationContext();
    if (app instanceof FlutterApplication) {
      FlutterApplication flutterApp = (FlutterApplication) app;
      if (activity.equals(flutterApp.getCurrentActivity())) {
        flutterApp.setCurrentActivity(null);
      }
    }
    if (flutterView != null) {
      flutterView.onPause();
    }
  }

  @Override
  public void onStart() {
    if (flutterView != null) {
      flutterView.onStart();
    }
  }

  @Override
  public void onResume() {
    Application app = (Application) activity.getApplicationContext();
    if (app instanceof FlutterApplication) {
      FlutterApplication flutterApp = (FlutterApplication) app;
      flutterApp.setCurrentActivity(activity);
    }
  }

  @Override
  public void onStop() {
    flutterView.onStop();
  }

  @Override
  public void onPostResume() {
    if (flutterView != null) {
      flutterView.onPostResume();
    }
  }

  @Override
  public void onDestroy() {
    Application app = (Application) activity.getApplicationContext();
    if (app instanceof FlutterApplication) {
      FlutterApplication flutterApp = (FlutterApplication) app;
      if (activity.equals(flutterApp.getCurrentActivity())) {
        flutterApp.setCurrentActivity(null);
      }
    }
    if (flutterView != null) {
      final boolean detach =
          flutterView.getPluginRegistry().onViewDestroy(flutterView.getFlutterNativeView());
      if (detach || viewFactory.retainFlutterNativeView()) {
        // Detach, but do not destroy the FlutterView if a plugin
        // expressed interest in its FlutterNativeView.
        flutterView.detach();
      } else {
        flutterView.destroy();
      }
    }
  }

  @Override
  public boolean onBackPressed() {
    if (flutterView != null) {
      flutterView.popRoute();
      return true;
    }
    return false;
  }

  @Override
  public void onUserLeaveHint() {
    flutterView.getPluginRegistry().onUserLeaveHint();
  }

  @Override
  public void onTrimMemory(int level) {
    // Use a trim level delivered while the application is running so the
    // framework has a chance to react to the notification.
    if (level == TRIM_MEMORY_RUNNING_LOW) {
      flutterView.onMemoryPressure();
    }
  }

  @Override
  public void onLowMemory() {
    flutterView.onMemoryPressure();
  }

  @Override
  public void onConfigurationChanged(Configuration newConfig) {}

  private static String[] getArgsFromIntent(Intent intent) {
    // Before adding more entries to this list, consider that arbitrary
    // Android applications can generate intents with extra data and that
    // there are many security-sensitive args in the binary.
    ArrayList<String> args = new ArrayList<>();
    if (intent.getBooleanExtra("trace-startup", false)) {
      args.add("--trace-startup");
    }
    if (intent.getBooleanExtra("start-paused", false)) {
      args.add("--start-paused");
    }
    if (intent.getBooleanExtra("disable-service-auth-codes", false)) {
      args.add("--disable-service-auth-codes");
    }
    if (intent.getBooleanExtra("use-test-fonts", false)) {
      args.add("--use-test-fonts");
    }
    if (intent.getBooleanExtra("enable-dart-profiling", false)) {
      args.add("--enable-dart-profiling");
    }
    if (intent.getBooleanExtra("enable-software-rendering", false)) {
      args.add("--enable-software-rendering");
    }
    if (intent.getBooleanExtra("skia-deterministic-rendering", false)) {
      args.add("--skia-deterministic-rendering");
    }
    if (intent.getBooleanExtra("trace-skia", false)) {
      args.add("--trace-skia");
    }
    if (intent.getBooleanExtra("trace-systrace", false)) {
      args.add("--trace-systrace");
    }
    if (intent.getBooleanExtra("dump-skp-on-shader-compilation", false)) {
      args.add("--dump-skp-on-shader-compilation");
    }
    if (intent.getBooleanExtra("cache-sksl", false)) {
      args.add("--cache-sksl");
    }
    if (intent.getBooleanExtra("purge-persistent-cache", false)) {
      args.add("--purge-persistent-cache");
    }
    if (intent.getBooleanExtra("verbose-logging", false)) {
      args.add("--verbose-logging");
    }
    final int observatoryPort = intent.getIntExtra("observatory-port", 0);
    if (observatoryPort > 0) {
      args.add("--observatory-port=" + Integer.toString(observatoryPort));
    }
    if (intent.getBooleanExtra("endless-trace-buffer", false)) {
      args.add("--endless-trace-buffer");
    }
    // NOTE: all flags provided with this argument are subject to filtering
    // based on a a list of allowed flags in shell/common/switches.cc. If any
    // flag provided is not allowed, the process will immediately terminate.
    if (intent.hasExtra("dart-flags")) {
      args.add("--dart-flags=" + intent.getStringExtra("dart-flags"));
    }
    if (!args.isEmpty()) {
      String[] argsArray = new String[args.size()];
      return args.toArray(argsArray);
    }
    return null;
  }

  private boolean loadIntent(Intent intent) {
    String action = intent.getAction();
    if (Intent.ACTION_RUN.equals(action)) {
      String route = intent.getStringExtra("route");
      String appBundlePath = intent.getDataString();
      if (appBundlePath == null) {
        // Fall back to the installation path if no bundle path was specified.
        appBundlePath = FlutterMain.findAppBundlePath();
      }
      if (route != null) {
        flutterView.setInitialRoute(route);
      }

      runBundle(appBundlePath);
      return true;
    }

    return false;
  }

  private void runBundle(String appBundlePath) {
    if (!flutterView.getFlutterNativeView().isApplicationRunning()) {
      FlutterRunArguments args = new FlutterRunArguments();
      args.bundlePath = appBundlePath;
      args.entrypoint = "main";
      flutterView.runFromBundle(args);
    }
  }

  /**
   * Creates a {@link View} containing the same {@link Drawable} as the one set as the {@code
   * windowBackground} of the parent activity for use as a launch splash view.
   *
   *
Returns null if no {@code windowBackground} is set for the activity.
   */
  private View createLaunchView() {
    if (!showSplashScreenUntilFirstFrame()) {
      return null;
    }
    final Drawable launchScreenDrawable = getLaunchScreenDrawableFromActivityTheme();
    if (launchScreenDrawable == null) {
      return null;
    }
    final View view = new View(activity);
    view.setLayoutParams(matchParent);
    view.setBackground(launchScreenDrawable);
    return view;
  }

  /**
   * Extracts a {@link Drawable} from the parent activity's {@code windowBackground}.
   *
   *
{@code android:windowBackground} is specifically reused instead of a other attributes
   * because the Android framework can display it fast enough when launching the app as opposed to
   * anything defined in the Activity subclass.
   *
   *
Returns null if no {@code windowBackground} is set for the activity.
   */
  @SuppressWarnings("deprecation")
  private Drawable getLaunchScreenDrawableFromActivityTheme() {
    TypedValue typedValue = new TypedValue();
    if (!activity.getTheme().resolveAttribute(android.R.attr.windowBackground, typedValue, true)) {
      return null;
    }
    if (typedValue.resourceId == 0) {
      return null;
    }
    try {
      return activity.getResources().getDrawable(typedValue.resourceId);
    } catch (NotFoundException e) {
      Log.e(TAG, "Referenced launch screen windowBackground resource does not exist");
      return null;
    }
  }

  /**
   * Let the user specify whether the activity's {@code windowBackground} is a launch screen and
   * should be shown until the first frame via a <meta-data> tag in the activity.
   */
  private Boolean showSplashScreenUntilFirstFrame() {
    try {
      ActivityInfo activityInfo =
          activity
              .getPackageManager()
              .getActivityInfo(
                  activity.getComponentName(),
                  PackageManager.GET_META_DATA | PackageManager.GET_ACTIVITIES);
      Bundle metadata = activityInfo.metaData;
      return metadata != null && metadata.getBoolean(SPLASH_SCREEN_META_DATA_KEY);
    } catch (NameNotFoundException e) {
      return false;
    }
  }

  /**
   * Show and then automatically animate out the launch view.
   *
   *
If a launch screen is defined in the user application's AndroidManifest.xml as the
   * activity's {@code windowBackground}, display it on top of the {@link FlutterView} and remove
   * the activity's {@code windowBackground}.
   *
   *
Fade it out and remove it when the {@link FlutterView} renders its first frame.
   */
  private void addLaunchView() {
    if (launchView == null) {
      return;
    }

    activity.addContentView(launchView, matchParent);
    flutterView.addFirstFrameListener(
        new FlutterView.FirstFrameListener() {
          @Override
          public void onFirstFrame() {
            FlutterActivityDelegate.this
                .launchView
                .animate()
                .alpha(0f)
                // Use Android's default animation duration.
                .setListener(
                    new AnimatorListenerAdapter() {
                      @Override
                      public void onAnimationEnd(Animator animation) {
                        // Views added to an Activity's addContentView is always added to its
                        // root FrameLayout.
                        ((ViewGroup) FlutterActivityDelegate.this.launchView.getParent())
                            .removeView(FlutterActivityDelegate.this.launchView);
                        FlutterActivityDelegate.this.launchView = null;
                      }
                    });

            FlutterActivityDelegate.this.flutterView.removeFirstFrameListener(this);
          }
        });

    // Resets the activity theme from the one containing the launch screen in the window
    // background to a blank one since the launch screen is now in a view in front of the
    // FlutterView.
    //
    // We can make this configurable if users want it.
    activity.setTheme(android.R.style.Theme_Black_NoTitleBar);
  }
}


text:
Sidekiq.configure_server do |config|
  config.redis = { url: 'redis://redis' }
end

Sidekiq.configure_client do |config|
  config.redis = { url: 'redis://redis' }
end


text:
<?php

namespace Magento\Reports\Controller\Adminhtml\Report\Product;

use Magento\Framework\App\ResponseInterface;

class ExportDownloadsExcel extends \Magento\Reports\Controller\Adminhtml\Report\Product
{
    /**
     * Authorization level of a basic admin session
     *
     * @see _isAllowed()
     */
    const ADMIN_RESOURCE = 'Magento_Reports::report_products';

    /**
     * Export products downloads report to XLS format
     *
     * @return ResponseInterface
     */
    public function execute()
    {
        $fileName = 'products_downloads.xml';
        $content = $this->_view->getLayout()->createBlock(
            'Magento\Reports\Block\Adminhtml\Product\Downloads\Grid'
        )->setSaveParametersInSession(
            true
        )->getExcel(
            $fileName
        );

        return $this->_fileFactory->create($fileName, $content);
    }
}


text:
class PatchSet
  include Mongoid::Document
  include Mongoid::Timestamps::Created

  DURATION_IN_SLICES = 12
  NUMBER_OF_PADS = 16

  field :patch_set_label, type: String
  has_many :patches, {:dependent => :destroy}

  def self.reload_pure_data
    begin
      s = TCPSocket.new 'localhost', 4040
      s.puts "reload;"
      s.close
    rescue
      puts "ERROR RELOADING PURE DATA"
    end
  end

  def self.cut_current_patch_set
    new_patch_set = CurrentPatch.get_current_patch_set
    new_patch_set.patches.each do |patch|
      patch.cut_sample(patch.patch_index)
    end
  end

  def self.init_16_patches
    new_patch_set = PatchSet.create({})
    subset_of_track_ids = CurrentPatch.get_current_filter_set
    (0..15).each do |index|
      patch = Patch.create({patch_index: index})
      patch.randomize_patch(subset_of_track_ids)
      patch.patch_set = new_patch_set
      patch.save
    end
    CurrentPatch.set_current_patch_set(new_patch_set)
    new_patch_set.save
    self.reload_pure_data()
  end

  def self.init_16_patches_as_sequence
    new_patch_set = PatchSet.create({})
    subset_of_track_ids = CurrentPatch.get_current_filter_set
    while
      track_id = subset_of_track_ids.shuffle.first
      track = Track.find(track_id.to_s)
      break if track.onset_times.size > (DURATION_IN_SLICES + NUMBER_OF_PADS)
    end
    track_onset_array = track.onset_times
    max_start_index = (track.onset_times.size - (DURATION_IN_SLICES + NUMBER_OF_PADS))
    start_onset_index = rand(0...max_start_index)
    (0...NUMBER_OF_PADS).each do |index|
      patch = Patch.create({
        track: track,
        patch_index: index,
        start_onset_index: start_onset_index+index,
        stop_onset_index: [(start_onset_index+index+DURATION_IN_SLICES),(track_onset_array.size-1)].min
        })
      patch.patch_set = new_patch_set
      patch.save
      patch.cut_sample(index)
    end
    CurrentPatch.set_current_patch_set(new_patch_set)
    new_patch_set.save
    self.reload_pure_data()
  end

  def self.init_16_patches_as_duration_sequence
    new_patch_set = PatchSet.create({})
    subset_of_track_ids = CurrentPatch.get_current_filter_set
    subset_of_tracks = DurationIndex.where({:track_id.in => subset_of_track_ids})
    random_start  = (0 .. subset_of_tracks.size ).to_a.shuffle.first
    subset_of_tracks.sort({:duration => -1}).skip(random_start).limit(16).each_with_index do |duration_index,index|
      patch = Patch.create({
        track: duration_index.track,
        patch_index: index,
        start_onset_index: duration_index.start_onset_index,
        stop_onset_index: (duration_index.start_onset_index + DURATION_IN_SLICES)
        })
      patch.patch_set = new_patch_set
      patch.save
      patch.cut_sample(index)
    end
    CurrentPatch.set_current_patch_set(new_patch_set)
    new_patch_set.save
    self.reload_pure_data()
  end

  def self.expand_single_patch_to_sequence()
    current_patch_set = CurrentPatch.get_current_patch_set
    seed_patch =  CurrentPatch.get_current_patch
    patch_index = seed_patch.patch_index
    track = seed_patch.track
    track_onset_array = track.onset_times
    first_patch_index = seed_patch.start_onset_index - patch_index
    new_patch_set = PatchSet.create({})
    (0...NUMBER_OF_PADS).each do |index|
      patch = Patch.create({
        track: track,
        patch_index: index,
        start_onset_index: first_patch_index+index,
        stop_onset_index: [(first_patch_index+index+DURATION_IN_SLICES),(track_onset_array.size-1)].min
        })
      patch.patch_set = new_patch_set
      patch.refresh_onset_times
      patch.save
      patch.cut_sample(index)
    end
    CurrentPatch.set_current_patch_set(new_patch_set)
    new_patch_set.save
    self.reload_pure_data()
  end

  def p(patch_index)
    return self.patches[(patch_index - 1)]
  end

  def duplicate_patch_set
    current_patch_set = CurrentPatch.get_current_patch_set
    new_patch_set = PatchSet.create
    current_patch_set.patches.each_with_index do |patch,index|
      new_patch = patch.clone
      new_patch.patch_set = new_patch_set
      new_patch.save
      new_patch.cut_sample(index)
    end
    new_patch_set.save
    CurrentPatch.set_current_patch_set(new_patch_set)
  end

  def self.shuffle_unfrozen
    current_patch_set = CurrentPatch.get_current_patch_set
    subset_of_track_ids = CurrentPatch.get_current_filter_set
    current_patch_set.patches.each_with_index do |patch, index|
      patch.randomize_patch(subset_of_track_ids)
    end
  end

  def previous_patch_set
    mongoid = self.id.to_s
    PatchSet.where(:_id.lt => self._id).order_by([[:_id, :desc]]).limit(1).first.id.to_s rescue nil
  end

  def next_patch_set
    mongoid = self.id
    PatchSet.where(:_id.gt => self._id).order_by([[:_id, :asc]]).limit(1).first.id.to_s rescue nil
  end

  def voiced_count
    self.patches.inject(0){|memo, patch| memo + (patch.voiced_count || 0) }
  end

end


text:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Suite1" verbose="1">
    <test name="Groups">
        <classes>
            <class name="ua.annalonskaya.addressbook.tests.GroupDeletionTests"/>   <!--тесты выполняются в строгом порядке по очереди -->
        </classes>
    </test>
</suite>


text:
package net.sf.mmm.code.api.merge;

/**
 * {@link CodeMergeableItem} with
 * {@link #merge(CodeAdvancedMergeableItem, CodeMergeStrategyDecider, CodeMergeStrategy) advanced merge}.
 *
 * @author Joerg Hohwiller (hohwille at users.sourceforge.net)
 * @since 1.0.0
 * @param <S> type of the {@link CodeAdvancedMergeableItem item} that can be merged with this item. Will
 *        typically be this type itself.
 */
public abstract interface CodeAdvancedMergeableItem<S extends CodeAdvancedMergeableItem<S>> extends CodeMergeableItem<S> {

  @Override
  default S merge(S other) {

    return merge(other, CodeMergeStrategyDeciderDefault.INSTANCE);
  }

  /**
   * @param other the other item to merge.
   * @param decider the {@link CodeMergeStrategyDecider} that can choose the {@link CodeMergeStrategy}
   *        dynamically.
   * @return the result of the merge. May be this item where the merge was invoked on, or the given
   *         {@code other} item.
   */
  default S merge(S other, CodeMergeStrategyDecider decider) {

    return merge(other, decider, null);
  }

  /**
   * @param other the other item to merge.
   * @param decider the {@link CodeMergeStrategyDecider} that can choose the {@link CodeMergeStrategy}
   *        dynamically.
   * @param parentStrategy the {@link CodeMergeStrategy} that has been
   *        {@link CodeMergeStrategyDecider#decide(CodeAdvancedMergeableItem, CodeAdvancedMergeableItem, CodeMergeStrategy)
   *        decided} for the {@link net.sf.mmm.code.api.node.CodeNodeItem#getParent() parent} in case of a
   *        recursive merge invocation.
   * @return the result of the merge. May be this item where the merge was invoked on, or the given
   *         {@code other} item.
   */
  S merge(S other, CodeMergeStrategyDecider decider, CodeMergeStrategy parentStrategy);

}


text:
Insights

Copyright 2017 Cognizant Technology Solutions

This product includes the following open source softwares. This notice file contains the FOSS components and corresponding licenses.

========================================================================
Apache License 2.0
========================================================================

The following components are provided under the Apache License 2.0 . See project link for details.

Apache Commons Collections	:http://commons.apache.org/collections/
Apache Commons Lang	:http://commons.apache.org/proper/commons-lang/
Apache Commons Logging	:http://commons.apache.org/proper/commons-logging/
Apache Geronimo JTA Spec 1.2	:http://www.apache.org/
Apache :httpClient	:https://repo1.maven.org/maven2/org/apache/:httpcomponents/:httpclient/
Apache :httpClient Mime	:http://hc.apache.org/:httpcomponents-client
Apache :httpComponents Core	:http://repo.maven.apache.org/maven2//org/apache/:httpcomponents/:httpcomponents-core/
Apache Log4j	:http://logging.apache.org/log4j/1.2/
Apache Xalan-Java	:http://xalan.apache.org/xalan-j/index.html
Apache-Jakarta Codec	:http://commons.apache.org/proper/commons-codec/
Apache-XML Xalan Java	:http://xml.apache.org/xalan-j/index.html
Apache-XML Xerces Java 1	:http://xml.apache.org/xerces2-j/index.html
ASM based accessors helper used by json-smart	:http://grepcode.com/snapshot/repo1.maven.org/maven2/net.minidev/accessors-smart/1.1
AssertJ fluent assertions	:http://repo.maven.apache.org/maven2//org/assertj/assertj-core/
beanvalidation-api	:http://github.com/beanvalidation/beanvalidation-api/
CDI APIs	:http://weld.cdi-spec.org/
Commons IO	:http://commons.apache.org/proper/commons-io/
CyberNeko HTML Parser	:http://sourceforge.net/projects/nekohtml/
grafana	:http://github.com/grafana/grafana/
Gson	:http://repo.maven.apache.org/maven2//com/google/code/gson/gson/
HtmlUnit	:http://repo.maven.apache.org/maven2//net/sourceforge/htmlunit/htmlunit/
HtmlUnit NekoHtml	:http://htmlunit.sourceforge.net/
:httpClient	:http://hc.apache.org/:httpcomponents-client
jandex	:http://github.com/wildfly/jandex/
java-classmate	:http://repo.maven.apache.org/maven2//com/fasterxml/classmate/
javax.inject	:http://repo1.maven.org/maven2/javax/inject/javax.inject/
JBoss Logging 3	:http://repo.maven.apache.org/maven2//org/jboss/logging/jboss-logging/
JSON library from Android SDK - com.vaadin.external.google:android-json	:http://grepcode.com/snapshot/repo1.maven.org/maven2/com.vaadin.external.google/android-json/0.0.20131108.vaadin1
Json Path	:http://repo.maven.apache.org/maven2//com/jayway/jsonpath/json-path/
json-smart	:http://www.minidev.net/
JSONassert	:https://github.com/skyscreamer/JSONassert
Log4j Implemented Over SLF4J	:http://repo1.maven.org/maven2/org/slf4j/log4j-over-slf4j/
material-design-icons	:http://github.com/google/material-design-icons/
objenesis	:http://objenesis.org/
Quartz	:http://www.quartz-scheduler.org/
SnakeYAML	:http://repo.maven.apache.org/maven2//org/yaml/snakeyaml/
Spring Boot	:http://github.com/SpringSource/spring-boot/
Spring Context Template	:https://github.com/MarkusBernhardt/spring-context-template
Spring Framework	:http://projects.spring.io/spring-framework
xml-apis	:http://repo1.maven.org/maven2/xml-apis/xml-apis/

========================================================================
Apache License 2.0
========================================================================

The following components are provided under the Apache License 2.0. See project link for details.

Jetty :: Websocket	:http://mirrors.ibiblio.org/maven2/org/eclipse/jetty/jetty-websocket/

Comment : Jetty :: Websocket is dual licensed under Apache License 2.0 and EPL 1.0.We choose to use Jetty :: Websocket under the terms and conditions of Apache License 2.0".

========================================================================
BSD 3-clause "New" or "Revised" License
========================================================================

The following components are provided under the BSD 3-clause "New" or "Revised" License. See project link for details.

ASM Core	:http://asm.objectweb.org/asm/
Hamcrest Core	:https://github.com/hamcrest/JavaHamcrest
Hamcrest library	:https://github.com/hamcrest/JavaHamcrest
PostgreSQL JDBC Driver	:http://repo1.maven.org/maven2/postgresql/postgresql/
ANTLR, ANother Tool for Language Recognition	:http://www.antlr.org/

========================================================================
CDDL 1.1
========================================================================

The following components are provided under the CDDL 1.1 + GPL 2.0. See project link for details.

javax.ws.rs-api	:https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api/2.0.1

comment :  javax.ws.rs-api is dual licensed under CDDL and GPL licenses. We choose to use javax.ws.rs-api under the terms and conditions of CDDL

========================================================================
Common Development and Distribution License 1.0
========================================================================

The following components are provided under the Common Development and Distribution License 1.0. See project link for details.

JSR-250 Common Annotations for the JavaTM Platform	:http://jcp.org/aboutJava/communityprocess/final/jsr250/index.html

========================================================================
Common Development and Distribution License 1.0
========================================================================

The following components are provided under the Common Development and Distribution License 1.0. See project link for details.

JSR-311 - JAX-RS - The Java API for RESTful Web Services (Jersey)	:http://java.net/projects/jersey

comment : JSR-311 - JAX-RS - The Java API for RESTful Web Services (Jersey) is dual licensed under CDDL and GPL licenses. We choose to use JSR-311 - JAX-RS - The Java API for RESTful Web Services (Jersey)under the terms and conditions of CDDL

========================================================================
Common Development and Distribution License 1.1
========================================================================

The following components are provided under the Common Development and Distribution License 1.1. See project link for details.

aopalliance repackaged as a module	:http://repo.maven.apache.org/maven2/org/glassfish/hk2/external/aopalliance-repackaged/
Expression Language API (2.1 Maintenance Release)	:http://repo1.maven.org/maven2/javax/el/el-api/

Comment	: aopalliance repackaged AND Expression Language API (2.1 Maintenance Release) as a module is dual licensed under CDDL and GPL license. We choose to use aopalliance repackaged as a module under the terms and conditions of CDDL 11

========================================================================
Common Development and Distribution License 1.1
========================================================================

The following components are provided under the Common Development and Distribution License 1.1. See project link for details.

HK2 API module	:http://repo.maven.apache.org/maven2/org/glassfish/hk2/hk2-api/

Comment	:HK2 API module is dual licensed under CDDL and GPL. We choose to use HK2 API module under the terms and conditions of CDDL

========================================================================
Common Development and Distribution License 1.1
========================================================================

The following components are provided under the Common Development and Distribution License 1.1. See project link for details.

HK2 Locator unit tests	:http://repo.maven.apache.org/maven2//org/glassfish/hk2/hk2-locator-extras/
javax.annotation API	:http://jcp.org/en/jsr/detail?id=250
OSGi resource locator bundle - used by various API providers that rely on META-INF/services mechanis	:http://glassfish.org/

Comment	: HK2 Locator unit tests is dual licensed under CDDL and GPL. We choose to use HK2 Locator unit tests under the terms and conditions of CDDL
Comment	: javax.annotation API is dual licensed under CDDL and GPL licenses. We choose to use javax.annotation API under the terms and conditions of CDDL
Comment	: OSGi resource locator bundle - used by various API providers that rely on META-INF/services mechanis is dual licensed under GPL and CDDL licenses. We choose to use OSGi resource locator bundle - used by various API providers that rely on META-INF/services mechanis under the terms and conditions of CDDL License

========================================================================
dom4j License (BSD 2.0 +)
========================================================================

The following components are provided under the dom4j License (BSD 2.0 +). See project link for details.

DOM4J - Flexible XML Framework for Java	:http://dom4j.sourceforge.net

========================================================================
Eclipse Public License 1.0
========================================================================

The following components are provided under the Eclipse Public License 1.0. See project link for details.

Hibernate JPA 2.1 API	:http://mvnrepository.com/artifact/org.hibernate.javax.persistence/hibernate-jpa-2.1-api
Jetty :: Project	:http://www.eclipse.org/jetty
JUnit	:http://repo.maven.apache.org/maven2//junit/junit/

========================================================================
Eclipse Public License 1.0
========================================================================

The following components are provided under the Eclipse Public License 1.0. See project link for details.

c3p0:JDBC DataSources/Resource Pools	:http://sourceforge.net/projects/c3p0/
Logback Core Module	:http://logback.qos.ch

Comment	:c3p0:JDBC DataSources/Resource Pools is dual licensed under EPL and LGPL license. We choose to use c3p0:JDBC DataSources/Resource Pools under the terms and conditions of EPL
Comment :Logback Core Module is dual licensed under EPL and LGPL. We choose to use Logback Core Module under the terms of EPL

========================================================================
Apache License 2.0, +MPL 1.1
========================================================================

The following components are provided under the Apache License 2.0, +MPL 1.1. See project link for details.

RabbitMQ Java Client - com.rabbitmq:amqp-client	:http://repo.maven.apache.org/maven2/com/rabbitmq/amqp-client/

Comment	:RabbitMQ Java Client - com.rabbitmq:amqp-client is multi licensed under GPL, MPL and Apache License. We choose to use RabbitMQ Java Client - com.rabbitmq:amqp-client under the terms and conditions of Apache License

========================================================================
GNU Lesser General Public License v2.1 or later
========================================================================

The following components are provided under the GNU Lesser General Public License v2.1 or later. See project link for details.

CSS Parser	:http://repo.maven.apache.org/maven2//net/sourceforge/cssparser/cssparser/
Hibernate	:http://hibernate.org/
Hibernate Commons Annotations - org.hibernate.common:hibernate-commons-annotations	:http://repo.maven.apache.org/maven2//org/hibernate/common/hibernate-commons-annotations/
jboss-interceptor	:http://repo.maven.apache.org/maven2//org/lucee/jboss-interceptor/

========================================================================
MIT License
========================================================================

The following components are provided under the MIT License. See project link for details.

isen-fonts	:https://www.npmjs.org/package/isen-fonts
JUL to SLF4J bridge	:http://repo1.maven.org/maven2/org/slf4j/jul-to-slf4j/
Mockito	:http://repo.maven.apache.org/maven2//org/mockito/mockito-all/
Simple Logging Facade for Java (SLF4J)	:http://www.slf4j.org/
SLF4J API Module	:http://repo.maven.apache.org/maven2//org/slf4j/slf4j-api/
svg-icon	:https://www.npmjs.org/package/svg-icon
The Legion of the Bouncy Castle	:http://www.bouncycastle.org/index.html

========================================================================
Apache License 2.0
========================================================================

The following components are provided under the Apache License 2.0. See project link for details.

Javassist - org.javassist:javassist	:http://repo.maven.apache.org/maven2/org/javassist/javassist/

Comment	:Javassist - org.javassist:javassist is multi licensed under LGPL, Apache License 2.0 and MPL 1.1 We choose to use Javassist - org.javassist:javassist under the terms and conditions of Apache License 2.0

========================================================================
Mozilla Public License 2.0
========================================================================

The following components are provided under the {License Name}. See project link for details.

HtmlUnit Core JS	:http://repo.maven.apache.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/

========================================================================
Public Domain
========================================================================

The following components are provided under the Public Domain. See project link for details.

aopalliance	:http://aopalliance.sourceforge.net/

========================================================================
SIL Open Font License 1.1
========================================================================

The following components are provided under the SIL Open Font License 1.1. See project link for details.

Font-Awesome	:http://github.com/FortAwesome/Font-Awesome/

========================================================================
CDDL
========================================================================

The following components are provided under the CDDL. See project link for details.

Java Servlet API	:http://servlet-spec.java.net
jersey	:http://github.com/jersey/jersey/

Comment	:Java Servlet API is dual licensed under CDDL and GPL with classpath Exception. We choose to use Java Servlet API under the terms and conditions of CDDL
Comment	:jersey is dual licensed under CDDL and GPL licenses. We choose to use jersey under the terms and conditions of CDDL

========================================================================
W3C Software Notice and License (2002-12-31)
========================================================================

The following components are provided under the W3C Software Notice and License (2002-12-31). See project link for details.

Simple API for CSS	:http://repo1.maven.org/maven2/org/w3c/css/sac/

========================================================================
NOTICE files
========================================================================

The following NOTICEs are pertain to software distributed with this project.

// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for
// ------------------------------------------------------------------

Apache Commons Collections
Copyright 2001-2008 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).

Apache Commons Lang
Copyright 2001-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
This product includes software from the Spring Framework,
under the Apache License 2.0 (see: StringUtils.containsWhitespace())

Apache Commons Logging
Copyright 2003-2013 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Apache Geronimo
Copyright 2003-2008 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).

Apache HttpClient
Copyright 1999-2017 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Apache HttpClient Mime
Copyright 1999-2017 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Apache HttpCore
Copyright 2005-2017 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Apache log4j
Copyright 2007 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

=========================================================================
==  NOTICE file corresponding to section 4(d) of the Apache License,   ==
==  Version 2.0, in this case for the Apache Xerces Java distribution. ==
=========================================================================

Apache Xerces Java
Copyright 1999-2010 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Portions of this software were originally based on the following:
 - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
 - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
 - voluntary contributions made by Paul Eng on behalf of the
   Apache Software Foundation that were originally developed at iClick, Inc.,
   software copyright (c) 1999.

Apache Commons IO
Copyright 2002-2012 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).

Apache HttpClient
Copyright 1999-2013 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Apache log4j
Copyright 2007 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Mockito license - MIT.

Libraries used:

Cglib - Apache License 2.0
ASM - BSD license

Mockito all distribution:

Objenesis - MIT license
Hamcrest - BSD license

// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for Objenesis
// ------------------------------------------------------------------

Objenesis
Copyright 2006-2013

Spring Framework 4.3.7.RELEASE
Copyright (c) 2002-2017 Pivotal, Inc.

This product is licensed to you under the Apache License, Version 2.0
(the "License"). You may not use this product except in compliance with
the License.

This product may include a number of subcomponents with separate
copyright notices and license terms. Your use of the source code for
these subcomponents is subject to the terms and conditions of the
subcomponent's license, as noted in the license.txt file.

=========================================================================
==  NOTICE file corresponding to section 4(d) of the Apache License,   ==
==  Version 2.0, in this case for the Apache xml-commons xml-apis      ==
==  distribution.                                                      ==
=========================================================================

Apache XML Commons XML APIs
Copyright 1999-2009 The Apache Software Foundation.

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Portions of this software were originally based on the following:
 - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
 - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
 - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org


text:
require_relative '../../lib/event'
require 'rspec'

RSpec.describe 'Event' do
  let(:dummy_class) { Class.new { include Event } }
  let(:events) { dummy_class.new }
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework.Input.Touch;

namespace EmptyKeys.UserInterface.Input
{
    /// <summary>
    /// Implements MonoGame specific touch state
    /// </summary>
    public class MonoGameTouchState : TouchStateBase
    {
        private TouchLocation previousLocation;
        private TouchLocation[] empty = new TouchLocation[0];

        internal TouchCollection ActualState
        {
            get;
            set;
        }

        private int id;
        private float normalizedX;
        private float normalizedY;
        private TouchGestures gesture;
        private bool isTouched;
        private TouchAction action;
        private float moveX;
        private float moveY;
        private bool hasGesture;

        /// <summary>
        /// Gets the identifier.
        /// </summary>
        /// <value>
        /// The identifier.
        /// </value>
        public override int Id
        {
            get { return id; }
        }

        /// <summary>
        /// Gets the normalized x.
        /// </summary>
        /// <value>
        /// The normalized x.
        /// </value>
        public override float NormalizedX
        {
            get { return normalizedX; }
        }

        /// <summary>
        /// Gets the normalized y.
        /// </summary>
        /// <value>
        /// The normalized y.
        /// </value>
        public override float NormalizedY
        {
            get { return normalizedY; }
        }

        /// <summary>
        /// Gets the gesture.
        /// </summary>
        /// <value>
        /// The gesture.
        /// </value>
        public override TouchGestures Gesture
        {
            get { return gesture; }
        }

        /// <summary>
        /// Gets a value indicating whether is touched.
        /// </summary>
        /// <value>
        ///   <c>true</c> if is touched; otherwise, <c>false</c>.
        /// </value>
        public override bool IsTouched
        {
            get { return isTouched; }
        }

        /// <summary>
        /// Gets the action.
        /// </summary>
        /// <value>
        /// The action.
        /// </value>
        public override TouchAction Action
        {
            get { return action; }
        }

        /// <summary>
        /// Gets the move x.
        /// </summary>
        /// <value>
        /// The move x.
        /// </value>
        public override float MoveX
        {
            get { return moveX; }
        }

        /// <summary>
        /// Gets the move y.
        /// </summary>
        /// <value>
        /// The move y.
        /// </value>
        public override float MoveY
        {
            get { return moveY; }
        }

        /// <summary>
        /// Gets a value indicating whether this instance has gesture.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance has gesture; otherwise, <c>false</c>.
        /// </value>
        public override bool HasGesture
        {
            get { return hasGesture; }
        }

        /// <summary>
        /// Updates this instance.
        /// </summary>
        public override void Update()
        {
            hasGesture = false;
            isTouched = false;
            Rect viewport = Engine.Instance.Renderer.GetViewport();

            ActualState = GetState();
            if (ActualState.Count > 0)
            {
                isTouched = true;
                TouchLocation location = ActualState[0];

                id = location.Id;
                normalizedX = location.Position.X / viewport.Width;
                normalizedY = location.Position.Y / viewport.Height;

                switch (location.State)
                {
                    case TouchLocationState.Invalid:
                        action = TouchAction.None;
                        break;
                    case TouchLocationState.Moved:
                        action = TouchAction.Moved;
                        break;
                    case TouchLocationState.Pressed:
                        action = TouchAction.Pressed;
                        break;
                    case TouchLocationState.Released:
                        action = TouchAction.Released;
                        break;
                    default:
                        break;
                }
            }

            if (TouchPanel.IsGestureAvailable)
            {
                GestureSample gs = TouchPanel.ReadGesture();

                normalizedX = gs.Position.X / viewport.Width;
                normalizedY = gs.Position.Y / viewport.Height;
                moveX = gs.Delta.X;
                moveY = gs.Delta.Y;
                gesture = (TouchGestures)(int)gs.GestureType;
                hasGesture = true;
            }
        }

        private TouchCollection GetState()
        {
            TouchCollection actualState = Microsoft.Xna.Framework.Input.Touch.TouchPanel.GetState();
            TouchLocation[] locations = new TouchLocation[1];
            if (actualState.Count > 0)
            {
                TouchLocation location = actualState[0];
                TouchLocation previousState;
                location.TryGetPreviousLocation(out previousState);

                if (previousState.State == TouchLocationState.Pressed)
                {
                    locations[0] = new TouchLocation(previousState.Id, TouchLocationState.Pressed, location.Position);
                }
                else
                {
                    locations[0] = location;
                }

                previousLocation = location;
                return new TouchCollection(locations);
            }
            else if (previousLocation.State == TouchLocationState.Moved)
            {
                locations[0] = new TouchLocation(previousLocation.Id, TouchLocationState.Released, previousLocation.Position);
                previousLocation = new TouchLocation();
                return new TouchCollection(locations);
            }

            return new TouchCollection(empty);
        }
    }
}


text:
'use strict';

var databaseCommands = module.exports = {},
    databaseCallbacks = require('../callbacks/databaseCallbacks'),
    generalCommands = require('./generalCommands'),
    cHelper = require('../helper/helper'),
    extend = require('node.extend');

// extend level commands with general commands
extend(databaseCommands, generalCommands);

/**
 * Display all design documents for given database.
 *
 * @param  {Array}  input Array of ' ' splitted input arguments
 * @param  {Object} cli   general cli object
 *
 * @private
 * @tested
 */
databaseCommands._allDesignDocuments = function(input, cli) {
  cli.db.allDocuments(this.__filterDesigns);
};

/**
 * Display all documents for given database.
 *
 * @param  {Array}  input Array of ' ' splitted input arguments
 * @param  {Object} cli   general cli object
 *
 * @private
 * @tested
 */
databaseCommands._allDocuments = function(input, cli) {
  var args = input.slice(1, input.length),
      argsLength = args.length,
      paramsObject;

  if (argsLength > 0) {
    // @zoddy wants to have an object instead an array - let's transform
    paramsObject = cHelper._createParamsObject(args);

    // make call or show message for invalid params
    if (paramsObject !== undefined) {
      cli.db.allDocuments(paramsObject, databaseCallbacks.allDocuments);
    } else {
      console.log('There was invalid parameter input');
      console.log('Look for help with:\n');
      console.log('    $ help allDocuments');

      cli.prompt();
    }
  } else {
    cli.db.allDocuments(databaseCallbacks.allDocuments);
  }
};

/**
 * Display all view for given design document of given database.
 *
 * @param  {Array}  input Array of ' ' splitted input arguments
 * @param  {Object} cli   general cli object
 *
 * @private
 * @tested
 */
databaseCommands._allViews = function(input, cli) {
  var args = input.slice(1, input.length),
      argsLength = args.length,
      design = args[0];

  if (argsLength) {
    cli.db.document('_design/' + design).load(databaseCallbacks.designLoaded);
  } else {
    console.log(
     '\nPlease use the \'allViews\' command with 1 argument.\n' +
     'Look for help with:\n' +
     '    $ help allViews\n'
    );

    cli.prompt();
  }
};

/**
 * Switch to document level
 *
 * @param  {Array}  input Array of ' ' splitted input arguments
 * @param  {Object} cli   general cli object
 *
 * @private
 * @tested
 */
databaseCommands._document = function(input, cli) {
  var args = input.slice(1, input.length),
      id = args[0];

  this.__setDocumentAndSwitchLevel(cli, id);
};

/**
 * Callback function to filter out
 * designs out of all documents object
 *
 * @param  {Object|null} error error object or null
 * @param  {Object}      info  info about documents
 * @param  {Object}      docs  all documents object
 *
 * @private
 * @tested
 */
databaseCommands.__filterDesigns = function(error, info, docs) {
  var designDocs;

  if (error) {
    databaseCallbacks.showError(error);
  } else {
    designDocs = Object.keys(docs).filter(function(key) {
      return key.match(/^_design\/.*$/);
    }).map( function(design) {
      return design.replace(/^_design\//, '');
    });

    databaseCallbacks.allDesignDocuments(designDocs);
  }
};

/**
 * Set the particular document and switch cushion level
 *
 * @param  {Object             cli general cli object
 * @param  {string|undefined}  id  id of new object
 *
 * @private
 * @tested
 */
databaseCommands.__setDocumentAndSwitchLevel = function(cli, id) {
  // that can be done better with arguments call but I'm lazy
  if (id) {
    cli.doc = cli.db.document(id);
    cli.name = id;
  } else {
    cli.doc = cli.db.document();
    cli.name = '...';
  }

  cli.level = 'document';

  cli.doc.load(cli.documentCallbacks.load);
};

/**
 * Display temporary view for given database.
 *
 * @param  {Array}  input Array of ' ' splitted input arguments
 * @param  {Object} cli   general cli object
 *
 * @private
 * @tested
 */
databaseCommands._tmpView = function(input, cli) {
  var args = input.slice(1, input.length),
      map = args.shift(),
      newArgs = [map],
      paramsObject,
      reduce;

  // if only mapping function was set
  // args is empty at this point
  if (args.length <= 0 && !map) {
    console.log(
     '\nPlease use the \'tmpView\' command at least with 1 argument.\n' +
     'Look for help with:\n' +
     '    $ help tmpView\n'
    );

    cli.prompt();

    return;
  }

  if (args.length && args[args.length - 1].match(/function/g)) {
    reduce = args.pop();
  }

  // TODO what happens if there is a parse error????
  // define case for return undefined
  paramsObject = cHelper._createParamsObject(args);

  if (paramsObject && Object.keys(paramsObject).length) {
    newArgs.push(paramsObject);
  } else {
    if (paramsObject === undefined) {
      console.log('There was invalid parameter input');
      console.log('Look for help with:\n');
      console.log('    $ help view');

      cli.prompt();

      return;
    }
  }

  if (reduce) {
    newArgs.push(reduce);
  }

  newArgs.push(databaseCallbacks.view);

  cli.db.temporaryView.apply(cli.db, newArgs);
};

/**
 * Display given view for given database.
 *
 * @param  {Array}  input Array of ' ' splitted input arguments
 * @param  {Object} cli   general cli object
 *
 * @private
 * @tested
 */
databaseCommands._view = function(input, cli) {
  var args = input.slice(1, 3),
      argsLength = args.length,
      params = input.slice(3, input.length),
      paramsObject;

  // check query params for view
  if (argsLength > 1) {
    // @zoddy wants to have an object instead an array - let's transform
    paramsObject = cHelper._createParamsObject(params);

    if (paramsObject !== undefined) {
      args.push(paramsObject, databaseCallbacks.view);
      cli.db.view.apply(cli.db, args);
    } else {
      console.log('There was invalid parameter input');
      console.log('Look for help with:\n');
      console.log('    $ help view');

      cli.prompt();
    }
  } else {
    console.log(
     'Please, use the \'view\' command with 2 or more arguments.\n' +
     'Look for help with:\n' +
     '    $ help view'
    );

    cli.prompt();
  }
};

/**
 * General function for commands that don't need
 * specific actions, validation or functionality.
 * It's only executing the particular cushion function
 * and the depending callback.
 *
 * @param   {Array}  command Array of ' ' splitted input arguments
 * @param   {Object} cli     general cli object
 *
 * @private
 * @tested
 */
databaseCommands._simpleCommand = function(input, cli) {
  var command = input[0];

  cli.db[command](databaseCallbacks[command]);
};

databaseCommands._cleanup =
databaseCommands._compact =
databaseCommands._create =
databaseCommands._destroy =
databaseCommands._ensureFullCommit =
databaseCommands._info = databaseCommands._simpleCommand;


text:
package sayHello;

public abstract class BasePerson implements Person {

	private String name;

	public BasePerson(String name){
		setName(name);
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String getName() {
		// TODO Auto-generated method stub
		return this.name;
	}

}


text:
package org.jboss.resteasy.test.client.resource;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

@Path("/foo")
public class SmokeParamResource {

    @POST
    @Produces("text/plain")
    @Consumes("text/plain")
    public String create(String cust) {
        return cust;
    }

    @GET
    @Produces("text/plain")
    public String get(@HeaderParam("a") String a, @QueryParam("b") String b) {
        return a + " " + b;
    }

}