text:
<?php
// src/Sukaldaris/InfoBundle/Entity/Utensilio.php
namespace Sukaldaris\InfoBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="utensilio")
* @ORM\Entity(repositoryClass="Sukaldaris\InfoBundle\Entity\UtensilioRepository")
*/

class Utensilio
{
	/**
	* @ORM\Id
	* @ORM\Column(type="integer")
	* @ORM\GeneratedValue(strategy="AUTO")
	*/
	protected $id;

	/**
	* @ORM\Column(type="text")
	*/
	protected $nombre;

    /**
     * @ORM\ManyToMany(targetEntity="Receta", inversedBy="utensilios")
     * @ORM\JoinTable(name="utensilios_recetas",
     *      joinColumns={@ORM\JoinColumn(name="utensilio_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="receta_id", referencedColumnName="id")}
     *      )
     */
    protected $recetas;

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

    /**
     * Set nombre
     *
     * @param string $nombre
     * @return Utensilio
     */
    public function setNombre($nombre)
    {
        $this->nombre = $nombre;

        return $this;
    }

    /**
     * Get nombre
     *
     * @return string
     */
    public function getNombre()
    {
        return $this->nombre;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->recetas = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add recetas
     *
     * @param \Sukaldaris\InfoBundle\Entity\Receta $recetas
     * @return Utensilio
     */
    public function addReceta(\Sukaldaris\InfoBundle\Entity\Receta $recetas)
    {
        $this->recetas[] = $recetas;

        return $this;
    }

    /**
     * Remove recetas
     *
     * @param \Sukaldaris\InfoBundle\Entity\Receta $recetas
     */
    public function removeReceta(\Sukaldaris\InfoBundle\Entity\Receta $recetas)
    {
        $this->recetas->removeElement($recetas);
    }

    /**
     * Get recetas
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getRecetas()
    {
        return $this->recetas;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Google\Service\OnDemandScanning\Resource;

use Google\Service\OnDemandScanning\ListVulnerabilitiesResponseV1;

/**
 * The "vulnerabilities" collection of methods.
 * Typical usage is:
 *  <code>
 *   $ondemandscanningService = new Google\Service\OnDemandScanning(...);
 *   $vulnerabilities = $ondemandscanningService->vulnerabilities;
 *  </code>
 */
class ProjectsLocationsScansVulnerabilities extends \Google\Service\Resource
{
  /**
   * Lists vulnerabilities resulting from a successfully completed scan.
   * (vulnerabilities.listProjectsLocationsScansVulnerabilities)
   *
   * @param string $parent Required. The parent of the collection of
   * Vulnerabilities being requested. Format:
   * projects/[project_name]/locations/[location]/scans/[scan_id]
   * @param array $optParams Optional parameters.
   *
   * @opt_param int pageSize The number of vulnerabilities to retrieve.
   * @opt_param string pageToken The page token, resulting from a previous call to
   * ListVulnerabilities.
   * @return ListVulnerabilitiesResponseV1
   */
  public function listProjectsLocationsScansVulnerabilities($parent, $optParams = [])
  {
    $params = ['parent' => $parent];
    $params = array_merge($params, $optParams);
    return $this->call('list', [$params], ListVulnerabilitiesResponseV1::class);
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsScansVulnerabilities::class, 'Google_Service_OnDemandScanning_Resource_ProjectsLocationsScansVulnerabilities');


text:
package org.elasticsearch.snapshots;

import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.cluster.metadata.SnapshotId;

/**
 * Generic snapshot exception
 */
public class SnapshotException extends ElasticsearchException {
    private final SnapshotId snapshot;

    public SnapshotException(SnapshotId snapshot, String msg) {
        this(snapshot, msg, null);
    }

    public SnapshotException(SnapshotId snapshot, String msg, Throwable cause) {
        super("[" + (snapshot == null ? "_na" : snapshot) + "] " + msg, cause);
        this.snapshot = snapshot;
    }

    public SnapshotId snapshot() {
        return snapshot;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2017 Citrus-CAF Project
  ~ 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.
  ~
  -->

<resources>

    <!-- Action bar -->
    <color name="action_bar_background">@*android:color/holo_primary</color>
    <color name="actionbar_background_color">@*android:color/holo_primary</color>

    <!-- Actionbar shown when long press -->
    <color name="contextual_selection_bar_color">@*android:color/holo_primary</color>
    <!-- Color of the status bar above the contextual selection bar. -->
    <color name="contextual_selection_bar_status_bar_color">@*android:color/holo_primary_dark</color>

    <!-- primary colors -->
    <color name="primary_color_dark">@*android:color/holo_primary_dark</color>
    <color name="primary_color">#98000000</color>
    <color name="group_primary_color_dark">@*android:color/holo_primary_dark</color>
    <color name="group_primary_color">#98000000</color>

    <!-- Background color for an ExpandingEntryCard -->
    <color name="expanding_entry_card_background_color">@*android:color/holo_primary</color>

    <!-- Color of the background of cards -->
    <color name="card_margin_color">@*android:color/background_holo_dark</color>

    <!-- Background color of pinned header items. -->
    <color name="list_item_pinned_header_color">@*android:color/holo_primary_dark</color>

    <!-- Color of background of all empty states. -->
    <color name="empty_state_background">@*android:color/background_holo_dark</color>

    <!-- The default color used for tinting photos when no color can be extracted via Palette,
            this is Blue Grey 500 -->
    <color name="quickcontact_default_photo_tint_color">@*android:color/holo_primary</color>

    <!-- The default secondary color when no color can be extracted via Palette,
            this is Blue Grey 700 -->
    <color name="quickcontact_default_photo_tint_color_dark">@*android:color/holo_primary</color>

    <!-- Background color of the search box -->
    <color name="searchbox_background_color">@*android:color/holo_primary_dark</color>

    <!-- Color of the background of the contact detail and editor pages -->
    <color name="background_primary">@*android:color/background_holo_dark</color>
    <color name="contact_all_list_background_color">@*android:color/background_holo_dark</color>

    <!-- Background color for the call subject history view. -->
    <color name="call_subject_history_background">@*android:color/background_holo_dark</color>

    <!-- Background color for a snackbar. -->
    <color name="snackbar_background">@*android:color/holo_primary_dark</color>

    <!-- Background color for sync-off alert. -->
    <color name="alert_background">@*android:color/holo_primary</color>

    <!-- Background color for the navigation drawer -->
    <color name="navigation_drawer_background_color">@*android:color/holo_primary_dark</color>

    <!-- Background color for the current selected item in the navigation drawer -->
    <color name="drawer_selected_color">@*android:color/holo_primary</color>

    <!-- Background color for the current selected item icon in the navigation drawer -->
    <color name="drawer_selected_icon_color">@*android:color/holo_primary</color>

    <!-- Search-box's colors.  -->
    <color name="searchbox_phone_background_color">@*android:color/transparent</color>

    <!-- Popup select button background. -->
    <color name="select_popup_button_background">@android:color/holo_blue_dark</color>

</resources>


text:
layout: page
title:  Features
permalink: /features
---

* TOC
{:toc}

## Single Log View

All log file contents are merged into a single view based on message timestamps.
You no longer need to manually correlate timestamps across multiple windows or
figure out the order in which to view rotated log files. The color bars on the
left-hand side help to show which file a message belongs to.

![Screenshot of lnav showing messages from multiple files](/assets/images/lnav-multi-file2.png)

## Automatic Log Format Detection

The log message format is automatically determined by lnav while scanning your
files.   The following formats are built in by default:

* Common Web Access Log format
* CUPS page_log
* Syslog
* Glog
* VMware ESXi/vCenter Logs
* dpkg.log
* uwsgi
* "Generic" - Any message that starts with a timestamp
* Strace
* sudo

GZIP'ed and BZIP2'ed files are also detected automatically and decompressed on-the-fly.

## Filters

Display only lines that match or do not match a set of regular expressions.
Useful for removing extraneous log lines that you are not interested in.

## Timeline View

The timeline view shows a histogram of messages over time. The number of
warnings and errors are highlighted in the display so that you can easily see
where problems have occurred. Once you have found a period of time that is of
interest, a key-press will take you back to the log message view at the
corresponding time.

![Screenshot of timeline view](/assets/images/lnav-hist.png)

## Pretty-Print View

The pretty-print view will reformat structured data, like XML or JSON, so that
it is easier to read.  Simply press SHIFT+P in the log view to have all the
currently displayed lines pretty-printed.

The following screenshot shows an XML blob with no indentation:

![A flat blob of XML](/assets/images/lnav-before-pretty.png)

After pressing SHIFT+P, the XML is pretty-printed for easier viewing:

![A pretty-printed blob of XML](/assets/images/lnav-after-pretty.png)

## Query Logs Using SQL

Log files are directly used as the backing for SQLite virtual tables.  This
means you can perform queries on messages without having to load the data into
an SQL database.  For example, the screenshot below shows the result of
running the following query against an Apache access_log file:

```sql
SELECT c_ip, count(*), sum(sc_bytes) AS total FROM access_log
    GROUP BY c_ip ORDER BY total DESC;
```

![The results of a SQL query](/assets/images/lnav-query.png)

## "Live" Operation

Searches are done as you type; new log lines are automatically loaded and
searched as they are added; filters apply to lines as they are loaded; and, SQL
queries are checked for correctness as you type.

## Themes

The UI can be [customized through themes](https://lnav.readthedocs.io/en/latest/config.html#theme-definitions).

![Animation of the UI cycling through themes](/assets/images/lnav-theme-cycle.gif)

## Syntax Highlighting

Errors and warnings are colored in red and yellow, respectively. Highlights are
also applied to: SQL keywords, XML tags, file and line numbers in Java
backtraces, and quoted strings. The search and SQL query prompt are also
highlighted as you type, making it easier to see errors and matching brackets.

![Animation of syntax highlighting](/assets/images/lnav-syntax-highlight.gif)

## Tab-completion

The command prompt supports tab-completion for almost all operations. For
example, when doing a search, you can tab-complete words that are displayed on
screen rather than having to do a copy & paste.

![Animation of TAB-completion](/assets/images/lnav-tab-complete.gif)

## Custom Keymaps

[Hotkeys can be customized](https://lnav.readthedocs.io/en/latest/config.html#keymap-definitions)
to run lnav commands or scripts.

## Sessions

Session information is saved automatically and restored when you are viewing the
same set of files. The current location in files, bookmarks, and applied filters
are all saved as part of the session.

## Headless Mode

The log processing features of lnav can be used in scripts if you have a canned
set of operations or queries that you want to perform regularly. You can enable
headless mode with the '-n' switch on the command-line and then use the '-c'
flag to specify the commands or queries you want to execute. For example, to get
the top 10 client IP addresses from an apache access log file and write the
results to standard out in CSV format:

```console
$ lnav -n \
    -c ';SELECT c_ip, count(*) AS total FROM access_log GROUP BY c_ip ORDER BY total DESC LIMIT 10' \
    -c ':write-csv-to -' \
    access.log

c_ip,total
10.208.110.176,2989570
10.178.4.102,11183
10.32.110.197,2020
10.29.165.250,443
```


text:
"""Utility module for running with external commands."""

import subprocess

def run(args, stdout=None, stderr=None, check=True):
    """Runs command for given arguments.

    Compared to the subprocess.run command, this function adds
    automatic opening/closing of any file paths passed to stdout/stderr.

    Parameters
    ----------
    args : List[str]
        Arguments for launching the process, passed as a list.
    stdout : Union[Path, int]
        Specifies the standard output handle for the process.
    stdout : Union[Path, int]
        Specifies the standard error handle for the processe.
    check : bool
        Whether to check the returncode of the process.

    Returns
    -------
    subprocess.Popen
        Handle to completed process.

    """

    stdout_ = _open_stdstream(stdout)
    stderr_ = _open_stdstream(stderr)

    try:
        process = subprocess.Popen(args, stdout=stdout_, stderr=stderr_)
        process.wait()
    finally:
        for std in [stdout_, stderr_]:
            _close_stdstream(std)

    # Check return code.
    if check and process.returncode != 0:
        stderr_msg = process.stderr.read().decode()
        raise ValueError('Process terminated with errorcode {}\n\n'
                         'Output from stderr:\n\n'
                         .format(process.returncode) + stderr_msg)

    return process

def _open_stdstream(file_path, mode='w'):
    if file_path is None:
        return subprocess.PIPE
    else:
        return file_path.open(mode)

def _close_stdstream(stdstream):
    if stdstream != subprocess.PIPE:
        stdstream.close()

def run_piped(args_list, stdout=None, stderrs=None, check=True):
    """Runs piped command for given list of arguments.

    Parameters
    ----------
    args : List[str]
        Arguments for launching the process, passed as a list.
    stdout : Union[Path, int]
        Specifies the standard output handle for the final process.
    stdout : List[Union[Path, int]]
        Specifies the standard error handles for the processes.
    check : bool
        Whether to check the returncode of the process.

    Returns
    -------
    subprocess.Popen
        Handle to completed process.

    """

    if len(args_list) < 2:
        raise ValueError('At least two sets of arguments should be given')

    if stderrs is None:
        stderrs = [None] * len(args_list)

    # Handle processes 1 to n-1.
    processes = []
    stream_handles = []

    try:
        prev_out = None
        for arg_list, stderr in zip(args_list[:-1], stderrs[:-1]):
            # Setup processes.
            stderr_fh = _open_stdstream(stderr)
            stream_handles.append(stderr_fh)

            process = subprocess.Popen(
                arg_list,
                stdin=prev_out,
                stdout=subprocess.PIPE,
                stderr=stderr_fh)

            prev_out = process.stdout
            processes.append(process)

        # Handle final process.
        stdout_fh = _open_stdstream(stdout)
        stderr_fh = _open_stdstream(stderrs[-1])
        stream_handles += [stdout_fh, stderr_fh]

        final_process = subprocess.Popen(
            args_list[-1], stdout=stdout_fh, stderr=stderr_fh, stdin=prev_out)

        processes.append(final_process)

        # Allow pi to receive a SIGPIPE.
        for process in processes[:-1]:
            process.stdout.close()

        final_process.wait()

        # Check return codes.
        if check:
            if final_process.returncode != 0:
                stderr_msg = final_process.stderr.read().decode()
                raise ValueError('Process terminated with errorcode {}\n\n'
                                 'Output from stderr:\n\n'.format(
                                     final_process.returncode) + stderr_msg)

    finally:
        # Close all file handles.
        for handle in stream_handles:
            _close_stdstream(handle)

    return processes

def flatten_arguments(arg_dict):
    """Flattens a dict of options into an argument list.

    Parameters
    ----------
    arg_dict : Dict[Str, Any]
        Dictionary of arguments. Keys should be strings, values may be
        lists or tuples (for multiple values), booleans (for flags)
        or any other value that can be converted to a string.

    Returns
    -------
    List[str]
        List of flattened arguments.

    """

    # Iterate over keys in lexical order, so that we have a
    # reproducible order of iteration (useful for tests).
    opt_names = sorted(arg_dict.keys())

    # Flatten values.
    options = []
    for opt_name in opt_names:
        opt_value = arg_dict[opt_name]

        if isinstance(opt_value, (tuple, list)):
            options += [opt_name] + [str(v) for v in opt_value]
        elif opt_value is True:
            options += [opt_name]
        elif not (opt_value is False or opt_value is None):
            options += [opt_name, str(opt_value)]

    return options


text:
package volume

type VolumeStats struct {
	SizeInBytes int64 `json:"size_in_bytes"`
}


text:
ACCEPTED

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

#### Published in
null

#### Original name
Arundinaria mairei Hack. ex Hand.-Mazz.

### Remarks
null


text:
using System.Dynamic;
using AmplaData.AmplaData2008;
using AmplaData.AmplaSecurity2007;
using AmplaData.Database;
using AmplaData.Dynamic.Methods.Binders;
using AmplaData.Modules.Production;
using AmplaData.Records;
using NUnit.Framework;
using NUnit.Framework.Constraints;

namespace AmplaData.Dynamic.Methods.Strategies
{
    [TestFixture]
    public abstract class StrategyTestFixture<T> : TestFixture where T : IMemberStrategy, new()
    {
        protected const string Location = "Enterprise.Site.Area.Production";
        protected const string Module = "Production";

        protected T Strategy { get; private set; }

        protected override void OnSetUp()
        {
            base.OnSetUp();
            SimpleSecurityWebServiceClient securityWebService = new SimpleSecurityWebServiceClient("User");
            SimpleAmplaDatabase amplaDatabase = new SimpleAmplaDatabase();
            SimpleAmplaConfiguration configuration = new SimpleAmplaConfiguration();
            SimpleDataWebServiceClient client = new SimpleDataWebServiceClient(amplaDatabase, configuration, securityWebService);

            DataWebServiceFactory.Factory = () => client;
            Strategy = new T();
        }

        protected override void OnTearDown()
        {
            base.OnTearDown();
            DataWebServiceFactory.Factory = null;
            Strategy = default(T);
        }

        protected void AssertMemberBinder(string method, int argCount, string[] argNames, object[] args)
        {
            InvokeMemberBinder memberBinder = Binder.GetMemberBinder("Find", 1, "Id");
            IDynamicBinder dynamicBinder = Strategy.GetBinder(memberBinder, new object[] {100});
            Assert.That(dynamicBinder, Is.Not.Null);

        }

        protected void AssertBinder(Binder binder, IResolveConstraint resolveConstraint)
        {
            InvokeMemberBinder memberBinder = binder.GetMemberBinder();
            IDynamicBinder dynamicBinder = Strategy.GetBinder(memberBinder, binder.Args);
            Assert.That(dynamicBinder, resolveConstraint);
        }
    }
}


text:
[![License](https://img.shields.io/github/license/voxpupuli/puppet-archive.svg)](https://github.com/voxpupuli/puppet-archive/blob/master/LICENSE)
[![Build Status](https://travis-ci.org/voxpupuli/puppet-archive.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-archive)
[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-archive/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-archive)
[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/archive.svg)](https://forge.puppetlabs.com/puppet/archive)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/archive.svg)](https://forge.puppetlabs.com/puppet/archive)
[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/archive.svg)](https://forge.puppetlabs.com/puppet/archive)
[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/archive.svg)](https://forge.puppetlabs.com/puppet/archive)
[![Camptocamp compatible](https://img.shields.io/badge/camptocamp-compatible-orange.svg)](https://forge.puppet.com/camptocamp/archive)

#### Table of Contents

1. [Overview](#overview)
2. [Module Description](#module-description)
3. [Setup](#setup)
4. [Usage](#usage)
   * [Example](#usage-example)
   * [Puppet URL](#puppet-url)
   * [File permission](#file-permission)
   * [Network files](#network-files)
   * [Extract customization](#extract-customization)
   * [S3 Bucket](#s3-bucket)
   * [Migrating from puppet-staging](#migrating-from-puppet-staging)
5. [Reference](#reference)
6. [Development](#development)

## Overview

This module manages download, deployment, and cleanup of archive files.

## Module Description

This module uses types and providers to download and manage compress files,
with optional lifecycle functionality such as checksum, extraction, and
cleanup. The benefits over existing modules such as
[puppet-staging](https://github.com/voxpupoli/puppet-staging):

* Implemented via types and provider instead of exec resource.
* Follows 302 redirect and propagate download failure.
* Optional checksum verification of archive files.
* Automatic dependency to parent directory.
* Support Windows file extraction via 7zip.
* Able to cleanup archive files after extraction.

This module is compatible with [camptocamp/archive](https://forge.puppet.com/camptocamp/archive).
For this it provides compatibility shims.

## Setup

The module requires 7zip for windows clients which is installed via `include
'::archive'`. On posix systems, curl is the default provider. The default
provider can be overwritten by configuring resource defaults in site.pp:

```puppet
Archive {
  provider => 'ruby',
}
```

Users of the module is responsbile for archive package dependencies for
alternative providers and all extraction utilities such as tar, gunzip, bunzip:

```puppet
if $::facts['osfamily'] != 'windows' {
  package { 'wget':
    ensure => present,
  }

  package { 'bunzip':
    ensure => present,
  }

  Archive {
    provider => 'wget',
    require  => Package['wget', 'bunzip'],
  }
}
```

## Usage

Archive module dependency is managed by the archive class. This is only
required for windows platform. By default 7zip is installed via chocolatey, but
can be adjusted to use the msi package instead:

```puppet
class { 'archive':
  seven_zip_name     => '7-Zip 9.20 (x64 edition)',
  seven_zip_source   => 'C:/Windows/Temp/7z920-x64.msi',
  seven_zip_provider => 'windows',
}
```

### Usage Example

```puppet
include '::archive' # NOTE: optional for posix platforms

archive { '/tmp/jta-1.1.jar':
  ensure        => present,
  extract       => true,
  extract_path  => '/tmp',
  source        => 'http://central.maven.org/maven2/javax/transaction/jta/1.1/jta-1.1.jar',
  checksum      => '2ca09f0b36ca7d71b762e14ea2ff09d5eac57558',
  checksum_type => 'sha1',
  creates       => '/tmp/javax',
  cleanup       => true,
}

archive { '/tmp/test100k.db':
  source   => 'ftp://ftp.otenet.gr/test100k.db',
  username => 'speedtest',
  password => 'speedtest',
}
```

### Puppet URL

Since march 2017, the Archive type also supports puppet URLs. Here is an example
of how to use this:

```puppet

archive { '/home/myuser/help':
  source        => 'puppet:///modules/profile/help.tar.gz',
  extract       => true,
  extract_path  => $homedir,
  creates       => "${homedir}/help" #directory inside tgz
}
```

### File permission

When extracting files as non-root user, either ensure the target directory
exists with the appropriate permission (see [tomcat.pp](tests/tomcat.pp) for
full working example):

```puppet
$dirname = 'apache-tomcat-9.0.0.M3'
$filename = "${dirname}.zip"
$install_path = "/opt/${dirname}"

file { $install_path:
  ensure => directory,
  owner  => 'tomcat',
  group  => 'tomcat',
  mode   => '0755',
}

archive { $filename:
  path          => "/tmp/${filename}",
  source        => 'http://www-eu.apache.org/dist/tomcat/tomcat-9/v9.0.0.M3/bin/apache-tomcat-9.0.0.M3.zip',
  checksum      => 'f2aaf16f5e421b97513c502c03c117fab6569076',
  checksum_type => 'sha1',
  extract       => true,
  extract_path  => '/opt',
  creates       => "${install_path}/bin",
  cleanup       => true,
  user          => 'tomcat',
  group         => 'tomcat',
  require       => File[$install_path],
}
```

or use an subscribing exec to chmod the directory afterwards:

```puppet
$dirname = 'apache-tomcat-9.0.0.M3'
$filename = "${dirname}.zip"
$install_path = "/opt/${dirname}"

file { '/opt/tomcat':
  ensure => 'link',
  target => $install_path
}

archive { $filename:
  path          => "/tmp/${filename}",
  source        => "http://www-eu.apache.org/dist/tomcat/tomcat-9/v9.0.0.M3/bin/apache-tomcat-9.0.0.M3.zip",
  checksum      => 'f2aaf16f5e421b97513c502c03c117fab6569076',
  checksum_type => 'sha1',
  extract       => true,
  extract_path  => '/opt',
  creates       => $install_path,
  cleanup       => 'true',
  require       => File[$install_path],
}

exec { 'tomcat permission':
  command   => "chown tomcat:tomcat $install_path",
  path      => $::path,
  subscribe => Archive[$filename],
}
```

### Network files

For large binary files that needs to be extracted locally, instead of copying
the file from the network fileshare, simply set the file path to be the same as
the source and archive will use the network file location:

```puppet
archive { '/nfs/repo/software.zip':
  source        => '/nfs/repo/software.zip'
  extract       => true,
  extract_path  => '/opt',
  checksum_type => 'none', # typically unecessary
  cleanup       => false,  # keep the file on the server
}
```

### Extract Customization

The `extract_flags` or `extract_command` parameters can be used to override the
default extraction command/flag (defaults are specified in
[achive.rb](lib/puppet_x/bodeco/archive.rb)).

```puppet
# tar striping directories:
archive { '/var/lib/kafka/kafka_2.10-0.8.2.1.tgz':
  ensure          => present,
  extract         => true,
  extract_command => 'tar xfz %s --strip-components=1',
  extract_path    => '/opt/kafka_2.10-0.8.2.1',
  cleanup         => true,
  creates         => '/opt/kafka_2.10-0.8.2.1/config',
}

# zip freshen existing files (zip -of %s instead of zip -o %s):
archive { '/var/lib/example.zip':
  extract       => true,
  extract_path  => '/opt',
  extract_flags => '-of',
  cleanup       => true,
  subscribe     => ...,
}
```

### S3 bucket

S3 support is implemented via the [AWS
CLI](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html).
By default this dependency is only installed for Linux VMs running on AWS, or
enabled via `aws_cli_install` option:

```puppet
class { '::archive':
  aws_cli_install => true,
}

# See AWS cli guide for credential and configuration settings:
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
file { '/root/.aws/credentials':
  ensure => file,
  ...
}
file { '/root/.aws/config':
  ensure => file,
  ...
}

archive { '/tmp/gravatar.png':
  ensure => present,
  source => 's3://bodecoio/gravatar.png',
}
```

NOTE: Alternative s3 provider support can be implemented by overriding the
[s3_download method](lib/puppet/provider/archive/ruby.rb):

### Download customizations

In some cases you may need custom flags for curl/wget/s3 which can be
supplied via `download_options`. Since this parameter is provider specific,
beware of the order of defaults:

* s3:// files accepts aws cli options
  ```puppet
  archive { '/tmp/gravatar.png':
    ensure           => present,
    source           => 's3://bodecoio/gravatar.png',
    download_options => ['--region', 'eu-central-1'],
  }
  ```
* puppet `provider` override:
  ```puppet
  archive { '/tmp/jta-1.1.jar':
    ensure           => present,
    source           => 'http://central.maven.org/maven2/javax/transaction/jta/1.1/jta-1.1.jar',
    provider         => 'wget',
    download_options => '--continue',
  }
  ```
* Linux default provider is `curl`, and Windows default is `ruby` (no effect).

This option can also be applied globally to address issues for specific OS:
```puppet
if $::facts['osfamily'] != 'RedHat' {
  Archive {
    download_options => '--tlsv1',
  }
}
```

### Migrating from puppet-staging

It is recommended to use puppet-archive instead of puppet-staging.
Users wishing to migrate may find the following examples useful.

#### Simple example without extraction

##### puppet-staging

```puppet
class { 'staging':
  path  => '/tmp/staging',
}

staging::file { 'master.zip':
  source => 'https://github.com/voxpupuli/puppet-archive/archive/master.zip',
}
```

##### puppet-archive

```puppet
archive { '/tmp/staging/master.zip':
  source => 'https://github.com/voxpupuli/puppet-archive/archive/master.zip',
}
```

#### Example with zip file extraction

##### puppet-staging

```puppet
class { 'staging':
  path  => '/tmp/staging',
}

staging::file { 'master.zip':
  source  => 'https://github.com/voxpupuli/puppet-archive/archive/master.zip',
} ->
staging::extract { 'master.zip':
  target  => '/tmp/staging/master.zip',
  creates => '/tmp/staging/puppet-archive-master',
}
```

##### puppet-archive

```puppet
archive { '/tmp/staging/master.zip':
  source       => 'https://github.com/voxpupuli/puppet-archive/archive/master.zip',
  extract      => true,
  extract_path => '/tmp/staging',
  creates      => '/tmp/staging/puppet-archive-master',
  cleanup      => false,
}
```

## Reference

### Classes

* `archive`: install 7zip package (Windows only) and aws cli for s3 support.
* `archive::staging`: install package dependencies and creates staging directory
  for backwards compatibility. Use the archive class instead if you do not need
  the staging directory.

### Define Resources

* `archive::artifactory`: archive wrapper for [JFrog Artifactory](http://www.jfrog.com/open-source/#os-arti)
  files with checksum.
* `archive::go`: archive wrapper for [GO Continuous Delivery](http://www.go.cd/)
  files with checksum.
* `archive::nexus`: archive wrapper for [Sonatype Nexus](http://www.sonatype.org/nexus/)
  files with checksum.
* `archive::download`: archive wrapper and compatibility shim for [camptocamp/archive](https://forge.puppet.com/camptocamp/archive).
  This is considered private API, as it has to change with camptocamp/archive.
  For this reason it will remain undocumented, and removed when no longer needed
  . We suggest not using it directly. Instead please consider migrating to
  archive itself where possible.

### Resources

#### Archive

* `ensure`: whether archive file should be present/absent (default: present)
* `path`: namevar, archive file fully qualified file path.
* `filename`: archive file name (derived from path).
* `source`: archive file source, supports http|https|ftp|file|s3 uri.
* `username`: username to download source file.
* `password`: password to download source file.
* `allow_insecure`: Ignore HTTPS certificate errors (true|false). (default: false)
* `cookie`: archive file download cookie.
* `checksum_type`: archive file checksum type (none|md5|sha1|sha2|sh256|sha384|
  sha512). (default: none)
* `checksum`: archive file checksum (match checksum_type)
* `checksum_url`: archive file checksum source (instead of specify checksum)
* `checksum_verify`: whether checksum will be verified (true|false). (default: true)
* `extract`: whether archive will be extracted after download (true|false).
  (default: false)
* `extract_path`: target folder path to extract archive.
* `extract_command`: custom extraction command ('tar xvf example.tar.gz'), also
* `temp_dir`: specify an alternative temporary directory to use for file downloads, if unset the OS default is used
  support sprintf format ('tar xvf %s') which will be processed with the
  filename: sprintf('tar xvf %s', filename)
* `extract_flags`: custom extraction options, this replaces the default flags.
  A string such as 'xvf' for a tar file would replace the default xf flag. A
  hash is useful when custom flags are needed for different platforms. {'tar'
  => 'xzf', '7z' => 'x -aot'}.
* `user`: extract command user (using this option will configure the archive
  file permission to 0644 so the user can read the file).
* `group`: extract command group (using this option will configure the archive
  file permission to 0644 so the user can read the file).
* `cleanup`: whether archive file will be removed after extraction (true|false).
  (default: true)
* `creates`: if file/directory exists, will not download/extract archive.
* `proxy_server`: specify a proxy server, with port number if needed. ie:
  `https://example.com:8080`.
* `proxy_type`: proxy server type (none|http|https|ftp)

#### Archive::Artifactory

* `path`: fully qualified filepath for the download the file or use
  archive_path and only supply filename. (namevar).
* `ensure`: ensure the file is present/absent.
* `url`: artifactory download url filepath. NOTE: replaces server, port,
  url_path parameters.
* `server`: artifactory server name (deprecated).
* `port`: artifactory server port (deprecated).
* `url_path`: artifactory file path
  `http:://{server}:{port}/artifactory/{url_path}` (deprecated).
* `owner`: file owner (see archive params for defaults).
* `group`: file group (see archive params for defaults).
* `mode`: file mode (see archive params for defaults).
* `archive_path`: the parent directory of local filepath.
* `extract`: whether to extract the files (true/false).
* `creates`: the file created when the archive is extracted (true/false).
* `cleanup`: remove archive file after file extraction (true/false).

#### Archive::Artifactory Example

```puppet
$dirname = 'gradle-1.0-milestone-4-20110723151213+0300'
$filename = "${dirname}-bin.zip"

archive::artifactory { $filename:
  archive_path => '/tmp',
  url          => "http://repo.jfrog.org/artifactory/distributions/org/gradle/${filename}",
  extract      => true,
  extract_path => '/opt',
  creates      => "/opt/${dirname}",
  cleanup      => true,
}

file { '/opt/gradle':
  ensure => link,
  target => "/opt/${dirname}",
}
```

#### Archive::Nexus

#### Archive::Nexus Example

```puppet
archive::nexus { '/tmp/jtstand-ui-0.98.jar':
  url        => 'https://oss.sonatype.org',
  gav        => 'org.codehaus.jtstand:jtstand-ui:0.98',
  repository => 'codehaus-releases',
  packaging  => 'jar',
  extract    => false,
}
```

## Development

We highly welcome new contributions to this module, especially those that
include documentation, and rspec tests ;) but will happily guide you through
the process, so, yes, please submit that pull request!

Note: If you are writing a dependent module that include specs in it, you will
need to set the puppetversion fact in your puppet-rspec tests. You can do that
by adding it to the default facts of your spec/spec_helper.rb:

```ruby
RSpec.configure do |c|
  c.default_facts = { :puppetversion => Puppet.version }
end
```


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.graphdht.hashgraph;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import org.neo4j.graphdb.*;

/**
 *
 * @author alex
 */
public class SimpleHashGraphDatabaseTest {

    public SimpleHashGraphDatabaseTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }

    /**
     * set of Tests fromNeo4J Getting Started Guide
     */
    @Test
    public void testGettingStartedGuide() throws Exception {
        System.out.println("Start Getting Started Guide!");
        GraphDatabaseService neo = new SimpleHashGraphDatabase("simple");

        Transaction tx = neo.beginTx();

        try {
            Node firstNode = neo.createNode();
            Node secondNode = neo.createNode();
            Relationship relationship = firstNode.createRelationshipTo(secondNode, Constants.MyRelationshipType.KNOWS);
            firstNode.setProperty("message", "Hello, ");
            secondNode.setProperty("message", "world!");
            relationship.setProperty("message", "brave Neo ");
            //tx.success();

            System.out.print(firstNode.getProperty("message"));
            System.out.print(relationship.getProperty("message"));
            System.out.print(secondNode.getProperty("message"));
        } catch (Exception e) {
            throw e;
        } finally {
            tx.finish();
        }
        neo.shutdown();

        System.out.println("\nEnd Getting Started Guide!");
    }
    /**
     * Test of createNode method, of class SimpleNodeManager.
     *
    @Test
    public void testCreateNode() {
    System.out.println("createNode");
    SimpleNodeManager instance = new SimpleNodeManager();
    Node expResult = null;
    Node result = instance.createNode();
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of getNodeById method, of class SimpleNodeManager.
     *
    @Test
    public void testGetNodeById() {
    System.out.println("getNodeById");
    long id = 0L;
    SimpleNodeManager instance = new SimpleNodeManager();
    Node expResult = null;
    Node result = instance.getNodeById(id);
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of getRelationshipById method, of class SimpleNodeManager.
     *
    @Test
    public void testGetRelationshipById() {
    System.out.println("getRelationshipById");
    long id = 0L;
    SimpleNodeManager instance = new SimpleNodeManager();
    Relationship expResult = null;
    Relationship result = instance.getRelationshipById(id);
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of getReferenceNode method, of class SimpleNodeManager.
     *
    @Test
    public void testGetReferenceNode() {
    System.out.println("getReferenceNode");
    SimpleNodeManager instance = new SimpleNodeManager();
    Node expResult = null;
    Node result = instance.getReferenceNode();
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of getAllNodes method, of class SimpleNodeManager.
     *
    @Test
    public void testGetAllNodes() {
    System.out.println("getAllNodes");
    SimpleNodeManager instance = new SimpleNodeManager();
    Iterable expResult = null;
    Iterable result = instance.getAllNodes();
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of getRelationshipTypes method, of class SimpleNodeManager.
     *
    @Test
    public void testGetRelationshipTypes() {
    System.out.println("getRelationshipTypes");
    SimpleNodeManager instance = new SimpleNodeManager();
    Iterable expResult = null;
    Iterable result = instance.getRelationshipTypes();
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of shutdown method, of class SimpleNodeManager.
     *
    @Test
    public void testShutdown() {
    System.out.println("shutdown");
    SimpleNodeManager instance = new SimpleNodeManager();
    instance.shutdown();
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of enableRemoteShell method, of class SimpleNodeManager.
     *
    @Test
    public void testEnableRemoteShell_0args() {
    System.out.println("enableRemoteShell");
    SimpleNodeManager instance = new SimpleNodeManager();
    boolean expResult = false;
    boolean result = instance.enableRemoteShell();
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of enableRemoteShell method, of class SimpleNodeManager.
     *
    @Test
    public void testEnableRemoteShell_Map() {
    System.out.println("enableRemoteShell");
    Map<String, Serializable> initialProperties = null;
    SimpleNodeManager instance = new SimpleNodeManager();
    boolean expResult = false;
    boolean result = instance.enableRemoteShell(initialProperties);
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }

    /**
     * Test of beginTx method, of class SimpleNodeManager.
     *
    @Test
    public void testBeginTx() {
    System.out.println("beginTx");
    SimpleNodeManager instance = new SimpleNodeManager();
    Transaction expResult = null;
    Transaction result = instance.beginTx();
    assertEquals(expResult, result);
    // TODO review the generated test code and remove the default call to fail.
    fail("The test case is a prototype.");
    }*/
}


text:
<?php

defined('BASEPATH') OR exit('No direct script access allowed');
require_once 'vendor/autoload.php';
class OAuth2Library {

	private $server;
	public $kata = "Halo from";

	public function __construct(){
		$dsn      = 'mysql:dbname=guyon;host=localhost';
		$username = 'root';
		$password = '';
		// error reporting (this is a demo, after all!)
		ini_set('display_errors',1);error_reporting(E_ALL);

		// $dsn is the Data Source Name for your database, for exmaple "mysql:dbname=my_oauth2_db;host=localhost"
		$storage = new \OAuth2\Storage\Pdo(array('dsn' => $dsn, 'username' => $username, 'password' => $password));

		// Pass a storage object or array of storage objects to the OAuth2 server class
		$this->server = new OAuth2\Server($storage);

		// Add the "Client Credentials" grant type (it is the simplest of the grant types)
		$this->server->addGrantType(new OAuth2\GrantType\ClientCredentials($storage));

		// Add the "Authorization Code" grant type (this is where the oauth magic happens)
		$this->server->addGrantType(new OAuth2\GrantType\AuthorizationCode($storage));
		$this->server->addGrantType(new OAuth2\GrantType\RefreshToken($storage));
	}

    public function token()
    {
    	// Handle a request for an OAuth2.0 Access Token and send the response to the client

		$this->server->handleTokenRequest(OAuth2\Request::createFromGlobals())->send();
    }

    public function authorize($username = null)
    {
    	$request = OAuth2\Request::createFromGlobals();
		$response = new OAuth2\Response();

		// validate the authorize request
		if (!$this->server->validateAuthorizeRequest($request, $response)) {
		    $response->send();
		    die;
		}
		// display an authorization form
		if (empty($_POST)) {
		  exit('
		<form method="post">
		  Do You Authorize TestClient?

		  <input type="submit" name="authorized" value="yes">
		  <input type="submit" name="authorized" value="no">
		</form>');
		}

		// print the authorization code if the user has authorized your client
		$is_authorized = ($_POST['authorized'] === 'yes');
		$this->server->handleAuthorizeRequest($request, $response, $is_authorized, $username);
		if ($is_authorized) {
		  // this is only here so that you get to see your code in the cURL request. Otherwise, we'd redirect back to the client
		  $code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
		  exit(json_encode(array('status'=>true,'code'=>"$code")));
		}
		$response->send();
    }

    public function resource(){
    	// Handle a request to a resource and authenticate the access token
		if (!$this->server->verifyResourceRequest(OAuth2\Request::createFromGlobals())) {
		    $this->server->getResponse()->send();
		    echo json_encode(array('status' => false, 'message' => 'NO ACCESS TOKEN'));
		    die;
		}
    }
}


text:
package org.apache.rave.portal.model;

import org.apache.rave.model.FriendRequestStatus;
import org.apache.rave.model.Person;
import org.apache.rave.model.PersonAsociation;
import org.apache.rave.portal.model.conversion.JpaConverter;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.UniqueConstraint;

/**
 * Represents an association between people
 */
@Entity
@Access(AccessType.FIELD)
@Table(name = "person_association",
        uniqueConstraints = @UniqueConstraint(columnNames = {"follower_id", "followedby_id"}))
@NamedQueries(value = {
		@NamedQuery(name = JpaPersonAssociation.FIND_ASSOCIATION_ITEM_BY_USERNAMES, query = "select a from JpaPersonAssociation a where a.follower.username = :follower_username and a.followedby.username = :followedby_username"),
		@NamedQuery(name = JpaPersonAssociation.DELETE_ASSOCIATION_ITEMS_BY_USERID, query = "delete from JpaPersonAssociation a where a.follower.entityId = :userid or a.followedby.entityId = :userid"),
        @NamedQuery(name = JpaPersonAssociation.FIND_ASSOCIATION_ITEMS_BY_FOLOWER_AND_STATUS, query = "select a from JpaPersonAssociation a where a.follower.username = :"+JpaPersonAssociation.FOLLOWER_USERNAME+" AND a.status=:"+JpaPersonAssociation.PARAM_STATUS),
        @NamedQuery(name = JpaPersonAssociation.FIND_ASSOCIATION_ITEMS_BY_FOLOWER_AND_STATUS, query = "select a from JpaPersonAssociation a where a.follower.username = :"+JpaPersonAssociation.FOLLOWER_USERNAME+" AND a.status=:"+JpaPersonAssociation.PARAM_STATUS),

})
public class JpaPersonAssociation implements BasicEntity, PersonAsociation {

    public static final String FOLLOWER_USERNAME = "follower_username";
    public static final String FOLLOWEDBY_USERNAME = "followedby_username";
    public static final String USERID = "userid";
    public static final String PARAM_STATUS = "status";
    public static final String FIND_ASSOCIATION_ITEM_BY_USERNAMES = "PersonAssociation.findAssociationItemByUsernames";
    public static final String DELETE_ASSOCIATION_ITEMS_BY_USERID = "PersonAssociation.deleteAssociationItemsByUserid";
    public static final String FIND_ASSOCIATION_ITEMS_BY_FOLOWER_AND_STATUS = "PersonAssociation.findAssociationItemsByFolowerAndStatus";

    @Id
    @Column(name = "entity_id")
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "personAssociationIdGenerator")
    @TableGenerator(name = "personAssociationIdGenerator", table = "RAVE_PORTAL_SEQUENCES", pkColumnName = "SEQ_NAME",
            valueColumnName = "SEQ_COUNT", pkColumnValue = "person_association", allocationSize = 1, initialValue = 1)
    private Long entityId;

    @ManyToOne
    @JoinColumn(name="follower_id", referencedColumnName = "entity_id")
    JpaPerson follower;

    @ManyToOne
    @JoinColumn(name="followedby_id", referencedColumnName = "entity_id")
    JpaPerson followedby;

    @Basic
    @Column(name="status")
    @Enumerated(EnumType.STRING)
    private FriendRequestStatus status;

    @Override
    public Long getEntityId() {
        return entityId;
    }

    @Override
    public void setEntityId(Long entityId) {
        this.entityId = entityId;
    }

    @Override
    public Person getFollower() {
        return follower;
    }

    @Override
    public void setFollower(Person follower) {
       this.follower= JpaConverter.getInstance().convert(follower, Person.class);
    }

    public JpaPerson getFollowedby() {
        return followedby;
    }

    @Override
    public void setFollowedby(Person followedby) {
           this.followedby=JpaConverter.getInstance().convert(followedby, Person.class);
    }

    public FriendRequestStatus getStatus() {
		return status;
	}

	public void setStatus(FriendRequestStatus status) {
		this.status = status;
	}

	@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        JpaPersonAssociation that = (JpaPersonAssociation) o;

        if (entityId != null ? !entityId.equals(that.entityId) : that.entityId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return entityId != null ? entityId.hashCode() : 0;
    }
}


text:
typedef struct zmempool_pool_t zmempool_pool_t;

zmempool_pool_t *zmempool_create(size_t size, size_t min_shift);
void zmempool_destroy(zmempool_pool_t *pool);
void *zmempool_alloc(zmempool_pool_t *pool, size_t size);
void *zmempool_calloc(zmempool_pool_t *poll, size_t size);
void zmempool_free(zmempool_pool_t *pool, void *p);

#endif // #ifndef ZMEMPOOL_H_


text:
Gmail to Trello Extension
=========================

There are some useful documents in ./docs folder


text:
namespace Microsoft.Azure.Management.DataLake.Store.Models
{
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// The encryption configuration used to update a user managed Key Vault
    /// key.
    /// </summary>
    public partial class UpdateEncryptionConfig
    {
        /// <summary>
        /// Initializes a new instance of the UpdateEncryptionConfig class.
        /// </summary>
        public UpdateEncryptionConfig()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the UpdateEncryptionConfig class.
        /// </summary>
        /// <param name="keyVaultMetaInfo">The updated Key Vault key to use in
        /// user managed key rotation.</param>
        public UpdateEncryptionConfig(UpdateKeyVaultMetaInfo keyVaultMetaInfo = default(UpdateKeyVaultMetaInfo))
        {
            KeyVaultMetaInfo = keyVaultMetaInfo;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets the updated Key Vault key to use in user managed key
        /// rotation.
        /// </summary>
        [JsonProperty(PropertyName = "keyVaultMetaInfo")]
        public UpdateKeyVaultMetaInfo KeyVaultMetaInfo { get; set; }

    }
}


text:
<?cs def:custom_masthead() ?>

          <a href="<?cs var:toroot ?>index.html" tabindex="-1"><img
              src="<?cs var:toroot ?>assets/images/bg_logo.png" alt="Android Developers" />
          <?cs include:"header_tabs.cs" ?>     <?cs # The links are extracted so we can better manage localization ?>

          <?cs if:template.showLanguageMenu ?>
            <img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="Language:" />

             	<select name="language" onChange="changeLangPref(this.value, true)">
          			<option value="en">English   </option>
          			<option value="ja">日本語</option>
          			<?cs #
      			    <option value="de">Deutsch</option>
          			<option value="es">Español</option>
          			<option value="fr">Français</option>
          			<option value="it">Italiano</option>
          			<option value="zh-CN">中文 (简体)</option>
          			<option value="zh-TW">中文 (繁體)</option>
      			    ?>
             	</select>

          <?cs /if ?>
          <a href="<?cs var:toroot ?>design/index.html">Android Design
          Android.com

<?cs
          call:default_search_box() ?><?cs
    	 	  if:reference ?>

    			    <input type="checkbox" id="apiLevelCheckbox" onclick="toggleApiLevelSelector(this)" />
    			    Filter by API Level:
    			    <select id="apiLevelSelector">

    			    </select>

    	 	    <?cs
    			/if ?>

<?cs
/def ?>


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta name="description" content="Zkušenosti a postřehy s vývojem virtuální reality běžící přímo ve webovém prohlížeči.">
        <meta name="keywords" content="přednáška, řečník, záznam, Plzeň, Barcamp, konference, téma, networking, workshop, prezentace, projev">

        <title>WebVR - Virtuální realita na webu - Plzeňský barcamp 2018</title>

        <meta property="og:type" content="website">
        <meta property="og:title" content="WebVR - Virtuální realita na webu- Plzeňský barcamp 2018">
        <meta property="og:site_name" content="Plzeňský Barcamp">
        <meta property="og:url" content="https://www.plzenskybarcamp.cz/2018/prednasky/285a4082">
        <meta property="og:description" content="Zkušenosti a postřehy s vývojem virtuální reality běžící přímo ve webovém prohlížeči.">
        <meta property="og:locale" content="cs_CZ">
        <meta property="og:image" content="https://cdn.plzenskybarcamp.cz/public/2018/pictures/profiles/fb-profile-10211470069853512-8cdyrypzu5xf">
        <meta property="fb:app_id" content="504432792996629">
        <meta name="twitter:card" content="summary">
        <meta name="twitter:site" content="@plzenskybarcamp">
        <meta name="twitter:creator" content="@pavolhejny">
        <meta name="google-site-verification" content="X6TDzyeXmaAgvKo48Ce7DVYd3zyyPBrmE-p2wqX-m1Y">

        <link rel="stylesheet" media="screen,projection,tv" href="https://cdn.plzenskybarcamp.cz/public/2018/css/style.css?1519646199">
        <link rel="stylesheet" media="print" href="https://cdn.plzenskybarcamp.cz/public/2018/css/print.css?1519646199">
        <link rel="shortcut icon" href="https://cdn.plzenskybarcamp.cz/public/2018/images/favicon.ico">

Úvod

Program

Přednášky

Účastnící

Partneří

Kontakt

Plzeňština ?

WebVR - Virtuální realita na webu

                <time datetime="2018-04-07">7. dubna 2018</time>

WebVR - Virtuální realita na webu

Zkušenosti a postřehy s vývojem virtuální reality běžící přímo ve webovém prohlížeči.

Komu je přednáška určena?

Webový, herní vývojáři. VR nadšenci

Přednáška se nedostala do programu.

Pavol Hejný

                        Facebook

                        Twitter

                        LinkedIn

Bio: Web app developer🌍
Game developer🎮
Fractal artist💗
Crypto lover💛

Stav hlasování: 4 hlasů

                Dal jsi svůj hlas

Twitter

Facebook

Google+

Instagram

Youtube

Plzeňský Barcamp organizují KLB

2014

2015

2016

2017

                        Předchozí ročníky:


text:
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 4 Test: word-boundary-detection:auto() forbidden</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#word-boundary-detection">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#word-boundary-expansion">
<link rel="match" href="reference/word-boundary-129-ref.html">
<meta name=flags content=should>
<meta name="assert" content="The UA should not insert a virtual word boundary between a typographic letter unit and a preceeding typographic character unit from the [UAX14] PR line breaking class">

This test is not relevant, because this UA does not support word-boundary-detection:auto(ja).

Test passes if the two boxes below are identical.

東京 $へ $行きましょう。

東京 $へ $行きましょう。


text:
FROM golang:1.19.3

RUN mkdir /app
WORKDIR /app

ADD . /app
RUN go install ./...

CMD /go/bin/greeter_server


text:
This is a fork of https://github.com/gliderlabs/herokuish project.
The key difference of the project is the absence of the Go language in the core logic.

## HowTo Use this project

	# 1. Build your docker image

	export IMAGE_NAME=myherokuish
	export STACK_URL=https://github.com/pahaz/herokuish.git
	(git clone ${STACK_URL} /tmp/buildstep && cd /tmp/buildstep && sudo make && cd -)

	# Now you have a `myherokuish:dev` docker image

	# 2. Build you project source

	export SOURCE=/tmp/buildstep/buildpacks/buildpack-python/tests/python-flask
	export CACHE=/tmp
	export BUILD_IMAGE_NAME=myherokuish__flask
	docker run -e "DOCKER_BUILD=1" -e "PORT=5000" -p "5000" -d herokuish:dev /build
	BUILD_ID=$(docker run -e "DOCKER_BUILD=1" -v "${SOURCE}:/tmp/app" -v "${CACHE}:/tmp/cache" -it ${IMAGE_NAME} /build)
	docker commit ${BUILD_ID} ${BUILD_IMAGE_NAME}

	# 3. Run built image

	docker run -e "PORT=5000" -p "5000" -d ${BUILD_IMAGE_NAME} /start

	# Now you have a built runned container
	docker ps  # see result

## License

BSD


text:
<?php
declare(strict_types=1);
namespace Ivory\Type\Ivory;

use Ivory\Connection\IConnection;
use Ivory\Exception\UndefinedTypeException;
use Ivory\Type\ConnectionDependentBaseType;

/**
 * A special class used for any PostgreSQL type which is not recognized.
 *
 * Objects of this class only serve as null-objects. Any operation on `UndefinedType` objects, even with `null` values,
 * results in an {@link \Ivory\Exception\UndefinedTypeException} being thrown.
 */
class UndefinedType extends ConnectionDependentBaseType
{
    private $connName;

    public function attachToConnection(IConnection $connection): void
    {
        $this->connName = $connection->getName();
    }

    public function detachFromConnection(): void
    {
        $this->connName = null;
    }

    public function parseValue(string $extRepr)
    {
        throw new UndefinedTypeException(
            "{$this->getSchemaName()}.{$this->getName()} on connection `{$this->connName}`"
        );
    }

    public function serializeValue($val, bool $strictType = true): string
    {
        throw new UndefinedTypeException(
            "{$this->getSchemaName()}.{$this->getName()} on connection `{$this->connName}`"
        );
    }
}


text:
/* ###
 * IP: GHIDRA
 * REVIEWED: YES
 *
 * 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 ghidra.app.cmd.refs;

import ghidra.framework.cmd.Command;
import ghidra.framework.model.DomainObject;
import ghidra.program.model.address.Address;
import ghidra.program.model.listing.Program;
import ghidra.program.model.symbol.Reference;
import ghidra.program.model.symbol.ReferenceManager;

/**
 * Command class for setting a reference to be primary.  Any other
 * reference that was primary at that address will no longer be primary.
 */
public class SetPrimaryRefCmd implements Command {

	private Address fromAddr;
	private int opIndex;
	private Address toAddr;
	private boolean isPrimary;

	private String status;

	/**
	 * Creates a command for setting whether or not a reference is the primary reference.
	 * If isPrimary is true, any other reference that was primary at that
	 * address will no longer be primary.
	 * @param ref the reference
	 * @param isPrimary true to make the reference primary, false to make it non-primary
	 */
	public SetPrimaryRefCmd(Reference ref, boolean isPrimary) {
	    this (ref.getFromAddress(), ref.getOperandIndex(), ref.getToAddress(), isPrimary);
	}

	/**
	 * Creates a command for setting whether or not a reference is the primary reference.
	 * If isPrimary is true, any other reference that was primary at that
	 * address will no longer be primary.
	 * @param fromAddr the address of the codeunit making the reference.
	 * @param opIndex the operand index.
	 * @param toAddr the address being referred to.
	 * @param isPrimary true to make the reference primary, false to make it non-primary
	 */
	public SetPrimaryRefCmd(Address fromAddr, int opIndex, Address toAddr, boolean isPrimary) {
		this.fromAddr = fromAddr;
		this.opIndex = opIndex;
		this.toAddr = toAddr;
		this.isPrimary = isPrimary;
	}

	/**
	 *
	 * @see ghidra.framework.cmd.Command#applyTo(ghidra.framework.model.DomainObject)
	 */
    public boolean applyTo(DomainObject obj) {

    	ReferenceManager refMgr = ((Program)obj).getReferenceManager();
    	Reference ref = refMgr.getReference(fromAddr, toAddr, opIndex);

    	if (ref == null) {
    		status = "Reference not found";
    		return false;
    	}

    	refMgr.setPrimary(ref, isPrimary);

		return true;
    }

    /**
     * @see ghidra.framework.cmd.Command#getStatusMsg()
     */
    public String getStatusMsg() {
        return status;
    }

    /**
     * @see ghidra.framework.cmd.Command#getName()
     */
    public String getName() {
        return "Set Primary Reference";
    }

}


text:
<StackLayout>

    <ListView [items]="tracklog">
        <ng-template let-item="item" let-i="index" let-odd="odd" let-even="even">
            <StackLayout [class.odd]="odd" [class.even]="even" orientation="horizontal">

            </StackLayout>
        </ng-template>
    </ListView>
</StackLayout>


text:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

[RequireComponent(typeof (UnityChanControlScriptWithRgidBody))]
public class HealthControl : MonoBehaviour {

	public float health;
	public UnityChanControlScriptWithRgidBody script;
	private GameObject canvasBar ;
	private Object temp;
	private Image imBarHealth;
	public void setCanvasBar(Object go){
		this.temp = go;
		canvasBar = Instantiate (temp) as GameObject;
	}
	// Use this for initialization
	//----------------------------------------------setar o tipo de fill
	void Start () {
		health = 0;

		imBarHealth = GameObject.FindGameObjectWithTag ("Health").GetComponent<Image>();
//		imHealth = canvasBar.AddComponent("Image") as Image;
		//imMana = canvasBar.AddComponent("Image") as Image;
		//imBarHealth = canvasBar.AddComponent("Image") as Image;
		//imBarHealth.type = Image.Type.Filled;
		//imBarHealth.fillMethod = Image.FillMethod.Horizontal;
		//imBarHealth.transform.position = new Vector3 (255,289,293);
		//imBarHealth.fillOrigin =
		//print (imBarHealth.tag);
		//imBarMana = canvasBar.AddComponent("Image") as Image;
		//imIcone = canvasBar.AddComponent("Image") as Image;

		//imBarHealth.renderer.enabled = true;
		//print(imBarHealth.IsActive);

	}

	void OnGUI(){
		//imBarHealth.sprite = Resources.Load ("/Imports/barra") as Sprite;
	}

	// Update is called once per frame
	void Update () {

		if (health != 0) {
			script =  GameObject.FindGameObjectWithTag ("Player").GetComponent<UnityChanControlScriptWithRgidBody> ();
			script.OnDamage (health);
			imBarHealth.fillAmount -= health;

			if (imBarHealth.fillAmount <= 0) {

				//Vector3 last_Position = GameObject.FindWithTag("Player").transform.position;
				Vector3 last_Position = new Vector3 ((float)-22.995, (float)6.348, (float)(-45.62));
			} else {
				health = 0;
			}
		}
	}
	public float GetHealth(){
		return health;
	}

	public void damage(float h){
		health = h;
	}
}


text:
layout: platform
category: platforms
title: "Data.Gov"
keywords:
thumbnail_150: "datagov_thumbnail_150px.png"
thumbnail_300: "datagov_thumbnail_300px.png"
refurl: "http://catalog.data.gov/harvest/geonode-state-csw"
---
All open data published by the Humanitarian Information Unit is available on data.gov at [http://catalog.data.gov/harvest/geonode-state-csw](http://catalog.data.gov/harvest/geonode-state-csw).  Data.Gov harvests from [State GeoNode](http://geonode.state.gov) every 24 hours.


text:
<?php

namespace Futbol\Http\Middleware;

use Closure;
use Futbol\Models\Auditory;

class Guardian
{
  /**
   * Run the request filter.
   *
   * @param  \Illuminate\Http\Request  $request
   * @param  \Closure  $next
   * @return mixed
   */
  public function handle($request, Closure $next)
  {

      $path = $request->path();
      $user = $request->user();
      $data = $request->all();

      $auditory = new Auditory;
      $auditory->path = $path;
      $auditory->data = json_encode($data);
      $auditory->save();

      return $next($request);
  }

    public function auditar($request){
      echo "ALL";
      var_dump($request->all());
        echo "user";
      var_dump($request->user());
        echo "path";
      var_dump($request->path());
    }
}


text:
import {Container, createContainer} from 'unstated-next';
import {v4} from 'uuid';

// import {StoreConstructor} from '../constants/storeConstants';

// /**
//  * The singleton id.
//  * @type {symbol}
//  */
// export const singletonId = Symbol('$$singleton');

/**
 * A collection of stores.
 */
export class StoreCollection<Value, State = void>
{
  /**
   * The list of stores by id.
   */
  stores: Record<string, Container<Value, State>> = {};

  /**
   * The singleton store.
   */
  singletonStore: (Container<Value, State> | null) = null;

  /**
   * The useStore hook function.
   */
  useStoreHook: (initialState?: State) => Value;

  constructor(useStoreHook: (initialState?: State) => Value)
  {
    this.useStoreHook = useStoreHook;
  }

  /**
   * Gets the Store for the given id or creates one.
   */
  get(id: string): Container<Value, State>
  {
    const currentContainer = this.stores[id];
    if (currentContainer) {
      return currentContainer;
    }

    if (!this.useStoreHook) {
      throw new Error('Could not create store because no useStoreHook was defined.');
    }

    const newContainer = createContainer(this.useStoreHook);
    this.stores[id] = newContainer;

    return newContainer;
  }

  /**
   * Gets a single instance (singleton) of the store or creates one.
   */
  single(): Container<Value, State>
  {
    if (this.singletonStore) {
      return this.singletonStore;
    }

    if (!this.useStoreHook) {
      throw new Error('Could not create singleton store because no useStoreHook was defined.');
    }

    const newContainer = createContainer(this.useStoreHook);
    this.singletonStore = newContainer;

    return newContainer;
  }

  /**
   * Generates a random id.
   */
  generateId(): string
  {
    return v4();
  }
}


text:
import { emptyArray } from 'app/utils/empty';
import { count, weakMemoize } from 'app/utils/util';
import { BucketHashes } from 'data/d2/generated-enums';
import _ from 'lodash';
/**
 * Generic helpers for working with whole stores (character inventories) or lists of stores.
 */
import { DimItem } from './item-types';
import { D1Store, DimStore } from './store-types';

/**
 * Get whichever character was last played.
 */
export const getCurrentStore = <Store extends DimStore>(stores: Store[]) =>
  stores.find((s) => s.current);

/**
 * Get a store from a list by ID.
 */
export const getStore = <Store extends DimStore>(stores: Store[], id: string) =>
  stores.find((s) => s.id === id);

/**
 * Get the Vault from a list of stores.
 */
export const getVault = (stores: DimStore[]): DimStore | undefined => stores.find((s) => s.isVault);

/**
 * This is a memoized function that generates a map of items by their bucket
 * location. It could be a redux selector but I didn't want to have to thread it
 * through everywhere, so instead we do our own weak memoization to avoid
 * recalculation and memory leaks. The items by buckets used to be stored
 * directly on DimStore, but that violates the rules that allow Immer to work.
 * An alternative to this would be to have items stored in a map based on their
 * index and then have buckets reference items by index. This is slightly worse
 * than what we had before, because it recreates all buckets for the store whenever
 * the store changes for any reason.
 */
const itemsByBucket = weakMemoize((store: DimStore) =>
  _.groupBy(store.items, (i) => i.location.hash)
);

/**
 * Find items in a specific store bucket, taking into account that there may not be any in that bucket!
 */
export const findItemsByBucket = (store: DimStore, bucketId: number): DimItem[] =>
  itemsByBucket(store)[bucketId] ?? emptyArray();

/** Get the bonus power from the Seasonal Artifact */
export function getArtifactBonus(store: DimStore) {
  const artifact = findItemsByBucket(store, BucketHashes.SeasonalArtifact).find((i) => i.equipped);
  return artifact?.primaryStat?.value || 0;
}

/**
 * Get the total amount of this item in the store, across all stacks,
 * excluding stuff in the postmaster.
 */
export function amountOfItem(store: DimStore, item: { hash: number }) {
  return _.sumBy(store.items, (i) =>
    i.hash === item.hash && !i.location?.inPostmaster ? i.amount : 0
  );
}

/**
 * How much of items like this item can fit in this store? For
 * stackables, this is in stacks, not individual pieces.
 */
export function capacityForItem(store: DimStore, item: DimItem) {
  if (store.isVault) {
    const vaultBucket = item.bucket.vaultBucket;
    return vaultBucket ? vaultBucket.capacity : 0;
  }
  return item.bucket.capacity;
}

/**
 * How many *more* items like this item can fit in this store?
 * This takes into account stackables, so the answer will be in
 * terms of individual pieces.
 */
export function spaceLeftForItem(store: DimStore, item: DimItem, stores: DimStore[]) {
  return potentialSpaceLeftForItem(store, item, stores).guaranteed;
}

export interface SpaceLeft {
  /** The space definitely available. For stackables this is in individual pieces, not stacks. */
  guaranteed: number;
  /** Whether there's maybe a way space could be made for more than the guaranteed. */
  couldMakeSpace: boolean;
}

/**
 * Determine how much space there may be for an item being moved into a target
 * store - this figures out both how much open space there is, and whether we
 * could make space by moving things to the vault.
 */
export function potentialSpaceLeftForItem(
  store: DimStore,
  item: DimItem,
  stores: DimStore[]
): SpaceLeft {
  // Calculate how many full stacks (slots, where multiple items in a stack
  // count as 1) are occupied in the bucket this item would go into.
  let occupiedStacks = 0;
  if (store.isVault) {
    if (!item.bucket.vaultBucket) {
      return { guaranteed: 0, couldMakeSpace: false };
    }
    const vaultBucket = item.bucket.vaultBucket;
    // In the vault, all items are together in one big bucket, so we look at how much space that bucket has open
    occupiedStacks = item.bucket.vaultBucket
      ? count(store.items, (i) => Boolean(i.bucket.vaultBucket?.hash === vaultBucket.hash))
      : 0;
  } else {
    // Account-wide buckets (mods, etc) are only on the first character
    if (item.bucket.accountWide && !store.current) {
      return { guaranteed: 0, couldMakeSpace: false };
    }
    occupiedStacks = findItemsByBucket(store, item.bucket.hash).length;
  }

  // The open stacks are just however many you *could* fit, minus how many are occupied
  const openStacks = Math.max(0, capacityForItem(store, item) - occupiedStacks);

  // Some things can't have multiple stacks (unique stacks) and must be handled
  // specially. This only matters if they're not in the vault (pull from postmaster scenario)
  if (item.uniqueStack) {
    // If the item lives in an account-wide bucket (like modulus reports)
    // we need to check out how much space is left in that bucket, which is
    // only on the current store.
    const checkStore = item.bucket.accountWide && !store.isVault ? getCurrentStore(stores)! : store;
    const existingAmount = amountOfItem(checkStore, item);
    if (existingAmount === 0) {
      // This is the first stack. If we have no open stacks, we don't have space, but could make more space
      // by moving other items from that bucket to the vault. Otherwise, the only way to circumvent
      // the uniqueStack rule is to move the items themselves to a different bucket.
      return openStacks > 0
        ? { guaranteed: item.maxStackSize, couldMakeSpace: !item.notransfer }
        : { guaranteed: 0, couldMakeSpace: Boolean(item.bucket.vaultBucket) };
    } else {
      // We have a stack, so we can fill that stack up, and may be able to store even more
      // by moving the items themselves to a different bucket.
      return {
        guaranteed: Math.max(item.maxStackSize - existingAmount, 0),
        couldMakeSpace: !item.notransfer,
      };
    }
  }

  // Convert back from stacks to individual items, keeping in mind that we may
  // be able to move some amount into an existing stack.
  const maxStackSize = item.maxStackSize || 1;
  if (maxStackSize === 1) {
    // Stacks and individual items are the same, no conversion required
    return { guaranteed: openStacks, couldMakeSpace: Boolean(item.bucket.vaultBucket) };
  } else {
    // Get the existing amount in individual pieces, not stacks
    let existingAmount = amountOfItem(store, item);
    // This helps us figure out the remainder that gets added back in from a
    // partial stack - it'll end up negative, and when subtracted from the open
    // stacks' worth, it will *add* in the remainder.
    while (existingAmount > 0) {
      existingAmount -= maxStackSize;
    }
    return {
      guaranteed: Math.max(openStacks * maxStackSize - existingAmount, 0),
      couldMakeSpace: Boolean(item.bucket.vaultBucket),
    };
  }
}

/**
 * Is this store a Destiny 1 store? Use this when you want the store to
 * automatically be typed as D1 store in the "true" branch of a conditional.
 * Otherwise you can just check "destinyVersion === 1".
 */
export function isD1Store(store: DimStore): store is D1Store {
  return store.destinyVersion === 1;
}


text:
package formjsonschema

type ErrorType string

const ErrorTypeFalse = ErrorType("false")
const ErrorTypeRequired = ErrorType("required")
const ErrorTypeInvalidType = ErrorType("invalid_type")
const ErrorTypeNumberAnyOf = ErrorType("number_any_of")
const ErrorTypeNumberOneOf = ErrorType("number_one_of")
const ErrorTypeNumberAllOf = ErrorType("number_all_of")
const ErrorTypeNumberNot = ErrorType("number_not")
const ErrorTypeMissing_dependency = ErrorType("missing_dependency")
const ErrorTypeInternal = ErrorType("internal")
const ErrorTypeConst = ErrorType("const")
const ErrorTypeEnum = ErrorType("enum")
const ErrorTypeArrayNoAdditionalItems = ErrorType("array_no_additional_items")
const ErrorTypeArrayMinItems = ErrorType("array_min_items")
const ErrorTypeArrayMaxItems = ErrorType("array_max_items")
const ErrorTypeUnique = ErrorType("unique")
const ErrorTypeContains = ErrorType("contains")
const ErrorTypeArrayMinProperties = ErrorType("array_min_properties")
const ErrorTypeArrayMaxProperties = ErrorType("array_max_properties")
const ErrorTypeAdditionalPropertyNotAllowed = ErrorType("additional_property_not_allowed")
const ErrorTypeInvalidPropertyPattern = ErrorType("invalid_property_pattern")
const ErrorTypeInvalidPropertyName = ErrorType("invalid_property_name")
const ErrorTypeStringGte = ErrorType("string_gte")
const ErrorTypeStringLte = ErrorType("string_lte")
const ErrorTypePattern = ErrorType("pattern")
const ErrorTypeFormat = ErrorType("format")
const ErrorTypeMultipleOf = ErrorType("multiple_of")
const ErrorTypeNumberGte = ErrorType("number_gte")
const ErrorTypeNumberGt = ErrorType("number_gt")
const ErrorTypeNumberLte = ErrorType("number_lte")
const ErrorTypeNumberLt = ErrorType("number_lt")
const ErrorTypeConditionThen = ErrorType("condition_then")
const ErrorTypeConditionElse = ErrorType("condition_else")

var MessageFalse = "False always fails validation"
var MessageRequired = "{{.property}} is required"
var MessageInvalidType = "Invalid type. Expected: {{.expected}}, given: {{.given}}"
var MessageNumberAnyOf = "Must validate at least one schema (anyOf)"
var MessageNumberOneOf = "Must validate one and only one schema (oneOf)"
var MessageNumberAllOf = "Must validate all the schemas (allOf)"
var MessageNumberNot = "Must not validate the schema (not)"
var MessageMissingDependency = "Has a dependency on {{.dependency}}"
var MessageInternal = "Internal Error {{.error}}"
var MessageConst = "{{.field}} does not match: {{.allowed}}"
var MessageEnum = "{{.field}} must be one of the following: {{.allowed}}"
var MessageArrayNoAdditionalItems = "No additional items allowed on array"
var MessageArrayNotEnoughItems = "Array must have at least {{.min}} items"
var MessageArrayMaxItems = "Array must have at most {{.max}} items"
var MessageUnique = "{{.type}} items[{{.i}},{{.j}}] must be unique"
var MessageArrayContains = "At least one of the items must match"
var MessageArrayMinProperties = "Must have at least {{.min}} properties"
var MessageArrayMaxProperties = "Must have at most {{.max}} properties"
var MessageAdditionalPropertyNotAllowed = "Additional property {{.property}} is not allowed"
var MessageInvalidPropertyPattern = `Property "{{.property}}" does not match pattern {{.pattern}}`
var MessageInvalidPropertyName = `Property name of "{{.property}}" does not match`
var MessageStringGTE = "String length must be greater than or equal to {{.min}}"
var MessageStringLTE = "String length must be less than or equal to {{.max}}"
var MessageDoesNotMatchPattern = `Does not match pattern '{{.pattern}}'`
var MessageDoesNotMatchFormat = `Does not match format '{{.format}}'`
var MessageMultipleOf = `Must be a multiple of {{.multiple}}`
var MessageNumberGTE = "Must be greater than {{.min}}"
var MessageNumberLTE = "Must be less than or equal to {{.max}}"
var MessageNumberLT = `Must be less than {{.max}}`
var MessageRegexPattern = `Invalid regex pattern '{{.pattern}}'`
var MessageGreaterThanZero = `{{.number}} must be strictly greater than 0`
var MessageMustBeOfA = `{{.x}} must be of an {{.y}}`
var MessageMustBeOfAn = `{{.x}} must be of an {{.y}}`
var MessageCannotBeUsedWithout = `{{.x}} cannot be used without {{.y}}`
var MessageCannotBeGT = `{{.x}} cannot be greater than {{.y}}`
var MessageMustBeOfType = `{{.key}} must be of type {{.type}}`
var MessageMustBeValidRegex = `{{.key}} must be a valid regex`
var MessageMustBeValidFormat = `{{.key}} must be a valid format {{.given}}`
var MessageMustBeGTEZero = `{{.key}} must be greater than or equal to 0`
var MessageKeyCannotBeGreaterThan = `{{.key}} cannot be greater than {{.y}}`
var MessageKeyItemsMustBeOfType = `{{.key}} items must be {{.type}}`
var MessageKeyItemsMustBeUnique = `{{.key}} items must be unique`
var MessageReferenceMustBeCanonical = `Reference {{.reference}} must be canonical`
var MessageNotAValidType = `has a primitive type that is NOT VALID -- given: {{.given}} Expected valid values are:{{.expected}}`
var MessageDuplicated = `{{.type}} type is duplicated`
var MessageHttpBadStatus = `Could not read schema from HTTP, response status is {{.status}}`
var MessageErrorFormat = `{{.field}}: {{.description}}`
var MessageParseError = `Expected: {{.expected}}, given: Invalid JSON`
var MessageConditionThen = `Must validate "then" as "if" was valid`
var MessageConditionElse = `Must validate "else" as "if" was not valid`


text:
import re
import fileinput
import os.path

def int_ruby_style(string):
  """parse a string into an integer like String#to_s on Ruby"""
  try:
    return int( string.replace( '_', '' ) )
  except ValueError:
    return 0

def warn_file_format( out, line, file_name, line_no ):
  print >>out, "Invalid line: {0!r} at {1}: {2}".format(
    line, file_name, line_no )

try:
  import android
except ImportError:
  by_android = False
else:
  by_android = True
  droid = android.Android()

#input/output
if by_android:
  import StringIO
  result_out = StringIO.StringIO(u'')

  # choose files to calculate
  import glob
  money_dir = '/mnt/sdcard/My/money/'
  default_pattern = '[0-9][0-9]-[0-9][0-9].txt'
  default_file = os.path.basename( max( glob.glob( money_dir + default_pattern ) ) )
  file_pattern = droid.dialogGetInput('ARGV:', 'Enter file pattern.', default_file ).result
  file_list = glob.glob( money_dir + file_pattern )

else:
  import sys
  result_out = sys.stdout
  file_list = sys.argv[1:]

#to parse content of a file
comment_re = re.compile( r'^\s*#' )
sep        = re.compile( r' {2,}|\t' )

#to output a result
sums_by_categories = dict()
income             = 0
expense            = 0

utf8_hook = fileinput.hook_encoded("utf-8")
for line in fileinput.input( file_list, openhook=utf8_hook ):
  if comment_re.match( line ): continue

  columns = sep.split( line.rstrip("\n") )
  try:
    price_str = columns[2]
    price     = int_ruby_style( price_str )
    category  = columns[3] if len( columns ) >= 4 else ''
    file_name = fileinput.filename()
    line_no   = fileinput.filelineno()
  except IndexError, ValueError:
    warn_file_format( result_out, line, file_name, line_no )
    continue

  if price <= 0:
    warn_file_format( result_out, line, file_name, line_no )

  if price_str.startswith('+'):
    income += price
  else:
    sums_by_categories[ category ] = \
        sums_by_categories.get( category, 0 ) + price
    expense += price

total_str = str( income - expense )

#To format the result
income_str    = str( income )
expense_str   = str( expense )
income_digit  = len( income_str )
expense_digit = len( expense_str )
digit = expense_digit if expense_digit > income_digit else income_digit
JP_TOKEN = re.compile(u"[一-龠]|[ぁ-ん]|[ァ-ヴ]")
def format_result_line( category, price ):
  #日本語の文字数分だけ寄せる幅が減る。
  #(日本語1文字毎に1つ余計にスペースを使うので)
  width = 10 - len( JP_TOKEN.findall( category ) )
  return u"{0:<{1}}{2:>{3}}".format( category, width, price, digit )

sorted_categories = sorted( sums_by_categories.keys(),
    key=lambda category: sums_by_categories[ category ] )
for category in sorted_categories:
  print >>result_out, \
    format_result_line( category, sums_by_categories[ category ] )

print >>result_out, format_result_line( u"支出", expense_str )
if income > 0:
  print >>result_out, format_result_line( u"収入", income_str )
  print >>result_out, format_result_line( u"合計", total_str )

if by_android:
  droid.dialogCreateAlert(
    " ".join(
        map( os.path.basename, file_list ) ),
    result_out.getvalue()
  )
  droid.dialogSetPositiveButtonText('OK')
  droid.dialogShow()
  result_out.close()


text:
/** Handle the creation of HTML links to documented symbols.
	@constructor
*/
function Link() {
	this.alias = "";
	this.src = "";
	this.file = "";
	this.text = "";
	this.innerName = "";
	this.classLink = false;
	this.targetName = "";

	this.target = function(targetName) {
		if (defined(targetName)) this.targetName = targetName;
		return this;
	}
	this.inner = function(inner) {
		if (defined(inner)) this.innerName = inner;
		return this;
	}
	this.withText = function(text) {
		if (defined(text)) this.text = text;
		return this;
	}
	this.toSrc = function(filename) {
		if (defined(filename)) this.src = filename;
		return this;
	}
	this.toSymbol = function(alias) {
		if (defined(alias)) this.alias = new String(alias);
		return this;
	}
	this.toClass = function(alias) {
		this.classLink = true;
		return this.toSymbol(alias);
	}
	this.toFile = function(file) {
		if (defined(file)) this.file = file;
		return this;
	}

	this.toString = function() {
		var linkString;
		var thisLink = this;

		if (this.alias) {
			linkString = this.alias.replace(/(^|[^a-z$0-9_#.:^-])([|a-z$0-9_#.:^-]+)($|[^a-z$0-9_#.:^-])/i,
				function(match, prematch, symbolName, postmatch) {
					var symbolNames = symbolName.split("|");
					var links = [];
					for (var i = 0, l = symbolNames.length; i < l; i++) {
						thisLink.alias = symbolNames[i];
						links.push(thisLink._makeSymbolLink(symbolNames[i]));
					}
					return prematch+links.join("|")+postmatch;
				}
			);
		}
		else if (this.src) {
			linkString = thisLink._makeSrcLink(this.src);
		}
		else if (this.file) {
			linkString = thisLink._makeFileLink(this.file);
		}

		return linkString;
	}
}

/** prefixed for hashes */
Link.hashPrefix = "";

/** Appended to the front of relative link paths. */
Link.base = "";

Link.symbolNameToLinkName = function(symbol) {
	var linker = "";
	if (symbol.isStatic) linker = ".";
	else if (symbol.isInner) linker = "-";

	return Link.hashPrefix+linker+symbol.name;
}

/** Create a link to another symbol. */
Link.prototype._makeSymbolLink = function(alias) {
	var linkBase = Link.base+publish.conf.symbolsDir;
	var linkTo = Link.symbolSet.getSymbol(alias);
	var linkPath;
	var target = (this.targetName)? " target=\""+this.targetName+"\"" : "";

	// is it an internal link?
	if (alias.charAt(0) == "#") var linkPath = alias;

	// if there is no symbol by that name just return the name unaltered
	else if (!linkTo) return this.text || alias;

	// it's a symbol in another file
	else {
		if (!linkTo.is("CONSTRUCTOR") && !linkTo.isNamespace) { // it's a method or property
			if (linkTo.isEvent) {
				linkPath =
					(Link.filemap)? Link.filemap[linkTo.memberOf]
					:
					escape(linkTo.memberOf) || "_global_";
				linkPath += publish.conf.ext + "#event:" + Link.symbolNameToLinkName(linkTo);
			}
			else {
				linkPath =
					(Link.filemap)? Link.filemap[linkTo.memberOf]
					:
					escape(linkTo.memberOf) || "_global_";
				linkPath += publish.conf.ext + "#" + Link.symbolNameToLinkName(linkTo);
			}
		}
		else {
			linkPath = (Link.filemap)? Link.filemap[linkTo.alias] : escape(linkTo.alias);
			linkPath += publish.conf.ext;// + (this.classLink? "":"#" + Link.hashPrefix + "constructor");
		}
		linkPath = linkBase + linkPath
	}

	var linkText = this.text || alias;

	var link = {linkPath: linkPath, linkText: linkText, linkInner: (this.innerName? "#"+this.innerName : "")};

	if (typeof JSDOC.PluginManager != "undefined") {
		JSDOC.PluginManager.run("onSymbolLink", link);
	}

	return ""+link.linkText+"";
}

/** Create a link to a source file. */
Link.prototype._makeSrcLink = function(srcFilePath) {
	var target = (this.targetName)? " target=\""+this.targetName+"\"" : "";

	// transform filepath into a filename
	var srcFile = srcFilePath.replace(/\.\.?[\\\/]/g, "").replace(/[:\\\/]/g, "_");
	var outFilePath = Link.base + publish.conf.srcDir + srcFile + publish.conf.ext;

	if (!this.text) this.text = FilePath.fileName(srcFilePath);
	return ""+this.text+"";
}

/** Create a link to a source file. */
Link.prototype._makeFileLink = function(filePath) {
	var target = (this.targetName)? " target=\""+this.targetName+"\"" : "";

	var outFilePath =  Link.base + filePath;

	if (!this.text) this.text = filePath;
	return ""+this.text+"";
}


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

public class BrickGenerator : MonoBehaviour
{

    public GameObject brick;

    public GameObject StartPosition;

    public int Count = 30;

    private Vector3 initialPositionOffset = new Vector3(0.005f, 0, 0);

    public void GenerateBricks()
    {
        var startPos = StartPosition.transform.position;
        var initialPosition = startPos + initialPositionOffset;
        GameObject StartObj = Instantiate(brick, initialPosition, Quaternion.identity);
        StartObj.name = "StartObj";

        for (int index = 1; index < Count; index++)
        {
            Instantiate(brick, startPos + Vector3.left * index, Quaternion.identity);
        }
    }
}


text:
[![Build Status](https://img.shields.io/travis/zircote/swagger-php/master.svg?style=flat-square)](https://travis-ci.org/zircote/swagger-php)
[![Total Downloads](https://img.shields.io/packagist/dt/zircote/swagger-php.svg?style=flat-square)](https://packagist.org/packages/zircote/swagger-php)
[![License](https://img.shields.io/badge/license-Apache-blue.svg?style=flat-square)](LICENSE-2.0.txt)

# swagger-php

Generate interactive [Swagger](http://swagger.io) documentation for your RESTful API using [doctrine annotations](http://doctrine-common.readthedocs.org/en/latest/reference/annotations.html).

## Features

 - Compatible with the Swagger 2.0 specification.
 - Exceptional error reporting (with hints, context)
 - Extracts information from code & existing phpdoc annotations.
 - Command-line interface available.

## Installation (with [Composer](https://getcomposer.org))

```sh
composer require zircote/swagger-php
```

For cli usage from anywhere install swagger-php globally and make sure to place the `~/.composer/vendor/bin` directory in your PATH so the `swagger` executable can be located by your system.

```sh
composer global require zircote/swagger-php
```

## Usage

Add annotations to your php files.
```php
/**
 * @SWG\Info(title="My First API", version="0.1")
 */

/**
 * @SWG\Get(
 *     path="/api/resource.json",
 *     @SWG\Response(response="200", description="An example resource")
 * )
 */
```
See the Examples directory for more.

### Usage from php

Generate always-up-to-date the swagger documentation dynamically.

```php
<?php
require("vendor/autoload.php");
$swagger = \Swagger\scan('/path/to/project');
header('Content-Type: application/json');
echo $swagger;
```
### Usage from the Command Line Interface

Generate the swagger documentation to a static json file.

```sh
./vendor/bin/swagger --help
```

### Usage from the Deserializer

Generate the swagger annotation object from a json string, which makes it easier to manipulate swagger object programmatically.

```php
<?php

use Swagger\Serializer;

$serializer = new Serializer();
$swagger = $serializer->deserialize($jsonString, 'Swagger\Annotations\Swagger');
echo $swagger;
```

## More on Swagger

  * http://swagger.io/
  * https://github.com/swagger-api/swagger-spec/
  * http://bfanger.github.io/swagger-explained/

## Contributing

Feel free to submit [Github Issues](https://github.com/zircote/swagger-php/issues)
or pull requests.

The documentation website resides within the `gh-pages` branch.

Make sure pull requests pass [PHPUnit](https://phpunit.de/)
and [PHP_CodeSniffer](https://github.com/cakephp/cakephp-codesniffer) (PSR-2) tests.

Running tests can be done with this command in the root of the project:

```bash
./bin/phpunit
```

To run the phpcs tests on your local machine execute:

```bash
./bin/phpcs -p --extensions=php --standard=PSR2 --error-severity=1 --warning-severity=0 ./src ./tests
```

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/zircote/swagger-php/trend.png)](https://bitdeli.com/free "Bitdeli Badge")


text:
/**
 *
 * @author greg (at) myrobotlab.org
 *
 * This file is part of MyRobotLab (http://myrobotlab.org).
 *
 * MyRobotLab is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version (subject to the "Classpath" exception
 * as provided in the LICENSE.txt file that accompanied this code).
 *
 * MyRobotLab is distributed in the hope that it will be useful or fun,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * All libraries in thirdParty bundle are subject to their own license
 * requirements - please refer to http://myrobotlab.org/libraries for
 * details.
 *
 * Enjoy !
 *
 * */

package org.myrobotlab.service;

import java.util.ArrayList;

import org.myrobotlab.framework.Peers;
import org.myrobotlab.framework.Service;
import org.myrobotlab.framework.StopWatch;
import org.myrobotlab.logging.Level;
import org.myrobotlab.logging.LoggerFactory;
import org.myrobotlab.logging.LoggingFactory;
import org.slf4j.Logger;

public class TestCatcher extends Service {

	private static final long serialVersionUID = 1L;
	public final static Logger log = LoggerFactory.getLogger(TestCatcher.class.getCanonicalName());
	public ArrayList<Integer> catchList = new ArrayList<Integer>();
	public ArrayList<Integer> lowCatchList = new ArrayList<Integer>();
	public ArrayList<String> stringCatchList = new ArrayList<String>();
	public String data = null;

	// static in Java are not overloaded but overwritten - there is no polymorphism for statics
	public static Peers getPeers(String name)
	{
		Peers peers = new Peers(name);
		peers.put("testThrower", "TestThrower", "a test peer thrower");
		return peers;
	}

	public TestCatcher(String n) {
		super(n);
	}

	public void catchNothing() {
		data = "***CATCH*** catchNothing ";
		log.info("***CATCH*** catchNothing ");
		Integer c = 1;
		synchronized (catchList) {
			catchList.add(c);
			catchList.notify();
		}

		broadcastState();

	}

	public Object returnNull() {
		return null;
	}

	public Integer catchInteger(Integer count) {
		log.info("***CATCH*** catchInteger " + count);
		synchronized (catchList) {
			catchList.add(count);
			catchList.notify();
		}
		return count;
	}

	public Integer lowCatchInteger(Integer count) {
		log.info("***CATCH*** lowCatchInteger " + count);
		synchronized (lowCatchList) {
			lowCatchList.add(count);
			lowCatchList.notify();
		}
		return count;

	}

	public Integer bothHandsCatchInteger(Integer firstBall, Integer secondBall) {
		log.info("***CATCH*** bothHandsCatchInteger " + firstBall + "," + secondBall);
		log.info("catchList.size={}",catchList.size());

		synchronized (catchList) {
			catchList.add(firstBall);
			catchList.add(secondBall);
			catchList.notify();
		}

		log.info("bothHandsCatchInteger " + firstBall + "," + secondBall);
		log.info("bothHandsCatchInteger size " + catchList.size());

		return catchList.size();
	}

	public Integer twoHandedPrimitiveCatchInt(int firstBall, int secondBall) {
		log.info("***CATCH*** twoHandedPrimitiveCatchInt " + firstBall + "," + secondBall);
		synchronized (catchList) {
			catchList.add(firstBall);
			catchList.add(secondBall);
			catchList.notify();
		}
		return lowCatchList.size();

	}

	public Integer throwBack(Integer count) {
		log.info("throwBack " + count);
		return count;
	}

	public String catchString(String data) {
		log.info("***CATCH*** string " + data);
		stringCatchList.add(data);
		return data;
	}

	public int waitForCatches(int numberOfCatches, int maxWaitTimeMilli) {
		log.info(getName() + ".waitForCatches waiting for " + numberOfCatches + " currently " + catchList.size());

		StopWatch stopwatch = new StopWatch();
		synchronized (catchList) {
			if (catchList.size() < numberOfCatches) {
				try {
					stopwatch.start(); // starting clock
					while (catchList.size() < numberOfCatches) {
						catchList.wait(maxWaitTimeMilli); // wait up to the max
															// time
						stopwatch.end(); // sample time -
						if (stopwatch.elapsedMillis() > maxWaitTimeMilli) {
							log.error("waited for " + maxWaitTimeMilli + "ms and still only " + catchList.size() + " out of " + numberOfCatches);
							return catchList.size();
						}
					}

					log.info("caught " + catchList.size() + " out of " + numberOfCatches);
					return numberOfCatches;

				} catch (InterruptedException e) {
					log.error("waitForCatches " + numberOfCatches + " interrupted");
					// logException(e); - removed for Android
				}
			}
		}
		return catchList.size();
	}

	public int waitForStringCatches(int numberOfCatches, int maxWaitTimeMilli) {
		log.info(getName() + ".waitForCatches waiting for " + numberOfCatches + " currently " + stringCatchList.size());

		StopWatch stopwatch = new StopWatch();
		synchronized (stringCatchList) {
			if (stringCatchList.size() < numberOfCatches) {
				try {
					stopwatch.start(); // starting clock
					while (stringCatchList.size() < numberOfCatches) {
						stringCatchList.wait(maxWaitTimeMilli); // wait up to
																// the max time
						stopwatch.end(); // sample time -
						if (stopwatch.elapsedMillis() > maxWaitTimeMilli) {
							log.error("waited for " + maxWaitTimeMilli + "ms and still only " + stringCatchList.size() + " out of " + numberOfCatches);
							return stringCatchList.size();
						}
					}

					log.info("caught " + stringCatchList.size() + " out of " + numberOfCatches);
					return numberOfCatches;

				} catch (InterruptedException e) {
					log.error("waitForCatches " + numberOfCatches + " interrupted");
					// logException(e); - removed for Android
				}
			}
		}
		return stringCatchList.size();
	}

	public void waitForLowCatches(int numberOfCatches, int maxWaitTimeMilli) {
		log.info(getName() + ".waitForLowCatches waiting for " + numberOfCatches + " currently " + lowCatchList.size());
		synchronized (lowCatchList) {
			while (lowCatchList.size() < numberOfCatches) {
				try {
					lowCatchList.wait(maxWaitTimeMilli);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					log.error("testObject1List " + numberOfCatches + " interrupted");
					// logException(e);
				}
			}
		}

	}

	@Override
	public String getDescription() {
		return "<html>service for junit tests</html>";
	}

	public static void main(String[] args) {
		LoggingFactory.getInstance().configure();
		LoggingFactory.getInstance().setLevel(Level.DEBUG);

		TestCatcher catcher01 = new TestCatcher("catcher01");
		catcher01.startService();

		TestThrower thrower = new TestThrower("thrower");
		thrower.startService();

		catcher01.subscribe("throwInteger", thrower.getName(), "catchInteger", Integer.class);

		for (int i = 0; i < 1000; ++i)
		{
			thrower.invoke("throwInteger", i);
			if (i%100 == 0)
			{
				thrower.sendBlocking(catcher01.getName(), "catchInteger");
			}
		}

		//thrower.throwInteger(count);

	}
}


text:
using JetBrains.Annotations;

namespace AldursLab.WurmAssistant3.Areas.Triggers.Factories
{
    [KernelBind(BindingHint.FactoryProxy), UsedImplicitly]
    public interface IActiveTriggersFactory
    {
        ActiveTriggers CreateActiveTriggers(string characterName);
    }
}


text:
namespace aim {
namespace utils {
}
}