text:
[![Release](https://img.shields.io/github/release/ethauvin/httpstatus.svg)](https://github.com/ethauvin/httpstatus/releases/latest) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik.httpstatus/httpstatus.svg?label=maven%20central)](https://search.maven.org/search?q=g:%22net.thauvin.erik.httpstatus%22%20AND%20a:%22httpstatus%22)
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/httpstatus/badge.svg?targetFile=build.gradle)](https://snyk.io/test/github/ethauvin/httpstatus?targetFile=build.gradle) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_HttpStatus&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_HttpStatus)
[![Build Status](https://travis-ci.com/ethauvin/HttpStatus.svg?branch=master)](https://travis-ci.com/ethauvin/HttpStatus) [![Build status](https://ci.appveyor.com/api/projects/status/w5j4kul3w2rkigxb?svg=true)](https://ci.appveyor.com/project/ethauvin/httpstatus) [![CircleCI](https://circleci.com/gh/ethauvin/HttpStatus/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/HttpStatus/tree/master)

A simple [JSP](http://www.oracle.com/technetwork/java/javaee/jsp/index.html) Tag Library to display the [code](#hscode), [reason](#hsreason), [cause](#hscode) and/or [message](#hsmessage) for [HTTP status codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) in JSP error pages.

For example:

```jsp
<%@ page isErrorPage="true" %>
<%@ taglib prefix="hs" uri="http://erik.thauvin.net/taglibs/httpstatus" %>
<html><head>
<title><hs:code/> <hs:reason default="Server Error"/></title>
</head>
<h1><hs:reason default="Server Error"/></h1>
Cause: <pre><hs:cause default="Unable to complete your request."/></pre>
Message: <pre><hs:message default="A server error has occured."/></pre>
...
```

or

```jsp
<%@ page isErrorPage="true" import="net.thauvin.erik.httpstatus.Reasons" %>
<%= Reasons.getReasonPhrase(pageContext.getErrorData().getStatusCode()) %>
```

would display on a [501 status code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2):

    Not Implemented

## hs:cause

The `<hs:cause/>` tag displays the cause of current HTTP status code, if any. A shorthand for:

```jsp
<%= pageContext.getErrorData().getThrowable().getCause().getLocalizedMessage() %>
```

Optional attributes are:

Attribute   | Description
----------- | -------------------------------------------------------------------------------------------
`default`   | The fallback value to output, if no cause is available.
`escapeXml` | Converts <, >, &, ', " to their corresponding [entity codes](http://dev.w3.org/html5/html-author/charref). Value is `true` by default.

## hs:code
The `<hs:code/>` tag displays the current HTTP status code, if any. A shorthand for:

```jsp
<%= pageContext.getErrorData().getStatusCode() %>
```

## hs:message

The `<hs:message/>` tag displays the current error message, if any. A shorthand for:

```jsp
<%= request.getAttribute("javax.servlet.error.message") %>
```

Optional attributes are:

Attribute   | Description
----------- | -------------------------------------------------------------------------------------------
`default`   | The fallback value to output, if no error message is available.
`escapeXml` | Converts <, >, &, ', " to their corresponding [entity codes](http://dev.w3.org/html5/html-author/charref). Value is `true` by default.

## hs:reason

The `<hs:reason/>` tag displays the reason for a HTTP status code, if any. Optional attributes are:

Attribute   | Description
----------- | -------------------------------------------------------------------------------------------
`code`      | The HTTP status error code. If not specified the current status code is used.
`default`   | The fallback value to output, if no reason is available.
`escapeXml` | Converts <, >, &, ', " to their corresponding [entity codes](http://dev.w3.org/html5/html-author/charref). Value is `true` by default.

The reasons are defined in a [ResourceBundle](http://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html) properties as follows:

Status Code | Reason
----------- | -----------------------------------
`100`       | Continue
`101`       | Switching Protocols
`102`       | Processing
`103`       | Early Hints
`200`       | OK
`201`       | Created
`202`       | Accepted
`203`       | Non-Authoritative Information
`204`       | No Content
`205`       | Reset Content
`206`       | Partial Content
`207`       | Multi-Status
`208`       | Already Reported
`218`       | This is fine
`226`       | IM Used
`300`       | Multiple Choices
`301`       | Moved Permanently
`302`       | Found/Moved Temporarily
`303`       | See Other
`304`       | Not Modified
`305`       | Use Proxy
`306`       | Switch Proxy
`307`       | Temporary Redirect
`308`       | Permanent Redirect
`400`       | Bad Request
`401`       | Unauthorized
`402`       | Payment Required
`403`       | Forbidden
`404`       | Not Found
`405`       | Method Not Allowed
`406`       | Not Acceptable
`407`       | Proxy Authentication Required
`408`       | Request Timeout
`409`       | Conflict
`410`       | Gone
`411`       | Length Required
`412`       | Precondition Failed
`413`       | Request Entity/Payload Too Large
`414`       | Request-URI Too Long
`415`       | Unsupported Media Type
`416`       | Requested Range Not Satisfiable
`417`       | Expectation Failed
`418`       | I'm A Teapot
`419`       | Insufficient Space on Resource
`420`       | Method Failure
`421`       | Misdirected Request
`422`       | Unprocessable Entity
`423`       | Locked
`424`       | Failed Dependency
`426`       | Upgrade Required
`428`       | Precondition Required
`429`       | Too Many Requests
`430`       | Request Header Fields Too Large
`431`       | Request Header Fields Too Large
`440`       | Login Timeout
`444`       | No Response
`449`       | Retry With
`450`       | Blocked by Windows Parental Controls
`451`       | Unavailable For Legal Reasons
`460`       | Client Closed Connection Before Load Balancer Idle Timeout
`463`       | X-Forwarded-For Header with More than 30 IP Addresses
`494`       | Request Header Too Large
`495`       | SSL Certificate Error
`496`       | No SSL Certificate
`497`       | HTTP Request Sent to HTTPS Port
`498`       | Token Expired/Invalid
`499`       | Client Closed Request
`500`       | Internal Server Error
`501`       | Not Implemented
`502`       | Bad Gateway
`503`       | Service Unavailable
`504`       | Gateway Timeout
`505`       | HTTP Version Not Supported
`506`       | Variant Also Negotiates
`507`       | Insufficient Storage
`508`       | Loop Detected
`509`       | Bandwidth Limit Exceeded
`510`       | Not Extended
`511`       | Network Authentication Required
`520`       | Unknown Error
`521`       | Web Server Is Down
`522`       | Origin Connection Time-out
`523`       | Origin Is Unreachable
`524`       | A Timeout Occurred
`525`       | SSL Handshake Failed
`526`       | Invalid SSL Certificate
`527`       | Railgun Error
`529`       | Site is overloaded
`530`       | Site is frozen
`598`       | Network Read Timeout Error
`599`       | Network Connect Timeout Error

## Usage with [Gradle](https://gradle.org/) or [Maven](http://maven.apache.org/)
Include the following in your `build.gradle` file:

```gradle
dependencies {
    implementation 'net.thauvin.erik.httpstatus:httpstatus:1.0.5'
}
```

or as a Maven artifact:

```xml
<dependency>
    <groupId>net.thauvin.erik.httpstatus</groupId>
    <artifactId>httpstatus</artifactId>
    <version>1.0.5</version>
</dependency>
```

## Command Line Usage
You can query the reason phrase for status codes as follows:

```sh
$ java -jar httpstatus-1.0.5.jar 404 500
404: Not Found
500: Internal Server Error
```

If no status code is specified, all will be printed:

```sh
$ java -jar httpstatus-1.0.5.jar
100: Continue
101: Switching Protocols
102: Processing
103: Early Hints
200: OK
201: Created
202: Accepted
203: Non-Authoritative Information
204: No Content
205: Reset Content
206: Partial Content
207: Multi-Status
208: Already Reported
226: IM Used
...
```


text:
package yaml

import (
	"github.com/kkserver/kk-direct/direct"
)

type Direct struct {
	direct.Direct
	app direct.IApp
}

func (D *Direct) Exec(ctx direct.IContext) error {

	if D.app == nil {
		app, err := Load(D.Options().Name())
		if err != nil {
			return err
		}
		app.Each(func(name string, value direct.IDirect) bool {
			v, ok := value.(*direct.Outlet)
			if ok {
				v.On = func(ctx direct.IContext) error {
					return D.Done(ctx, name)
				}
			}
			return true
		})
		D.app = app
	}

	if D.app != nil {
		return D.app.Exec(ctx)
	}

	return nil
}

redpajama_set_name: RedPajamaGithub


text:
KintoneSync::Engine.routes.draw do
  root :to => 'dashboard#index'
end


text:
* Fix #283
* Suppress global leak for istanbul
* Fix growl reporter to work with `testacular run`
* Upgrade jasmine to 1.3.1
* Fix file sorting
* Fix #265
* Support for more mime-types on served static files
* Fix opening Chrome on Windows
* Upgrade growly to 1.1.0

### v0.5.7
* Support code coverage for qunit.
* Rename port-runner option in cli to runner-port
* Fix proxy handler (when no proxy defined)
* Fix #65

### v0.5.6
* Growl reporter !
* Batch changes (eg. `git checkout` causes only single run now)
* Handle uncaught errors and disconnect all browsers
* Global binary prefers local versions

### v0.5.5
* Add QUnit adapter
* Report console.log()

### v0.5.4
* Fix PhantomJS launcher
* Fix html2js preprocessor
* NG scenario adapter: show html output

### v0.5.3
* Add code coverage !

### v0.5.2
* Init: ask about using Require.js

### v0.5.1
* Support for Require.js
* Fix testacular init basePath

### v0.5.0
* Add preprocessor for LiveScript
* Fix JUnit reporter
* Enable process global in config file
* Add OS name in the browser name
* NG scenario adapter: hide other outputs to make it faster
* Allow config to be written in CoffeeScript
* Allow espaced characters in served urls

### v0.4.0 (stable)

### v0.3.12
* Allow calling run() pragmatically from JS

### v0.3.11
* Fix runner to wait for stdout, stderr
* Make routing proxy always changeOrigin

### v0.3.10
* Fix angular-scenario adapter + junit reporter
* Use flash socket if web socket not available

### v0.3.9
* Retry starting a browser if it does not capture
* Update mocha to 1.5.0
* Handle mocha's xit

### v0.3.8
* Kill browsers that don't capture in captureTimeout ms
* Abort build if any browser fails to capture
* Allow multiple profiles of Firefox

### v0.3.7
* Remove Travis hack
* Fix Safari launcher

### v0.3.6
* Remove custom launcher (constructor)
* Launcher - use random id to allow multiple instances of the same browser
* Fix Firefox launcher (creating profile)
* Fix killing browsers on Linux and Windows

### v0.3.5
* Fix opera launcher to create new prefs with disabling all pop-ups

### v0.3.4
* Change "reporter" config to "reporters"
* Allow multiple reporters
* Fix angular-scenario adapter to report proper description
* Add JUnit xml reporter
* Fix loading files from multiple drives on Windows
* Fix angular-scenario adapter to report total number of tests

### v0.3.3
* Allow proxying files, not only directories

### v0.3.2
* Disable autoWatch if singleRun
* Add custom script browser launcher
* Fix cleaning temp folders

### v0.3.1
* Run tests on start (if watching enabled)
* Add launcher for IE8, IE9

### v0.3.0
* Change browser binaries on linux to relative
* Add report-slower-than to CLI options
* Fix PhantomJS binary on Travis CI

### v0.2.0 (stable)

### v0.1.3
* Launch Canary with crankshaft disabled
* Make the captured page nicer

### v0.1.2
* Fix jasmine memory leaks
* support __filename and __dirname in config files

### v0.1.1
* Report slow tests (add `reportSlowerThan` config option)
* Report time in minutes if it's over 60 seconds
* Mocha adapter: add ability to fail during beforeEach/afterEach hooks
* Mocha adapter: add dump()
* NG scenario adapter: failure includes step name
* Redirect /urlRoot to /urlRoot/
* Fix serving with urlRoot

### v0.1.0
* Adapter for AngularJS scenario runner
* Allow serving Testacular from a subpath
* Fix race condition in testacular run
* Make testacular one binary (remove `testacular-run`, use `testacular run`)
* Add support for proxies
* Init script for generating config files (`testacular init`)
* Start Firefox without custom profile if it fails
* Preserve order of watched paths for easier debugging
* Change default port to 9876
* Require node v0.8.4+

### v0.0.17
* Fix race condition in manually triggered run
* Fix autoWatch config

### v0.0.16
* Mocha adapter
* Fix watching/resolving on Windows
* Allow glob patterns
* Watch new files
* Watch removed files
* Remove unused config (autoWatchInterval)

### v0.0.15
* Remove absolute paths from urls (fixes Windows issue with C:\\)
* Add browser launcher for PhantomJS
* Fix some more windows issues

### v0.0.14
* Allow require() inside config file
* Allow custom browser launcher
* Add browser launcher for Opera, Safari
* Ignore signals on windows (not supported yet)

### v0.0.13
* Single run mode (capture browsers, run tests, exit)
* Start browser automatically (chrome, canary, firefox)
* Allow loading external files (urls)

### v0.0.12
* Allow console in config
* Warning if pattern does not match any file

### v0.0.11
* Add timing (total / net - per specs)
* Dots reporter - wrap at 80

### v0.0.10
* Add DOTS reporter
* Add no-colors option for reporters
* Fix web server to expose only specified files

### v0.0.9
* Proper exit code for runner
* Dynamic port asigning (if port already in use)
* Add log-leve, log-colors cli arguments + better --help
* Fix some IE errors (indexOf, forEach fallbacks)

### v0.0.8
* Allow overriding configuration by cli arguments (+ --version, --help)
* Persuade IE8 to not cache context.html
* Exit runner if no captured browser
* Fix delayed execution (streaming to runner)
* Complete run if browser disconnects
* Ignore results from previous run (after server reconnecting)
* Server disconnects - cancel execution, clear browser info

### v0.0.7
* Rename to Testacular

### v0.0.6
* Better debug mode (no caching, no timestamps)
* Make dump() a bit better
* Disconnect browsers on SIGTERM (kill, killall default)

### v0.0.5
* Fix memory (some :-D) leaks
* Add dump support
* Add runner.html

### v0.0.4
* Progress bar reporting
* Improve error formatting
* Add Jasmine lib (with iit, ddescribe)
* Reconnect client each 2sec, remove exponential growing

### v0.0.3
* Jasmine adapter: ignore last failed filter in exclusive mode
* Jasmine adapter: add build (no global space pollution)

### 0.0.2
* Run only last failed tests (jasmine adapter)

### 0.0.1
* Initial version with only very basic features


text:
..  Copyright (c) 2014-present PlatformIO <contact@platformio.org>
    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.

.. _manifest_library_json_export:

``export``
----------

*Optional* | Type: ``Object``

This option is useful if you need to exclude extra data (test code, docs, images, PDFs, etc).
It allows one to reduce the size of the final archive.

To check which files will be included in the final packages, please use
:ref:`cmd_pkg_pack` command.

Possible options:

.. toctree::
    :maxdepth: 2

    include
    exclude


text:
<?php
    $title = 'Eser \'Laroux\' Özvataf - eser.ozvataf.com - Personal Homepage';
    $description = 'Eser \'Laroux\' Özvataf Personal Homepage';
    $keywords = 'eser laroux ozvataf larukedi software architect developer programmer coder team leader full stack senior php js javascript classic c# asp asp.net microsoft .net grunt npm node continuous integration seo search engine optimization social media devops';

    require '_header.php';
?>

Contact

E-mail: exser@oezvataxf.xcom

Telegram: @esero

<?php
    require '_footer.php';
?>


text:
class RemoveTopicEmailSignup < ActiveRecord::Migration[5.2]
  def up
    remove_column :topics, :email_alert_signup_content_id
  end
end


text:
<title>Berkeley DB: DB_ENV->set_lk_max_locks</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">

DB_ENV->set_lk_max_locks

<tt>

#include <db.h>

int
DB_ENV->set_lk_max_locks(DB_ENV *dbenv, u_int32_t max);

int
DB_ENV->get_lk_max_locks(DB_ENV *dbenv, u_int32_t *lk_maxp);

Description: DB_ENV->set_lk_max_locks

Set the maximum number of locks supported by the Berkeley DB environment.
This value is used by DB_ENV->open to estimate how much space to
allocate for various lock-table data structures.  The default value is
1000 locks. For specific information on configuring the size of the lock
subsystem, see Configuring locking:
sizing the system.

The database environment's maximum number of locks may also be configured using the
environment's DB_CONFIG file.  The syntax of the entry in that
file is a single line with the string "set_lk_max_locks", one or more whitespace
characters, and the number of locks.
Because the DB_CONFIG file is read when the database environment
is opened, it will silently overrule configuration done before that
time.

The DB_ENV->set_lk_max_locks method configures a database environment, not only operations
performed using the specified DB_ENV handle.

The DB_ENV->set_lk_max_locks method may not be called after the DB_ENV->open method is
called.
If the database environment already exists when
DB_ENV->open is called, the information specified to DB_ENV->set_lk_max_locks
will be ignored.

The DB_ENV->set_lk_max_locks method
returns a non-zero error value on failure
and 0 on success.

Parameters

 max

The max parameter is the maximum number of locks supported by
the Berkeley DB environment.

Errors

The DB_ENV->set_lk_max_locks method
may fail and return one of the following non-zero errors:

EINVAL

If the method was called after DB_ENV->open was called; or if an
invalid flag value or parameter was specified.

Description: DB_ENV->get_lk_max_locks

The DB_ENV->get_lk_max_locks method returns the maximum number of locks.

The DB_ENV->get_lk_max_locks method may be called at any time during the life of the
application.

The DB_ENV->get_lk_max_locks method
returns a non-zero error value on failure
and 0 on success.

Parameters

 lk_maxp

The DB_ENV->get_lk_max_locks method returns  the
maximum number of locks in lk_maxp.

Class
DB_ENV, DB_LOCK

See Also
Locking Subsystem and Related Methods
</tt>

Copyright (c) 1996,2008 Oracle.  All rights reserved.


text:
require 'omniauth-oauth2'
require 'faraday'

module OmniAuth
  module Strategies
    class Gca < OmniAuth::Strategies::OAuth2
      class << self
        attr_accessor :gca_sso_token
      end

      if Rails.env.production?
        if ENV["STAGING"] == "true"
          option :client_options, {
            :site =>  "http://gca-sso-staging.herokuapp.com",
            :authorize_url => "http://gca-sso-staging.herokuapp.com/oauth/authorize",
            :access_token_url => "http://gca-sso-staging.herokuapp.com/oauth/token"
          }
        else
          option :client_options, {
            :site =>  "https://sso.usap-colorado.com",
            :authorize_url => "https://sso.usap-colorado.com/oauth/authorize",
            :access_token_url => "https://sso.usap-colorado.com/oauth/token"
          }
        end
      else
        option :client_options, {
          :site =>  "http://0.0.0.0:3000",
          :authorize_url => "http://0.0.0.0:3000/oauth/authorize",
          :access_token_url => "http://0.0.0.0:3000/oauth/token"
        }
      end

      uid { raw_info['user']['uid'] }

      info do
        {
          email: raw_info['user']['email'],
          first_name: raw_info['user']['first_name'],
          last_name: raw_info['user']['last_name'],
          legal_first_name: raw_info['user']['legal_first_name'],
          legal_last_name: raw_info['user']['legal_last_name'],
          title: raw_info['user']['title'],
          npi: raw_info['user']['npi'],
          group: raw_info['user']['user_groups']
        }
      end

      extra do
        {
          session_trusted: raw_info['session']['trusted'],
          expires_at: raw_info['session']['expires_at']
        }
      end

      def raw_info
        @raw_info ||= access_token.get("/api/user.json").parsed
      end
    end
  end
end

class GcaSsoApi
  def initialize(request_uri, params={}, user_token=nil)
    @request_uri = request_uri
    @params = params
    @provider_host = OmniAuth::Strategies::Gca.default_options['client_options']['site']
    @user_token = user_token
    if @user_token
      @client = Faraday.new(@provider_host)
    else
      @client = OAuth2::Client.new(ENV["GCA_SSO_APP_ID"], ENV["GCA_SSO_APP_SECRET"], site: @provider_host, :raise_errors => false)
      @token = @client.client_credentials.get_token
    end
    @response = nil
  end

  def get
    if @user_token
      @response = @client.get do |req|
        req.url @request_uri
        req.headers['Authorization'] = "Bearer #{@user_token}"
        req.params = @params
      end
    else
      @response = token.get(@request_uri, params: @params)
    end
  end

  def post
    if @user_token
      @response = @client.post do |req|
        req.url @request_uri
        req.headers['Authorization'] = "Bearer #{@user_token}"
        req.body = @params
      end
    else
      @response = token.post(@request_uri, params: @params)
    end
  end

  def response
    @response
  end

  def token
    @token
  end
end


text:
using System;
using Alensia.Core.Common;
using UnityEngine;

namespace Alensia.Core.Camera
{
    [Serializable]
    public class RotationalConstraints : IEditorSettings
    {
        [Range(0, 90)]
        public float Up = 80f;

        [Range(0, 90)]
        public float Down = 80f;

        [Range(0, 180)]
        public float Side = 80f;
    }
}


text:
package types

type CookbookVersion struct {
	ID                string   `json:"id" header:"ID"`
	Name              string   `json:"name" header:"NAME"`
	Version           string   `json:"version" header:"VERSION"`
	State             string   `json:"state" header:"STATE"`
	RevisionID        string   `json:"revision_id,omitempty" header:"REVISION_ID"`
	Description       string   `json:"description" header:"DESCRIPTION"`
	Recipes           []string `json:"recipes"  header:"RECIPES" show:"nolist"`
	ResourceType      string   `json:"resource_type" header:"RESOURCE_TYPE" show:"nolist"`
	PubliclyAvailable bool     `json:"publicly_available" header:"PUBLICLY_AVAILABLE" show:"nolist"`
	GlobalLegacy      bool     `json:"global_legacy" header:"GLOBAL_LEGACY" show:"nolist"`
	UploadURL         string   `json:"upload_url" header:"UPLOAD_URL" show:"noshow,nolist"`
	ErrorMessage      string   `json:"error_message" header:"ERROR_MESSAGE" show:"nolist"`
	LabelableFields
}


text:
import $ from 'jquery';

const MORNING = 'morning';
const DAY = 'day';
const EVENING = 'evening';

var DAY_TIME = '';

var Filter = class Filter {
    constructor(){

    }

    resetClasses(){
        $('body').removeClass('morning-day day-evening evening-morning');
    }

    morningToDay(){
        this.resetClasses();
        $('body').addClass('morning-day');
    }

    dayToEvening(){
        this.resetClasses();
        $('body').addClass('day-evening');
    }

    eveningToMorning(){
        this.resetClasses();
        $('body').addClass('evening-morning');
    }
};

var self = module.exports = {
    triggerChange: function (dayTime, FIRST_LOAD) {

        // in case if it is first load of page stick to Server side returned style
        if (FIRST_LOAD == true){
            DAY_TIME = dayTime;
            return true;
        }

        // in case if it is AJAX call check if we need to call transition of filters
        var filter = new Filter();
        switch (dayTime) {
            case DAY_TIME:
                break;
            case MORNING:
                DAY_TIME = MORNING;
                filter.eveningToMorning();
                break;
            case EVENING:

                DAY_TIME = EVENING;
                filter.dayToEvening();
                break;
            case DAY:
                DAY_TIME = DAY;
                filter.morningToDay();
                break;
        }
    }
};


text:
namespace sch
{
  class S_Point :
    public S_ObjectNonNormalized
  {
  public:
    SCH_API S_Point();
    SCH_API ~S_Point();

    SCH_API virtual S_Point * clone() const;

    SCH_API void setDisplayRadius( Scalar r);
    SCH_API Scalar getDisplayRadius() const ;

  protected:
    SCH_API virtual Point3 l_Support(const Vector3& v, int& lastFeature)const;
    SCH_API virtual	S_ObjectType getType() const;

    Scalar displayRadius_;
  };
}
#endif


text:
define([
    'marionette',
    'app/templates/layouts/app'
  ], function (Marionette, template) {
  return Marionette.Layout.extend({
    template: template,

    regions: {
      navigation: '#navigation',
      content: '#content',
      footer: '#footer'
    }
  });
});


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<title>Phaser Source: d:/wamp/www/phaser/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js</title>

	<link type="text/css" rel="stylesheet" href="styles/default.css">

	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

	<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">

			Phaser API

					Namespaces

							Phaser

							PIXI

					Classes

							Animation

							AnimationManager

							AnimationParser

							ArrayList

							ArraySet

							ArrayUtils

							AudioSprite

							BitmapData

							BitmapText

							Button

							Cache

							Camera

							Canvas

							Circle

							Color

							Device

							DOM

							Easing

							Ellipse

							Events

							Filter

							FlexGrid

							FlexLayer

							Frame

							FrameData

							Game

							GameObjectCreator

							GameObjectFactory

							Gamepad

							GamepadButton

							Graphics

							Group

							Image

							Input

							InputHandler

							Key

							Keyboard

							Line

							LinkedList

							Loader

							LoaderParser

							Math

							Mouse

							MSPointer

							Net

							Particle

							Particles

							Arcade

							Emitter

							Physics

							Arcade

							Body

							Ninja

							AABB

							Body

							Circle

							Tile

							P2

							Body

							BodyDebug

							CollisionGroup

							ContactMaterial

							DistanceConstraint

							FixtureList

							GearConstraint

							InversePointProxy

							LockConstraint

							Material

							PointProxy

							PrismaticConstraint

							RevoluteConstraint

							RotationalSpring

							Spring

							Plugin

							PluginManager

							Point

							Pointer

							Polygon

							QuadTree

							RandomDataGenerator

							Rectangle

							RenderTexture

							RequestAnimationFrame

							RetroFont

							Rope

							ScaleManager

							Signal

							SignalBinding

							SinglePad

							Sound

							SoundManager

							Sprite

							SpriteBatch

							Stage

							State

							StateManager

							Text

							Tile

							Tilemap

							TilemapLayer

							TilemapParser

							Tileset

							TileSprite

							Time

							Timer

							TimerEvent

							Touch

							Tween

							TweenData

							TweenManager

							Utils

							Debug

							World

							AbstractFilter

							AjaxRequest

							AlphaMaskFilter

							AsciiFilter

							AssetLoader

							AtlasLoader

							BaseTexture

							BitmapFontLoader

							BitmapText

							BlurFilter

							BlurXFilter

							BlurYFilter

							CanvasBuffer

							CanvasGraphics

							CanvasMaskManager

							CanvasRenderer

							CanvasTinter

							Circle

							ColorMatrixFilter

							ColorStepFilter

							ComplexPrimitiveShader

							ConvolutionFilter

							CrossHatchFilter

							DisplacementFilter

							DisplayObject

							DisplayObjectContainer

							DotScreenFilter

							Ellipse

							Event

							EventTarget

							FilterBlock

							FilterTexture

							Graphics

							GraphicsData

							GrayFilter

							ImageLoader

							InteractionData

							InteractionManager

							InvertFilter

							JsonLoader

							Matrix

							MovieClip

							NoiseFilter

							NormalMapFilter

							PixelateFilter

							PIXI

							PixiFastShader

							PixiShader

							Point

							Polygon

							PolyK

							PrimitiveShader

							Rectangle

							RenderTexture

							RGBSplitFilter

							Rope

							RoundedRectangle

							SepiaFilter

							SmartBlurFilter

							Spine

							SpineLoader

							SpineTextureLoader

							Sprite

							SpriteBatch

							SpriteSheetLoader

							Stage

							Strip

							StripShader

							Text

							Texture

							TilingSprite

							TiltShiftFilter

							TiltShiftXFilter

							TiltShiftYFilter

							TwistFilter

							VideoTexture

							WebGLBlendModeManager

							WebGLFastSpriteBatch

							WebGLFilterManager

							WebGLRenderer

					Core

Game

Group

World

Loader

Time

Camera

State Manager

Tween Manager

Sound Manager

Input Manager

Scale Manager

					Game Objects

Factory (game.add)

Creator (game.make)

Sprite

Image

Sound

Particle Emitter

Particle

Text

Tween

BitmapText

Tilemap

BitmapData

RetroFont

Button

Animation

Graphics

RenderTexture

TileSprite

					Geometry

Circle

Rectangle

Point

Line

Ellipse

Polygon

					Physics

Arcade Physics

Body

P2 Physics

Body

Spring

CollisionGroup

ContactMaterial

Ninja Physics

Body

					Input

Input Handler

Pointer

Mouse

Keyboard

Key

Gamepad

					Community

Phaser Books

Phaser Github

Phaser Examples

Phaser Plugins

Forum

Stack Overflow

Newsletter

Twitter

IRC

GitTip

Source: d:/wamp/www/phaser/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js

/**
 * @author Mat Groves
 *
 * Big thanks to the very clever Matt DesLauriers <mattdesl> https://github.com/mattdesl/
 * for creating the original pixi version!
 * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now share 4 bytes on the vertex buffer
 *
 * Heavily inspired by LibGDX's WebGLSpriteBatch:
 * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/WebGLSpriteBatch.java
 */

 /**
 *
 * @class WebGLSpriteBatch
 * @private
 * @constructor
 */
PIXI.WebGLSpriteBatch = function()
{
    /**
     * @property vertSize
     * @type Number
     */
    this.vertSize = 5;

    /**
     * The number of images in the SpriteBatch before it flushes
     * @property size
     * @type Number
     */
    this.size = 2000;//Math.pow(2, 16) /  this.vertSize;

    //the total number of bytes in our batch
    var numVerts = this.size * 4 * 4 * this.vertSize;
    //the total number of indices in our batch
    var numIndices = this.size * 6;

    /**
    * Holds the vertices
    *
    * @property vertices
    * @type ArrayBuffer
    */
    this.vertices = new PIXI.ArrayBuffer(numVerts);

    /**
    * View on the vertices as a Float32Array
    *
    * @property positions
    * @type Float32Array
    */
    this.positions = new PIXI.Float32Array(this.vertices);

    /**
    * View on the vertices as a Uint32Array
    *
    * @property colors
    * @type Uint32Array
    */
    this.colors = new PIXI.Uint32Array(this.vertices);

    /**
     * Holds the indices
     *
     * @property indices
     * @type Uint16Array
     */
    this.indices = new PIXI.Uint16Array(numIndices);

    /**
     * @property lastIndexCount
     * @type Number
     */
    this.lastIndexCount = 0;

    for (var i=0, j=0; i < numIndices; i += 6, j += 4)
    {
        this.indices[i + 0] = j + 0;
        this.indices[i + 1] = j + 1;
        this.indices[i + 2] = j + 2;
        this.indices[i + 3] = j + 0;
        this.indices[i + 4] = j + 2;
        this.indices[i + 5] = j + 3;
    }

    /**
     * @property drawing
     * @type Boolean
     */
    this.drawing = false;

    /**
     * @property currentBatchSize
     * @type Number
     */
    this.currentBatchSize = 0;

    /**
     * @property currentBaseTexture
     * @type BaseTexture
     */
    this.currentBaseTexture = null;

    /**
     * @property dirty
     * @type Boolean
     */
    this.dirty = true;

    /**
     * @property textures
     * @type Array
     */
    this.textures = [];

    /**
     * @property blendModes
     * @type Array
     */
    this.blendModes = [];

    /**
     * @property shaders
     * @type Array
     */
    this.shaders = [];

    /**
     * @property sprites
     * @type Array
     */
    this.sprites = [];

    /**
     * @property defaultShader
     * @type AbstractFilter
     */
    this.defaultShader = new PIXI.AbstractFilter([
        'precision lowp float;',
        'varying vec2 vTextureCoord;',
        'varying vec4 vColor;',
        'uniform sampler2D uSampler;',
        'void main(void) {',
        '   gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;',
        '}'
    ]);
};

/**
* @method setContext
* @param gl {WebGLContext} the current WebGL drawing context
*/
PIXI.WebGLSpriteBatch.prototype.setContext = function(gl)
{
    this.gl = gl;

    // create a couple of buffers
    this.vertexBuffer = gl.createBuffer();
    this.indexBuffer = gl.createBuffer();

    // 65535 is max index, so 65535 / 6 = 10922.

    //upload the index data
    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer);
    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices, gl.STATIC_DRAW);

    gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
    gl.bufferData(gl.ARRAY_BUFFER, this.vertices, gl.DYNAMIC_DRAW);

    this.currentBlendMode = 99999;

    var shader = new PIXI.PixiShader(gl);

    shader.fragmentSrc = this.defaultShader.fragmentSrc;
    shader.uniforms = {};
    shader.init();

    this.defaultShader.shaders[gl.id] = shader;
};

/**
* @method begin
* @param renderSession {Object} The RenderSession object
*/
PIXI.WebGLSpriteBatch.prototype.begin = function(renderSession)
{
    this.renderSession = renderSession;
    this.shader = this.renderSession.shaderManager.defaultShader;

    this.start();
};

/**
* @method end
*/
PIXI.WebGLSpriteBatch.prototype.end = function()
{
    this.flush();
};

/**
* @method render
* @param sprite {Sprite} the sprite to render when using this spritebatch
*/
PIXI.WebGLSpriteBatch.prototype.render = function(sprite)
{
    var texture = sprite.texture;

   //TODO set blend modes..
    // check texture..
    if(this.currentBatchSize >= this.size)
    {
        this.flush();
        this.currentBaseTexture = texture.baseTexture;
    }

    // get the uvs for the texture
    var uvs = texture._uvs;
    // if the uvs have not updated then no point rendering just yet!
    if(!uvs)return;

    // TODO trim??
    var aX = sprite.anchor.x;
    var aY = sprite.anchor.y;

    var w0, w1, h0, h1;

    if (texture.trim)
    {
        // if the sprite is trimmed then we need to add the extra space before transforming the sprite coords..
        var trim = texture.trim;

        w1 = trim.x - aX * trim.width;
        w0 = w1 + texture.crop.width;

        h1 = trim.y - aY * trim.height;
        h0 = h1 + texture.crop.height;

    }
    else
    {
        w0 = (texture.frame.width ) * (1-aX);
        w1 = (texture.frame.width ) * -aX;

        h0 = texture.frame.height * (1-aY);
        h1 = texture.frame.height * -aY;
    }

    var index = this.currentBatchSize * 4 * this.vertSize;

    var resolution = texture.baseTexture.resolution;

    var worldTransform = sprite.worldTransform;

    var a = worldTransform.a / resolution;
    var b = worldTransform.b / resolution;
    var c = worldTransform.c / resolution;
    var d = worldTransform.d / resolution;
    var tx = worldTransform.tx;
    var ty = worldTransform.ty;

    var colors = this.colors;
    var positions = this.positions;

    if(this.renderSession.roundPixels)
    {
        // xy
        positions[index] = a * w1 + c * h1 + tx | 0;
        positions[index+1] = d * h1 + b * w1 + ty | 0;

        // xy
        positions[index+5] = a * w0 + c * h1 + tx | 0;
        positions[index+6] = d * h1 + b * w0 + ty | 0;

         // xy
        positions[index+10] = a * w0 + c * h0 + tx | 0;
        positions[index+11] = d * h0 + b * w0 + ty | 0;

        // xy
        positions[index+15] = a * w1 + c * h0 + tx | 0;
        positions[index+16] = d * h0 + b * w1 + ty | 0;
    }
    else
    {
        // xy
        positions[index] = a * w1 + c * h1 + tx;
        positions[index+1] = d * h1 + b * w1 + ty;

        // xy
        positions[index+5] = a * w0 + c * h1 + tx;
        positions[index+6] = d * h1 + b * w0 + ty;

         // xy
        positions[index+10] = a * w0 + c * h0 + tx;
        positions[index+11] = d * h0 + b * w0 + ty;

        // xy
        positions[index+15] = a * w1 + c * h0 + tx;
        positions[index+16] = d * h0 + b * w1 + ty;
    }

    // uv
    positions[index+2] = uvs.x0;
    positions[index+3] = uvs.y0;

    // uv
    positions[index+7] = uvs.x1;
    positions[index+8] = uvs.y1;

     // uv
    positions[index+12] = uvs.x2;
    positions[index+13] = uvs.y2;

    // uv
    positions[index+17] = uvs.x3;
    positions[index+18] = uvs.y3;

    // color and alpha
    var tint = sprite.tint;
    colors[index+4] = colors[index+9] = colors[index+14] = colors[index+19] = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16) + (sprite.worldAlpha * 255 << 24);

    // increment the batchsize
    this.sprites[this.currentBatchSize++] = sprite;

};

/**
* Renders a TilingSprite using the spriteBatch.
*
* @method renderTilingSprite
* @param sprite {TilingSprite} the tilingSprite to render
*/
PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
{
    var texture = tilingSprite.tilingTexture;

    // check texture..
    if(this.currentBatchSize >= this.size)
    {
        //return;
        this.flush();
        this.currentBaseTexture = texture.baseTexture;
    }

     // set the textures uvs temporarily
    // TODO create a separate texture so that we can tile part of a texture

    if(!tilingSprite._uvs)tilingSprite._uvs = new PIXI.TextureUvs();

    var uvs = tilingSprite._uvs;

    tilingSprite.tilePosition.x %= texture.baseTexture.width * tilingSprite.tileScaleOffset.x;
    tilingSprite.tilePosition.y %= texture.baseTexture.height * tilingSprite.tileScaleOffset.y;

    var offsetX =  tilingSprite.tilePosition.x/(texture.baseTexture.width*tilingSprite.tileScaleOffset.x);
    var offsetY =  tilingSprite.tilePosition.y/(texture.baseTexture.height*tilingSprite.tileScaleOffset.y);

    var scaleX =  (tilingSprite.width / texture.baseTexture.width)  / (tilingSprite.tileScale.x * tilingSprite.tileScaleOffset.x);
    var scaleY =  (tilingSprite.height / texture.baseTexture.height) / (tilingSprite.tileScale.y * tilingSprite.tileScaleOffset.y);

    uvs.x0 = 0 - offsetX;
    uvs.y0 = 0 - offsetY;

    uvs.x1 = (1 * scaleX) - offsetX;
    uvs.y1 = 0 - offsetY;

    uvs.x2 = (1 * scaleX) - offsetX;
    uvs.y2 = (1 * scaleY) - offsetY;

    uvs.x3 = 0 - offsetX;
    uvs.y3 = (1 * scaleY) - offsetY;

    // get the tilingSprites current alpha and tint and combining them into a single color
    var tint = tilingSprite.tint;
    var color = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16) + (tilingSprite.alpha * 255 << 24);

    var positions = this.positions;
    var colors = this.colors;

    var width = tilingSprite.width;
    var height = tilingSprite.height;

    // TODO trim??
    var aX = tilingSprite.anchor.x;
    var aY = tilingSprite.anchor.y;
    var w0 = width * (1-aX);
    var w1 = width * -aX;

    var h0 = height * (1-aY);
    var h1 = height * -aY;

    var index = this.currentBatchSize * 4 * this.vertSize;

    var resolution = texture.baseTexture.resolution;

    var worldTransform = tilingSprite.worldTransform;

    var a = worldTransform.a / resolution;//[0];
    var b = worldTransform.b / resolution;//[3];
    var c = worldTransform.c / resolution;//[1];
    var d = worldTransform.d / resolution;//[4];
    var tx = worldTransform.tx;//[2];
    var ty = worldTransform.ty;//[5];

    // xy
    positions[index++] = a * w1 + c * h1 + tx;
    positions[index++] = d * h1 + b * w1 + ty;
    // uv
    positions[index++] = uvs.x0;
    positions[index++] = uvs.y0;
    // color
    colors[index++] = color;

    // xy
    positions[index++] = (a * w0 + c * h1 + tx);
    positions[index++] = d * h1 + b * w0 + ty;
    // uv
    positions[index++] = uvs.x1;
    positions[index++] = uvs.y1;
    // color
    colors[index++] = color;

    // xy
    positions[index++] = a * w0 + c * h0 + tx;
    positions[index++] = d * h0 + b * w0 + ty;
    // uv
    positions[index++] = uvs.x2;
    positions[index++] = uvs.y2;
    // color
    colors[index++] = color;

    // xy
    positions[index++] = a * w1 + c * h0 + tx;
    positions[index++] = d * h0 + b * w1 + ty;
    // uv
    positions[index++] = uvs.x3;
    positions[index++] = uvs.y3;
    // color
    colors[index++] = color;

    // increment the batchsize
    this.sprites[this.currentBatchSize++] = tilingSprite;
};

/**
* Renders the content and empties the current batch.
*
* @method flush
*/
PIXI.WebGLSpriteBatch.prototype.flush = function()
{
    // If the batch is length 0 then return as there is nothing to draw
    if (this.currentBatchSize===0)return;

    var gl = this.gl;
    var shader;

    if(this.dirty)
    {
        this.dirty = false;
        // bind the main texture
        gl.activeTexture(gl.TEXTURE0);

        // bind the buffers
        gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
        gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer);

        shader =  this.defaultShader.shaders[gl.id];

        // this is the same for each shader?
        var stride =  this.vertSize * 4;
        gl.vertexAttribPointer(shader.aVertexPosition, 2, gl.FLOAT, false, stride, 0);
        gl.vertexAttribPointer(shader.aTextureCoord, 2, gl.FLOAT, false, stride, 2 * 4);

        // color attributes will be interpreted as unsigned bytes and normalized
        gl.vertexAttribPointer(shader.colorAttribute, 4, gl.UNSIGNED_BYTE, true, stride, 4 * 4);
    }

    // upload the verts to the buffer
    if(this.currentBatchSize > ( this.size * 0.5 ) )
    {
        gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertices);
    }
    else
    {
        var view = this.positions.subarray(0, this.currentBatchSize * 4 * this.vertSize);
        gl.bufferSubData(gl.ARRAY_BUFFER, 0, view);
    }

    var nextTexture, nextBlendMode, nextShader;
    var batchSize = 0;
    var start = 0;

    var currentBaseTexture = null;
    var currentBlendMode = this.renderSession.blendModeManager.currentBlendMode;
    var currentShader = null;

    var blendSwap = false;
    var shaderSwap = false;
    var sprite;

    for (var i = 0, j = this.currentBatchSize; i < j; i++) {

        sprite = this.sprites[i];

        nextTexture = sprite.texture.baseTexture;
        nextBlendMode = sprite.blendMode;
        nextShader = sprite.shader || this.defaultShader;

        blendSwap = currentBlendMode !== nextBlendMode;
        shaderSwap = currentShader !== nextShader; // should I use _UIDS???

        if(currentBaseTexture !== nextTexture || blendSwap || shaderSwap)
        {
            this.renderBatch(currentBaseTexture, batchSize, start);

            start = i;
            batchSize = 0;
            currentBaseTexture = nextTexture;

            if( blendSwap )
            {
                currentBlendMode = nextBlendMode;
                this.renderSession.blendModeManager.setBlendMode( currentBlendMode );
            }

            if( shaderSwap )
            {
                currentShader = nextShader;

                shader = currentShader.shaders[gl.id];

                if(!shader)
                {
                    shader = new PIXI.PixiShader(gl);

                    shader.fragmentSrc =currentShader.fragmentSrc;
                    shader.uniforms =currentShader.uniforms;
                    shader.init();

                    currentShader.shaders[gl.id] = shader;
                }

                // set shader function???
                this.renderSession.shaderManager.setShader(shader);

                if(shader.dirty)shader.syncUniforms();

                // both thease only need to be set if they are changing..
                // set the projection
                var projection = this.renderSession.projection;
                gl.uniform2f(shader.projectionVector, projection.x, projection.y);

                // TODO - this is temprorary!
                var offsetVector = this.renderSession.offset;
                gl.uniform2f(shader.offsetVector, offsetVector.x, offsetVector.y);

                // set the pointers
            }
        }

        batchSize++;
    }

    this.renderBatch(currentBaseTexture, batchSize, start);

    // then reset the batch!
    this.currentBatchSize = 0;
};

/**
* @method renderBatch
* @param texture {Texture}
* @param size {Number}
* @param startIndex {Number}
*/
PIXI.WebGLSpriteBatch.prototype.renderBatch = function(texture, size, startIndex)
{
    if(size === 0)return;

    var gl = this.gl;

    // check if a texture is dirty..
    if(texture._dirty[gl.id])
    {
        this.renderSession.renderer.updateTexture(texture);
    }
    else
    {
        // bind the current texture
        gl.bindTexture(gl.TEXTURE_2D, texture._glTextures[gl.id]);
    }

    // now draw those suckas!
    gl.drawElements(gl.TRIANGLES, size * 6, gl.UNSIGNED_SHORT, startIndex * 6 * 2);

    // increment the draw count
    this.renderSession.drawCount++;
};

/**
* @method stop
*/
PIXI.WebGLSpriteBatch.prototype.stop = function()
{
    this.flush();
    this.dirty = true;
};

/**
* @method start
*/
PIXI.WebGLSpriteBatch.prototype.start = function()
{
    this.dirty = true;
};

/**
* Destroys the SpriteBatch.
*
* @method destroy
*/
PIXI.WebGLSpriteBatch.prototype.destroy = function()
{
    this.vertices = null;
    this.indices = null;

    this.gl.deleteBuffer( this.vertexBuffer );
    this.gl.deleteBuffer( this.indexBuffer );

    this.currentBaseTexture = null;

    this.gl = null;
};

		Phaser Copyright © 2012-2014 Photon Storm Ltd.

		Documentation generated by JSDoc 3.3.0-dev
		on Tue Jan 06 2015 06:31:49 GMT-0000 (GMT) using the DocStrap template.


text:
package cwl

import (
	"fmt"

	"github.com/davecgh/go-spew/spew"

	"reflect"

	"github.com/mitchellh/mapstructure"
)

//WorkflowStepInput http://www.commonwl.org/v1.0/Workflow.html#WorkflowStepInput
type WorkflowStepInput struct {
	CWLObjectImpl `yaml:",inline" bson:",inline" json:",inline" mapstructure:",squash"`
	ID            string           `yaml:"id,omitempty" bson:"id,omitempty" json:"id,omitempty" mapstructure:"id,omitempty"`
	Source        interface{}      `yaml:"source,omitempty" bson:"source,omitempty" json:"source,omitempty" mapstructure:"source,omitempty"` // MultipleInputFeatureRequirement, multiple inbound data links listed in the source field
	SourceIndex   int              `yaml:"source_index,omitempty" bson:"source_index,omitempty" json:"source_index,omitempty" mapstructure:"source_index,omitempty"`
	LinkMerge     *LinkMergeMethod `yaml:"linkMerge,omitempty" bson:"linkMerge,omitempty" json:"linkMerge,omitempty" mapstructure:"linkMerge,omitempty"`
	Default       interface{}      `yaml:"default,omitempty" bson:"default,omitempty" json:"default,omitempty" mapstructure:"default,omitempty"`         // type Any does not make sense
	ValueFrom     Expression       `yaml:"valueFrom,omitempty" bson:"valueFrom,omitempty" json:"valueFrom,omitempty" mapstructure:"valueFrom,omitempty"` // StepInputExpressionRequirement
	Ready         bool             `yaml:"-" bson:"-" json:"-" mapstructure:"-"`
}

// GetClass _
func (w WorkflowStepInput) GetClass() string {
	return "WorkflowStepInput"
}

// GetID _
func (w WorkflowStepInput) GetID() string { return w.ID }

// SetID _
func (w WorkflowStepInput) SetID(id string) { w.ID = id }

// IsCWLMinimal _
func (w WorkflowStepInput) IsCWLMinimal() {}

//func (input WorkflowStepInput) GetString() (value string, err error) {
//	if len(input.Source) > 0 {
//		err = fmt.Errorf("Source is defined and should be used")
//	} else if string(input.ValueFrom) != "" {
//		value = string(input.ValueFrom)
//	} else if input.Default != nil {
//		value = input.Default
//	} else {
//		err = fmt.Errorf("no input (source, default or valueFrom) defined for %s", id)
//	}
//	return
//}

// NewWorkflowStepInput _
func NewWorkflowStepInput(original interface{}, context *WorkflowContext) (inputParameterPtr *WorkflowStepInput, err error) {

	inputParameter := WorkflowStepInput{}
	inputParameterPtr = &inputParameter

	original, err = MakeStringMap(original, context)
	if err != nil {
		return
	}

	switch original.(type) {
	case string:

		sourceString := original.(string)
		inputParameter.Source = []string{sourceString}
		return

	case []interface{}:

		originalStrArray := []string{}
		originalArray := original.([]interface{})
		for i := range originalArray {
			var value string
			var ok bool
			value, ok = originalArray[i].(string)
			if !ok {
				err = fmt.Errorf("(NewWorkflowStepInput) array elemenet not a string")
				return
			}
			originalStrArray = append(originalStrArray, value)

		}

		inputParameter.Source = originalStrArray

	case int:
		//fmt.Println(CWLInt)
		originalInt := original.(int)
		inputParameter.Default, err = NewInt(originalInt, context) // inputParameter.Id
		if err != nil {
			err = fmt.Errorf("(NewWorkflowStepInput) NewInt: %s", err.Error())
			return
		}
		return

	case map[string]interface{}:
		//fmt.Println("case map[string]interface{}")

		originalMap := original.(map[string]interface{})

		//source, ok := original_map["source"]

		//if ok {
		//	source_str, ok := source.(string)
		//	if ok {
		//		original_map["source"] = []string{source_str}
		//	}
		//}

		defaultValue, hasDefault := originalMap["default"]
		if hasDefault {
			var any CWLType
			//fmt.Println("trying:")
			//spew.Dump(original)
			any, err = NewCWLType("", "", defaultValue, context)
			if err != nil {
				fmt.Println("problematic Default:")
				spew.Dump(original)
				err = fmt.Errorf("(NewWorkflowStepInput) NewCWLType returned: %s", err.Error())
				return
			}
			originalMap["default"] = any
		}

		err = mapstructure.Decode(original, inputParameterPtr)
		if err != nil {
			err = fmt.Errorf("(NewWorkflowStepInput) %s", err.Error())
			return
		}

		// TODO would it be better to do it later?

		// set Default field
		// default_value, ok := originalMap["default"]
		// 	//default_value, ok := , errx := GetMapElement(originalMap, "default")
		// 	if ok {
		// 		switch default_value.(type) {
		// 		case string:
		// 			input_parameter.Default = NewString(input_parameter.Id, default_value.(string))
		// 		case int:
		// 			input_parameter.Default = NewInt(input_parameter.Id, default_value.(int))
		// 		default:
		// 			err = fmt.Errorf("(NewWorkflowStepInput) string or int expected for key \"default\", got %s ", reflect.TypeOf(default_value))
		// 			return
		// 		}
		// 	}

		// set ValueFrom field
		//valueFrom_if, errx := GetMapElement(original.(map[interface{}]interface{}), "valueFrom")
		valueFromIf, ok := originalMap["valueFrom"]
		if ok {
			valueFromStr, ok := valueFromIf.(string)
			if !ok {
				err = fmt.Errorf("(NewWorkflowStepInput) cannot convert valueFrom")
				return
			}
			inputParameter.ValueFrom = Expression(valueFromStr)
		}

		if inputParameterPtr.LinkMerge == nil {
			// handle special case where LinkMerge is not defined, source is an array of length 1
			// https://github.com/common-workflow-language/common-workflow-language/issues/675

			switch inputParameterPtr.Source.(type) {
			case []interface{}:
				var sourceArray []interface{}
				sourceArray, ok = inputParameterPtr.Source.([]interface{})
				if !ok {
					err = fmt.Errorf("(NewWorkflowStepInput) could not convert to []interface{}")
					return
				}

				if len(sourceArray) == 1 {
					inputParameterPtr.Source = sourceArray[0]
				}

			}

		}

	default:

		//fmt.Println("---")
		//spew.Dump(original)
		//fmt.Println("---")
		//panic("can not be parsed")

		err = fmt.Errorf("(NewWorkflowStepInput) Input type %s can not be parsed", reflect.TypeOf(original))

	}

	return
}

// func (input WorkflowStepInput) GetObject(c *CWL_collection) (obj *CWLObject, err error) {
//
// 	var cwl_obj CWLObject
//
// 	if len(input.Source) > 0 {
// 		err = fmt.Errorf("Source is defined and should be used")
// 	} else if string(input.ValueFrom) != "" {
// 		new_string := string(input.ValueFrom)
// 		evaluated_string := c.Evaluate(new_string)
//
// 		cwl_obj = NewString(input.Id, evaluated_string) // TODO evaluate here !!!!! get helper
// 	} else if input.Default != nil {
// 		var any Any
// 		any, err = NewAny(input.Default)
// 		if err != nil {
// 			err = fmt.Errorf("(GetObject) NewAny returns", err.Error())
// 			return
// 		}
// 		cwl_obj = any
// 	} else {
// 		err = fmt.Errorf("no input (source, default or valueFrom) defined for %s", input.Id)
// 	}
// 	obj = &cwl_obj
// 	return
// }

// CreateWorkflowStepInputArray _
func CreateWorkflowStepInputArray(original interface{}, context *WorkflowContext) (arrayPtr *[]WorkflowStepInput, err error) {

	array := []WorkflowStepInput{}
	arrayPtr = &array

	original, err = MakeStringMap(original, context)
	if err != nil {
		return
	}

	switch original.(type) {
	case map[string]interface{}:
		originalMap := original.(map[string]interface{})

		for k, v := range originalMap {
			//v is an input

			inputParameter, xerr := NewWorkflowStepInput(v, context)
			if xerr != nil {
				err = fmt.Errorf("(CreateWorkflowStepInputArray) (map) NewWorkflowStepInput returns: %s", xerr.Error())
				return
			}

			if inputParameter.ID == "" {
				inputParameter.ID = k
			}

			array = append(array, *inputParameter)
			//fmt.Printf("D")
		}
		return

	case []interface{}:

		for _, v := range original.([]interface{}) {
			//v is an input

			inputParameter, xerr := NewWorkflowStepInput(v, context)
			if xerr != nil {
				err = fmt.Errorf("(CreateWorkflowStepInputArray) (array) NewWorkflowStepInput returns: %s", xerr.Error())
				return
			}

			array = append(array, *inputParameter)
			//fmt.Printf("D")
		}
		return

	default:
		err = fmt.Errorf("(CreateWorkflowStepInputArray) type unknown: %s", reflect.TypeOf(original))

	}
	//spew.Dump(new_array)
	return
}


text:
import template from './user.html';
import controller from './user.controller';
import './user.scss';

let userComponent = {
  restrict: 'E',
  bindings: {},
  template,
  controller,
  controllerAs: '$ctrl'
};

export default userComponent;


text:
<?php

namespace backend\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\models\WarehouseSea;

/**
 * WarehouseSeaSearch represents the model behind the search form about `backend\models\WarehouseSea`.
 */
class WarehouseSeaSearch extends WarehouseSea
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'send_date', 'estimated_date', 'created_at'], 'integer'],
            [['name'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = WarehouseSea::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'send_date' => $this->send_date,
            'estimated_date' => $this->estimated_date,
            'created_at' => $this->created_at,
        ]);

        $query->andFilterWhere(['like', 'name', $this->name]);

        return $dataProvider;
    }
}


text:
package com.jeff_fennell.capstone;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.jeff_fennell.capstone.entities.LoginResult;
import com.jeff_fennell.capstone.entities.User;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class CreateAccount extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_account);
    }

    public void validateFieldsAndCreateAccount(View view) {
        if (!allInputFieldsValid()) {
            setErrors();
        } else {
            tryToCreateAccount();
        }
    }

    private boolean allInputFieldsValid() {
        return usernameValid()
                && firstNameValid()
                && lastNameValid()
                && emailValid()
                && passwordValid()
                && passwordConfirmMatchesPassword();
    }

    private boolean usernameValid() {
       return getUsername().length() >= 4;
    }

    private boolean firstNameValid() {
        return getFirstName().length() > 0;
    }

    private boolean lastNameValid() {
        return getLastName().length() > 0;
    }

    private boolean emailValid() {
        return getEmail().length() > 0 && getEmail().contains("@");
    }

    private String getUsername(){
        return Utils.getTrimmedEditTextInput(this, R.id.create_account_username);
    }

    private String getFirstName() {
        return Utils.getTrimmedEditTextInput(this, R.id.create_account_first_name);
    }

    private String getLastName() {
        return Utils.getTrimmedEditTextInput(this, R.id.create_account_last_name);
    }

    private String getPassword() {
       return Utils.getTrimmedEditTextInput(this, R.id.create_account_password);
    }

    private String getEmail() {
        return Utils.getTrimmedEditTextInput(this, R.id.create_account_email);
    }

    private String getPasswordConfirm() {
        return Utils.getTrimmedEditTextInput(this, R.id.create_account_password_confirm);
    }

    private boolean passwordValid() {
        return getPassword().length() >= 8;
    }

    private boolean passwordConfirmMatchesPassword() {
        return getPassword().equals(getPasswordConfirm());
    }

    private void setErrors() {
        if (!usernameValid()) {
            Utils.setEditTextError(this, R.id.create_account_username, R.string.create_account_username_error);
        }

        if (!passwordValid()) {
            Utils.setEditTextError(this, R.id.create_account_password, R.string.create_account_password_error);
        }

        if (!firstNameValid()) {
            Utils.setEditTextError(this, R.id.create_account_first_name, R.string.create_account_first_name_error);
        }

        if (!lastNameValid()) {
            Utils.setEditTextError(this, R.id.create_account_last_name, R.string.create_account_last_name_error);
        }

        if (!emailValid()) {
            Utils.setEditTextError(this, R.id.create_account_email, R.string.create_account_email_error);
        }

        if (!passwordConfirmMatchesPassword()) {
            Utils.setEditTextError(this, R.id.create_account_password_confirm, R.string.create_account_password_match_error);
            Utils.setEditTextError(this, R.id.create_account_password , R.string.create_account_password_match_error);

        }
    }

    private void tryToCreateAccount() {
        User newUser = new User(
                getUsername(),
                getPassword(),
                getFirstName(),
                getLastName(),
                getEmail()
        );

        Retrofit retrofit = new Retrofit.Builder()
                .addConverterFactory(GsonConverterFactory.create())
                .baseUrl(BuildConfig.API_BASE_URL)
                .build();
        BubblService api = retrofit.create(BubblService.class);

        Call<LoginResult> createUser = api.createUser(newUser);
        createUser.enqueue(new Callback<LoginResult>() {
            @Override
            public void onResponse(Call<LoginResult> call, Response<LoginResult> response) {
                if (response.isSuccessful()) {
                    LoginResult userInfo = response.body();
                    persist(userInfo);

                    Context context = getApplicationContext();
                    CharSequence text = "Account created!";
                    int duration = Toast.LENGTH_SHORT;

                    Toast toast = Toast.makeText(context, text, duration);
                    toast.show();
                    launchCamera();
                }
            }

            @Override
            public void onFailure(Call<LoginResult> call, Throwable t) {

            }
        });
    }

    private void persist(LoginResult userLoginInfo) {
        User user = userLoginInfo.getUser();
        UserProfile.saveAuthenticationToken(userLoginInfo.getToken(), this);
        UserProfile.saveUserId(user.getUserId(), this);
        UserProfile.saveFirstName(user.getFirstName(), this);
        UserProfile.saveLastName(user.getLastName(), this);
        UserProfile.saveLoginStatus(this);
    }

    private void launchCamera() {
        Intent camera = new Intent(this, CameraActivity.class);
        startActivity(camera);
    }
}


text:
<?php
/**
 * Just displays a post loop. Intended to be included in child themes using get_template_part('loop'). Also works with SiteOrigin page builder loop widget.
 *
 * Loop Name: Blog Loop
 *
 * @package vantage
 * @since vantage 1.0
 * @license GPL 2.0
 */
?>

<?php if ( have_posts() ) : ?>

	<?php /* Start the Loop */ ?>
	<?php while ( have_posts() ) : the_post(); ?>

		<?php get_template_part( 'content', get_post_format() ); ?>

	<?php endwhile; ?>

	<?php vantage_content_nav( 'nav-below' ); ?>

<?php else : ?>

	<?php get_template_part( 'no-results', 'index' ); ?>

<?php endif; ?>


text:
#include "config.h"
#include "platform/graphics/Image.h"

#include "platform/Length.h"
#include "platform/MIMETypeRegistry.h"
#include "platform/PlatformInstrumentation.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/SharedBuffer.h"
#include "platform/TraceEvent.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/FloatSize.h"
#include "platform/graphics/BitmapImage.h"
#include "platform/graphics/DeferredImageDecoder.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
#include "public/platform/Platform.h"
#include "public/platform/WebData.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImage.h"
#include "wtf/MainThread.h"
#include "wtf/StdLibExtras.h"

#include <math.h>

namespace blink {

Image::Image(ImageObserver* observer)
    : m_imageObserver(observer)
{
}

Image::~Image()
{
}

Image* Image::nullImage()
{
    ASSERT(isMainThread());
    DEFINE_STATIC_REF(Image, nullImage, (BitmapImage::create()));
    return nullImage;
}

PassRefPtr<Image> Image::loadPlatformResource(const char *name)
{
    const WebData& resource = Platform::current()->loadResource(name);
    if (resource.isEmpty())
        return Image::nullImage();

    RefPtr<Image> image = BitmapImage::create();
    image->setData(resource, true);
    return image.release();
}

bool Image::supportsType(const String& type)
{
    return MIMETypeRegistry::isSupportedImageResourceMIMEType(type);
}

bool Image::setData(PassRefPtr<SharedBuffer> data, bool allDataReceived)
{
    m_encodedImageData = data;
    if (!m_encodedImageData.get())
        return true;

    int length = m_encodedImageData->size();
    if (!length)
        return true;

    return dataChanged(allDataReceived);
}

void Image::fillWithSolidColor(GraphicsContext* ctxt, const FloatRect& dstRect, const Color& color, SkXfermode::Mode op)
{
    if (!color.alpha())
        return;

    SkXfermode::Mode previousOperation = ctxt->compositeOperation();
    ctxt->setCompositeOperation(!color.hasAlpha() && op == SkXfermode::kSrcOver_Mode ? SkXfermode::kSrc_Mode : op);
    ctxt->fillRect(dstRect, color);
    ctxt->setCompositeOperation(previousOperation);
}

FloatRect Image::adjustForNegativeSize(const FloatRect& rect)
{
    FloatRect norm = rect;
    if (norm.width() < 0) {
        norm.setX(norm.x() + norm.width());
        norm.setWidth(-norm.width());
    }
    if (norm.height() < 0) {
        norm.setY(norm.y() + norm.height());
        norm.setHeight(-norm.height());
    }
    return norm;
}

void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, SkXfermode::Mode op, const IntSize& repeatSpacing)
{
    if (mayFillWithSolidColor()) {
        fillWithSolidColor(ctxt, destRect, solidColor(), op);
        return;
    }

    // See <https://webkit.org/b/59043>.
    ASSERT(!isBitmapImage() || notSolidColor());

    FloatSize intrinsicTileSize = size();
    if (hasRelativeWidth())
        intrinsicTileSize.setWidth(scaledTileSize.width());
    if (hasRelativeHeight())
        intrinsicTileSize.setHeight(scaledTileSize.height());

    FloatSize scale(scaledTileSize.width() / intrinsicTileSize.width(),
                    scaledTileSize.height() / intrinsicTileSize.height());

    FloatSize actualTileSize(scaledTileSize.width() + repeatSpacing.width(), scaledTileSize.height() + repeatSpacing.height());
    FloatRect oneTileRect;
    oneTileRect.setX(destRect.x() + fmodf(fmodf(-srcPoint.x(), actualTileSize.width()) - actualTileSize.width(), actualTileSize.width()));
    oneTileRect.setY(destRect.y() + fmodf(fmodf(-srcPoint.y(), actualTileSize.height()) - actualTileSize.height(), actualTileSize.height()));
    oneTileRect.setSize(scaledTileSize);

    // Check and see if a single draw of the image can cover the entire area we are supposed to tile.
    if (oneTileRect.contains(destRect)) {
        FloatRect visibleSrcRect;
        visibleSrcRect.setX((destRect.x() - oneTileRect.x()) / scale.width());
        visibleSrcRect.setY((destRect.y() - oneTileRect.y()) / scale.height());
        visibleSrcRect.setWidth(destRect.width() / scale.width());
        visibleSrcRect.setHeight(destRect.height() / scale.height());
        draw(ctxt, destRect, visibleSrcRect, op, DoNotRespectImageOrientation);
        return;
    }

    FloatRect tileRect(FloatPoint(), intrinsicTileSize);
    drawPattern(ctxt, tileRect, scale, oneTileRect.location(), op, destRect, repeatSpacing);

    startAnimation();
}

// FIXME: Merge with the other drawTiled eventually, since we need a combination of both for some things.
void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect,
    const FloatSize& providedTileScaleFactor, TileRule hRule, TileRule vRule, SkXfermode::Mode op)
{
    if (mayFillWithSolidColor()) {
        fillWithSolidColor(ctxt, dstRect, solidColor(), op);
        return;
    }

    // FIXME: We do not support 'space' yet. For now just map it to 'repeat'.
    if (hRule == SpaceTile)
        hRule = RepeatTile;
    if (vRule == SpaceTile)
        vRule = RepeatTile;

    // FIXME: if this code is used for background-repeat: round (in addition to
    // border-image-repeat), then add logic to deal with the background-size: auto
    // special case. The aspect ratio should be maintained in this case.
    FloatSize tileScaleFactor = providedTileScaleFactor;
    bool useLowInterpolationQuality = false;
    if (hRule == RoundTile) {
        float hRepetitions = std::max(1.0f, roundf(dstRect.width() / (tileScaleFactor.width() * srcRect.width())));
        tileScaleFactor.setWidth(dstRect.width() / (srcRect.width() * hRepetitions));
    }
    if (vRule == RoundTile) {
        float vRepetitions = std::max(1.0f, roundf(dstRect.height() / (tileScaleFactor.height() * srcRect.height())));
        tileScaleFactor.setHeight(dstRect.height() / (srcRect.height() * vRepetitions));
    }
    if (hRule == RoundTile || vRule == RoundTile) {
        // High interpolation quality rounds the scaled tile to an integer size (see Image::drawPattern).
        // To avoid causing a visual problem, linear interpolation must be used instead.
        // FIXME: Allow using high-quality interpolation in this case, too.
        useLowInterpolationQuality = true;
    }

    // We want to construct the phase such that the pattern is centered (when stretch is not
    // set for a particular rule).
    float hPhase = tileScaleFactor.width() * srcRect.x();
    float vPhase = tileScaleFactor.height() * srcRect.y();
    float scaledTileWidth = tileScaleFactor.width() * srcRect.width();
    float scaledTileHeight = tileScaleFactor.height() * srcRect.height();
    if (hRule == Image::RepeatTile)
        hPhase -= (dstRect.width() - scaledTileWidth) / 2;
    if (vRule == Image::RepeatTile)
        vPhase -= (dstRect.height() - scaledTileHeight) / 2;
    FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase);

    if (useLowInterpolationQuality) {
        InterpolationQuality previousInterpolationQuality = ctxt->imageInterpolationQuality();
        ctxt->setImageInterpolationQuality(InterpolationLow);
        drawPattern(ctxt, srcRect, tileScaleFactor, patternPhase, op, dstRect);
        ctxt->setImageInterpolationQuality(previousInterpolationQuality);
    } else {
        drawPattern(ctxt, srcRect, tileScaleFactor, patternPhase, op, dstRect);
    }

    startAnimation();
}

static SkBitmap createBitmapWithSpace(const SkBitmap& bitmap, int spaceWidth, int spaceHeight)
{
    SkImageInfo info = bitmap.info();
    info = SkImageInfo::Make(info.width() + spaceWidth, info.height() + spaceHeight, info.colorType(), kPremul_SkAlphaType);

    SkBitmap result;
    result.allocPixels(info);
    result.eraseColor(SK_ColorTRANSPARENT);
    bitmap.copyPixelsTo(reinterpret_cast<uint8_t*>(result.getPixels()), result.rowBytes() * result.height(), result.rowBytes());

    return result;
}

void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect, const FloatSize& scale,
    const FloatPoint& phase, SkXfermode::Mode compositeOp, const FloatRect& destRect, const IntSize& repeatSpacing)
{
    TRACE_EVENT0("skia", "Image::drawPattern");
    SkBitmap bitmap;
    if (!bitmapForCurrentFrame(&bitmap))
        return;

    FloatRect normSrcRect = floatSrcRect;

    normSrcRect.intersect(FloatRect(0, 0, bitmap.width(), bitmap.height()));
    if (destRect.isEmpty() || normSrcRect.isEmpty())
        return; // nothing to draw

    SkMatrix localMatrix;
    // We also need to translate it such that the origin of the pattern is the
    // origin of the destination rect, which is what WebKit expects. Skia uses
    // the coordinate system origin as the base for the pattern. If WebKit wants
    // a shifted image, it will shift it from there using the localMatrix.
    const float adjustedX = phase.x() + normSrcRect.x() * scale.width();
    const float adjustedY = phase.y() + normSrcRect.y() * scale.height();
    localMatrix.setTranslate(SkFloatToScalar(adjustedX), SkFloatToScalar(adjustedY));

    // Because no resizing occurred, the shader transform should be
    // set to the pattern's transform, which just includes scale.
    localMatrix.preScale(scale.width(), scale.height());

    SkBitmap bitmapToPaint;
    bitmap.extractSubset(&bitmapToPaint, enclosingIntRect(normSrcRect));
    if (!repeatSpacing.isZero()) {
        SkScalar ctmScaleX = 1.0;
        SkScalar ctmScaleY = 1.0;

        if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) {
            AffineTransform ctm = context->getCTM();
            ctmScaleX = ctm.xScale();
            ctmScaleY = ctm.yScale();
        }

        bitmapToPaint = createBitmapWithSpace(
            bitmapToPaint,
            repeatSpacing.width() * ctmScaleX / scale.width(),
            repeatSpacing.height() * ctmScaleY / scale.height());
    }
    RefPtr<SkShader> shader = adoptRef(SkShader::CreateBitmapShader(bitmapToPaint, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix));

    bool isLazyDecoded = DeferredImageDecoder::isLazyDecoded(bitmap);
    {
        SkPaint paint;
        int initialSaveCount = context->preparePaintForDrawRectToRect(&paint, floatSrcRect,
            destRect, compositeOp, !bitmap.isOpaque(), isLazyDecoded, bitmap.isImmutable());
        paint.setShader(shader.get());
        context->drawRect(destRect, paint);
        context->canvas()->restoreToCount(initialSaveCount);
    }

    if (isLazyDecoded)
        PlatformInstrumentation::didDrawLazyPixelRef(bitmap.getGenerationID());
}

void Image::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio)
{
    intrinsicRatio = size();
    intrinsicWidth = Length(intrinsicRatio.width(), Fixed);
    intrinsicHeight = Length(intrinsicRatio.height(), Fixed);
}

PassRefPtr<Image> Image::imageForDefaultFrame()
{
    RefPtr<Image> image(this);

    return image.release();
}

bool Image::bitmapForCurrentFrame(SkBitmap* bitmap)
{
    return false;
}

PassRefPtr<SkImage> Image::skImage()
{
    return nullptr;
}

} // namespace blink


text:
use command::{Command, Query};
use command::Command::LogicalCount;
use std::collections::HashMap;
use command_query::CommandQuery;
use queryable::Queryable;
use command_line::CommandLine;
use commandable::Commandable;
use extendable::Extendable;
use request_cancellable::RequestCancellable;
use request_timeoutable::RequestTimeoutable;
use types::range_filter_type::RangeFilterType;

#[derive(Clone, PartialEq, Eq, Debug)]
pub struct LogicalCountCommand {
    command: Command,
    logical_table: String,
    shard_key: String,
    arguments: HashMap<String, String>,
}

impl Default for LogicalCountCommand {
    fn default() -> LogicalCountCommand {
        LogicalCountCommand {
            command: LogicalCount,
            logical_table: "".to_string(),
            shard_key: "".to_string(),
            arguments: HashMap::new(),
        }
    }
}

impl LogicalCountCommand {
    pub fn new(logical_table: String, shard_key: String) -> LogicalCountCommand {
        LogicalCountCommand {
            logical_table: logical_table,
            shard_key: shard_key,
            ..LogicalCountCommand::default()
        }
    }

    pub fn filter(mut self, filter: String) -> LogicalCountCommand {
        let encoded = format!("'{}'", filter);
        self.arguments.insert("filter".to_string(), encoded.to_owned());
        self
    }

    pub fn min(mut self, min: String) -> LogicalCountCommand {
        let encoded = format!("'{}'", min);
        self.arguments.insert("min".to_string(), encoded.to_owned());
        self
    }

    pub fn min_border(mut self, border: RangeFilterType) -> LogicalCountCommand {
        let encoded = format!("'{}'", border);
        self.arguments.insert("min_border".to_string(), encoded.to_owned());
        self
    }

    pub fn max(mut self, max: String) -> LogicalCountCommand {
        let encoded = format!("'{}'", max);
        self.arguments.insert("max".to_string(), encoded.to_owned());
        self
    }

    pub fn max_border(mut self, border: RangeFilterType) -> LogicalCountCommand {
        let encoded = format!("'{}'", border);
        self.arguments.insert("max_border".to_string(), encoded.to_owned());
        self
    }

    pub fn build(self) -> (Command, Query) {
        let mut query: Query = vec![("logical_table".to_string(), self.logical_table),
                                    ("shard_key".to_string(), self.shard_key)];
        for (key, value) in &self.arguments {
            query.push((key.to_owned(), value.to_owned()));
        }
        (LogicalCount, query)
    }
}

impl Queryable for LogicalCountCommand {
    fn to_query(self) -> String {
        let (command, query) = self.build();
        let mut command = CommandQuery::new(command, query);
        command.encode()
    }
}

impl Commandable for LogicalCountCommand {
    fn to_command(self) -> String {
        let (command, query) = self.build();
        let mut command = CommandLine::new(command, query);
        command.encode()
    }
}

extendable!(LogicalCountCommand);
request_cancellable!(LogicalCountCommand);
request_timeoutable!(LogicalCountCommand);

#[cfg(test)]
mod test {
    use super::*;
    use command::Query;
    use command::Command::LogicalCount;
    use std::collections::HashMap;
    use queryable::Queryable;
    use commandable::Commandable;
    use extendable::Extendable;
    use types::range_filter_type::RangeFilterType::{Exclude, Include};

    #[test]
    fn test_new() {
        let logical_shard_list = LogicalCountCommand::new("Logs".to_string(),
                                                          "timestamp".to_string());
        let expected = LogicalCountCommand {
            command: LogicalCount,
            logical_table: "Logs".to_string(),
            shard_key: "timestamp".to_string(),
            arguments: HashMap::new(),
        };
        assert_eq!(expected, logical_shard_list);
    }

    #[test]
    fn test_filter() {
        let select = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string())
            .filter("output_column @ \"type_safe\"".to_string());
        let mut arg: HashMap<String, String> = HashMap::new();
        arg.insert("filter".to_string(),
                   "'output_column @ \"type_safe\"'".to_string());
        let expected = LogicalCountCommand {
            command: LogicalCount,
            logical_table: "Logs".to_string(),
            shard_key: "timestamp".to_string(),
            arguments: arg,
        };
        assert_eq!(expected, select);
    }

    #[test]
    fn test_min() {
        let select = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string())
            .min("2016/09/04 00:00:00".to_string());
        let mut arg: HashMap<String, String> = HashMap::new();
        arg.insert("min".to_string(), "'2016/09/04 00:00:00'".to_string());
        let expected = LogicalCountCommand {
            command: LogicalCount,
            logical_table: "Logs".to_string(),
            shard_key: "timestamp".to_string(),
            arguments: arg,
        };
        assert_eq!(expected, select);
    }

    #[test]
    fn test_min_border() {
        let select = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string())
            .min("2016/09/04 00:00:00".to_string())
            .min_border(Exclude);
        let mut arg: HashMap<String, String> = HashMap::new();
        arg.insert("min".to_string(), "'2016/09/04 00:00:00'".to_string());
        arg.insert("min_border".to_string(), "'exclude'".to_string());
        let expected = LogicalCountCommand {
            command: LogicalCount,
            logical_table: "Logs".to_string(),
            shard_key: "timestamp".to_string(),
            arguments: arg,
        };
        assert_eq!(expected, select);
    }

    #[test]
    fn test_max() {
        let select = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string())
            .max("2016/09/04 00:00:00".to_string());
        let mut arg: HashMap<String, String> = HashMap::new();
        arg.insert("max".to_string(), "'2016/09/04 00:00:00'".to_string());
        let expected = LogicalCountCommand {
            command: LogicalCount,
            logical_table: "Logs".to_string(),
            shard_key: "timestamp".to_string(),
            arguments: arg,
        };
        assert_eq!(expected, select);
    }

    #[test]
    fn test_max_border() {
        let select = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string())
            .max("2016/09/04 00:00:00".to_string())
            .max_border(Include);
        let mut arg: HashMap<String, String> = HashMap::new();
        arg.insert("max".to_string(), "'2016/09/04 00:00:00'".to_string());
        arg.insert("max_border".to_string(), "'include'".to_string());
        let expected = LogicalCountCommand {
            command: LogicalCount,
            logical_table: "Logs".to_string(),
            shard_key: "timestamp".to_string(),
            arguments: arg,
        };
        assert_eq!(expected, select);
    }

    #[test]
    fn test_build() {
        let actual = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string()).build();
        let expected_query: Query = vec![("logical_table".to_string(), "Logs".to_string()),
                                         ("shard_key".to_string(), "timestamp".to_string())];
        let expected = (LogicalCount, expected_query);
        assert_eq!(expected, actual);
    }

    #[test]
    fn test_queryable() {
        let query = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string())
            .to_query();
        let url_encoded = "/d/logical_count?logical_table=Logs&shard_key=timestamp";
        assert_eq!(url_encoded.to_string(), query);
    }

    #[test]
    fn test_commandable() {
        let query = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string())
            .to_command();
        let cli_encoded = "logical_count --logical_table Logs --shard_key timestamp";
        assert_eq!(cli_encoded.to_string(), query);
    }

    #[test]
    fn test_extendable() {
        let mut arg: HashMap<String, String> = HashMap::new();
        arg.insert("user".to_string(), "defined".to_string());
        let expected = LogicalCountCommand {
            command: LogicalCount,
            logical_table: "Logs".to_string(),
            shard_key: "timestamp".to_string(),
            arguments: arg.to_owned(),
        };
        let query = LogicalCountCommand::new("Logs".to_string(), "timestamp".to_string());
        unsafe {
            let extended = query.set_arguments(arg.to_owned());
            assert_eq!(expected, extended);
        }
    }
}


text:
<?php

final class DrydockLeaseStatus
  extends PhabricatorObjectStatus {

  const STATUS_PENDING = 'pending';
  const STATUS_ACQUIRED = 'acquired';
  const STATUS_ACTIVE = 'active';
  const STATUS_RELEASED = 'released';
  const STATUS_BROKEN = 'broken';
  const STATUS_DESTROYED = 'destroyed';

  public static function newStatusObject($key) {
    return new self($key, id(new self())->getStatusSpecification($key));
  }

  public static function getStatusMap() {
    $map = id(new self())->getStatusSpecifications();
    return ipull($map, 'name', 'key');
  }

  public static function getNameForStatus($status) {
    $map = id(new self())->getStatusSpecification($status);
    return $map['name'];
  }

  public static function getAllStatuses() {
    return array_keys(id(new self())->getStatusSpecifications());
  }

  public function isActivating() {
    return $this->getStatusProperty('isActivating');
  }

  public function isActive() {
    return ($this->getKey() === self::STATUS_ACTIVE);
  }

  public function canRelease() {
    return $this->getStatusProperty('isReleasable');
  }

  public function canReceiveCommands() {
    return $this->getStatusProperty('isCommandable');
  }

  protected function newStatusSpecifications() {
    return array(
      array(
        'key' => self::STATUS_PENDING,
        'name' => pht('Pending'),
        'icon' => 'fa-clock-o',
        'color' => 'blue',
        'isReleasable' => true,
        'isCommandable' => true,
        'isActivating' => true,
      ),
      array(
        'key' => self::STATUS_ACQUIRED,
        'name' => pht('Acquired'),
        'icon' => 'fa-refresh',
        'color' => 'blue',
        'isReleasable' => true,
        'isCommandable' => true,
        'isActivating' => true,
      ),
      array(
        'key' => self::STATUS_ACTIVE,
        'name' => pht('Active'),
        'icon' => 'fa-check',
        'color' => 'green',
        'isReleasable' => true,
        'isCommandable' => true,
        'isActivating' => false,
      ),
      array(
        'key' => self::STATUS_RELEASED,
        'name' => pht('Released'),
        'icon' => 'fa-circle-o',
        'color' => 'blue',
        'isReleasable' => false,
        'isCommandable' => false,
        'isActivating' => false,
      ),
      array(
        'key' => self::STATUS_BROKEN,
        'name' => pht('Broken'),
        'icon' => 'fa-times',
        'color' => 'indigo',
        'isReleasable' => true,
        'isCommandable' => true,
        'isActivating' => false,
      ),
      array(
        'key' => self::STATUS_DESTROYED,
        'name' => pht('Destroyed'),
        'icon' => 'fa-times',
        'color' => 'grey',
        'isReleasable' => false,
        'isCommandable' => false,
        'isActivating' => false,
      ),
    );
  }

  protected function newUnknownStatusSpecification($status) {
    return array(
      'isReleasable' => false,
      'isCommandable' => false,
      'isActivating' => false,
    );
  }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <properties>
    <git.base.url>scm:git:git@github.com</git.base.url>
    <git.branchout.name>StickySource</git.branchout.name>
    <git.url>${git.base.url}:${git.branchout.name}/${project.artifactId}.git</git.url>
    <project.build.sourceEncoding>US-ASCII</project.build.sourceEncoding>
    <target.dir>target</target.dir>
    <output.basedir>${basedir}</output.basedir>
  </properties>

  <prerequisites>
    <maven>3.5.0</maven>
  </prerequisites>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <build>
    <directory>${output.basedir}/${target.dir}</directory>
    <outputDirectory>${output.basedir}/${target.dir}/classes</outputDirectory>
    <testOutputDirectory>${output.basedir}/${target.dir}/test-classes</testOutputDirectory>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <preparationGoals>clean validate bounds:update javadoc:javadoc verify</preparationGoals>
          <goals>validate deploy</goals>
          <suppressCommitBeforeTag>false</suppressCommitBeforeTag>
          <localCheckout>true</localCheckout>
          <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.stickycode.plugins</groupId>
        <artifactId>bounds-maven-plugin</artifactId>
        <version>4.8</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <id>enforcer-verification</id>
            <!-- Invocation is defined by the release plugin goal set hence no executions -->
            <configuration>
              <rules>
                <requireReleaseDeps>
                  <message>
                    No SNAPSHOTs allowed in depedency tree or parents allowed when releasing!
                  </message>
                  <failWhenParentIsSnapshot>true</failWhenParentIsSnapshot>
                  <searchTransitive>true</searchTransitive>
                </requireReleaseDeps>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforcer-validation</id>
            <phase>validate</phase>
            <configuration>
              <rules>
                <!-- Don't allow accidental inclusion of commons logging or log4j -->

                <bannedDependencies>
                  <message>
                    Please ensure you exclude all dependencies on logging implementations
                  </message>
                  <excludes>
                    <exclude>commons-logging</exclude>
                    <exclude>commons-logging-api</exclude>
                    <exclude>log4j:log4j</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <generateBackupPoms>false</generateBackupPoms>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <!-- Make sure eclipse outputs to a different directory otherwise the builders will clash with command line. -->
      <id>running-in-eclipse</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <properties>
        <target.dir>target-eclipse</target.dir>
      </properties>
    </profile>

    <profile>
      <id>sign-release-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>promote-to-central</id>
      <activation>
        <property>
          <name>promoteTo</name>
          <value>central</value>
        </property>
      </activation>
      <distributionManagement>
        <repository>
          <uniqueVersion>false</uniqueVersion>
          <name>Sonatype Oss Staging</name>
          <id>sonatype-nexus-staging</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <uniqueVersion>true</uniqueVersion>
          <name>Sonatype Oss Snapshots</name>
          <id>sonatype-nexus-snapshots</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>1.4.1</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <id>tile-profile</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>
                        No SNAPSHOTs allowed in depedency tree or parents allowed when releasing!
                      </message>
                      <failWhenParentIsSnapshot>true</failWhenParentIsSnapshot>
                      <searchTransitive>true</searchTransitive>
                    </requireReleaseDeps>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>


text:
using System;
using System.Diagnostics;
using Microsoft.PythonTools.Parsing;
using Microsoft.VisualStudio.Debugger;
using Microsoft.VisualStudio.Debugger.CallStack;
using Microsoft.VisualStudio.Debugger.Evaluation;

namespace Microsoft.PythonTools.DkmDebugger.Proxies.Structs {
    internal class PyFrameObject : PyVarObject {
        public class Fields_27_35 {
            public StructField<PointerProxy<PyCodeObject>> f_code;
            public StructField<PointerProxy<PyDictObject>> f_globals;
            public StructField<PointerProxy<PyDictObject>> f_locals;
            public StructField<Int32Proxy> f_lineno;
            public StructField<ArrayProxy<PointerProxy<PyObject>>> f_localsplus;
        }

        public class Fields_36 {
            public StructField<PointerProxy<PyFrameObject>> f_back;
            public StructField<PointerProxy<PyCodeObject>> f_code;
            public StructField<PointerProxy<PyDictObject>> f_globals;
            public StructField<PointerProxy<PyDictObject>> f_locals;
            public StructField<Int32Proxy> f_lineno;
            public StructField<ArrayProxy<PointerProxy<PyObject>>> f_localsplus;
        }

        private readonly object _fields;

        public PyFrameObject(DkmProcess process, ulong address)
            : base(process, address) {
            var pythonInfo = process.GetPythonRuntimeInfo();
            if (pythonInfo.LanguageVersion <= PythonLanguageVersion.V35) {
                Fields_27_35 fields;
                InitializeStruct(this, out fields);
                _fields = fields;
            } else {
                Fields_36 fields;
                InitializeStruct(this, out fields);
                _fields = fields;
            }
            CheckPyType<PyFrameObject>();
        }

        private static bool IsInEvalFrame(DkmStackWalkFrame frame) {
            var process = frame.Process;
            var pythonInfo = process.GetPythonRuntimeInfo();
            ulong addr = 0;
            if (pythonInfo.LanguageVersion <= PythonLanguageVersion.V35) {
                if (frame.ModuleInstance == pythonInfo.DLLs.Python) {
                    addr = pythonInfo.DLLs.Python.GetFunctionAddress("PyEval_EvalFrameEx");
                }
            } else {
                if (frame.ModuleInstance == pythonInfo.DLLs.DebuggerHelper) {
                    addr = pythonInfo.DLLs.DebuggerHelper.GetFunctionAddress("EvalFrameFunc");
                }
            }

            if (addr == 0) {
                return false;
            }

            return frame.InstructionAddress.IsInSameFunction(process.CreateNativeInstructionAddress(addr));
        }

        public static unsafe PyFrameObject TryCreate(DkmStackWalkFrame frame) {
            var process = frame.Process;

            if (frame.InstructionAddress == null) {
                return null;
            }
            if (frame.RuntimeInstance.Id.RuntimeType != Guids.PythonRuntimeTypeGuid && !IsInEvalFrame(frame)) {
                return null;
            }

            var cppLanguage = DkmLanguage.Create("C++", new DkmCompilerId(Guids.MicrosoftVendorGuid, Guids.CppLanguageGuid));
            var inspectionSession = DkmInspectionSession.Create(process, null);
            var inspectionContext = DkmInspectionContext.Create(inspectionSession, process.GetNativeRuntimeInstance(), frame.Thread, 0,
                DkmEvaluationFlags.TreatAsExpression | DkmEvaluationFlags.NoSideEffects, DkmFuncEvalFlags.None, 10, cppLanguage, null);

            CppExpressionEvaluator cppEval;
            try {
                cppEval = new CppExpressionEvaluator(inspectionContext, frame);
            } catch (ArgumentException) {
                Debug.Fail("Failed to create C++ expression evaluator while obtaining PyFrameObject from a native frame.");
                return null;
            }

            ulong framePtr;
            try {
                framePtr = cppEval.EvaluateUInt64("f");
            } catch (CppEvaluationException) {
                Debug.Fail("Failed to evaluate the 'f' parameter to PyEval_EvalFrameEx while obtaining PyFrameObject from a native frame.");
                return null;
            }

            return new PyFrameObject(frame.Process, framePtr);
        }

        public PointerProxy<PyFrameObject> f_back {
            get { return GetFieldProxy((_fields as Fields_36)?.f_back); }
        }

        public PointerProxy<PyCodeObject> f_code {
            get { return GetFieldProxy((_fields as Fields_36)?.f_code ?? (_fields as Fields_27_35)?.f_code); }
        }

        public PointerProxy<PyDictObject> f_globals {
            get { return GetFieldProxy((_fields as Fields_36)?.f_globals ?? (_fields as Fields_27_35)?.f_globals); }
        }

        public PointerProxy<PyDictObject> f_locals {
            get { return GetFieldProxy((_fields as Fields_36)?.f_locals ?? (_fields as Fields_27_35)?.f_locals); }
        }

        public Int32Proxy f_lineno {
            get { return GetFieldProxy((_fields as Fields_36)?.f_lineno ?? (_fields as Fields_27_35)?.f_lineno); }
        }

        public ArrayProxy<PointerProxy<PyObject>> f_localsplus {
            get { return GetFieldProxy((_fields as Fields_36)?.f_localsplus ?? (_fields as Fields_27_35)?.f_localsplus); }
        }

    }
}


text:
ACCEPTED

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

#### Published in
Geobios, Lyon 13 (1): 62.

#### Original name
null

### Remarks
null


text:
using System.Drawing;
using System.Drawing.Imaging;

namespace Lski.Toolbox.ImageEditing {

    public static class ImageExtensions {

        static ImageExtensions() {
            _resizer = new ImageResizer();
        }

        private static ImageResizer _resizer { get; set; }

        public static Image Resize(this Image image, int size) {
            return _resizer.Resize(image, size);
        }

        public static Image Resize(this Image image, Size size, bool preserveAspectRatio = true) {
            return _resizer.Resize(image, size, preserveAspectRatio);
        }

        public static ImageFormat SaveFormat(this Image img) {
            return _resizer.SaveFormat(img);
        }
    }
}