text:
"""

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: 1.0.0

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient

class ProductsApi(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def create_new(self, **kwargs):
        """
        Creates a new Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_new(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ProductRest body:
        :return: ProductSingleton
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.create_new_with_http_info(**kwargs)
        else:
            (data) = self.create_new_with_http_info(**kwargs)
            return data

    def create_new_with_http_info(self, **kwargs):
        """
        Creates a new Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_new_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param ProductRest body:
        :return: ProductSingleton
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_new" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/products', 'POST',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='ProductSingleton',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_all(self, **kwargs):
        """
        Gets all Products

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_all(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int page_index: Page Index
        :param int page_size: Pagination size
        :param str sort: Sorting RSQL
        :param str q: RSQL Query
        :return: ProductPage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_all_with_http_info(**kwargs)
        else:
            (data) = self.get_all_with_http_info(**kwargs)
            return data

    def get_all_with_http_info(self, **kwargs):
        """
        Gets all Products

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_all_with_http_info(callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int page_index: Page Index
        :param int page_size: Pagination size
        :param str sort: Sorting RSQL
        :param str q: RSQL Query
        :return: ProductPage
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['page_index', 'page_size', 'sort', 'q']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_all" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'page_index' in params:
            query_params.append(('pageIndex', params['page_index']))
        if 'page_size' in params:
            query_params.append(('pageSize', params['page_size']))
        if 'sort' in params:
            query_params.append(('sort', params['sort']))
        if 'q' in params:
            query_params.append(('q', params['q']))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/products', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='ProductPage',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_product_versions(self, id, **kwargs):
        """
        Get all versions for a Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_product_versions(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: Product id (required)
        :param int page_index: Page Index
        :param int page_size: Pagination size
        :param str sort: Sorting RSQL
        :param str q: RSQL Query
        :return: ProductVersionPage
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_product_versions_with_http_info(id, **kwargs)
        else:
            (data) = self.get_product_versions_with_http_info(id, **kwargs)
            return data

    def get_product_versions_with_http_info(self, id, **kwargs):
        """
        Get all versions for a Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_product_versions_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: Product id (required)
        :param int page_index: Page Index
        :param int page_size: Pagination size
        :param str sort: Sorting RSQL
        :param str q: RSQL Query
        :return: ProductVersionPage
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'page_index', 'page_size', 'sort', 'q']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_product_versions" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_product_versions`")

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = []
        if 'page_index' in params:
            query_params.append(('pageIndex', params['page_index']))
        if 'page_size' in params:
            query_params.append(('pageSize', params['page_size']))
        if 'sort' in params:
            query_params.append(('sort', params['sort']))
        if 'q' in params:
            query_params.append(('q', params['q']))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/products/{id}/product-versions', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='ProductVersionPage',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def get_specific(self, id, **kwargs):
        """
        Get specific Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_specific(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: Product id (required)
        :return: ProductSingleton
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.get_specific_with_http_info(id, **kwargs)
        else:
            (data) = self.get_specific_with_http_info(id, **kwargs)
            return data

    def get_specific_with_http_info(self, id, **kwargs):
        """
        Get specific Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.get_specific_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: Product id (required)
        :return: ProductSingleton
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_specific" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `get_specific`")

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/products/{id}', 'GET',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type='ProductSingleton',
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)

    def update(self, id, **kwargs):
        """
        Updates an existing Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: Product id (required)
        :param ProductRest body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('callback'):
            return self.update_with_http_info(id, **kwargs)
        else:
            (data) = self.update_with_http_info(id, **kwargs)
            return data

    def update_with_http_info(self, id, **kwargs):
        """
        Updates an existing Product

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_with_http_info(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: Product id (required)
        :param ProductRest body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'body']
        all_params.append('callback')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `update`")

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = []

        return self.api_client.call_api('/products/{id}', 'PUT',
                                        path_params,
                                        query_params,
                                        header_params,
                                        body=body_params,
                                        post_params=form_params,
                                        files=local_var_files,
                                        response_type=None,
                                        auth_settings=auth_settings,
                                        callback=params.get('callback'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'),
                                        collection_formats=collection_formats)


text:
$title@: Supported Browsers
$order: 4
$parent: /content/support/faqs.md
class: who

cta:
  title@: Next FAQ
  link_text@: AMP Overview
  link_url: /content/support/faqs/overview.md

---
{% set who = g.doc('/content/includes/who.yaml', locale=doc.locale) %}

{% for browser in who.browsers %}

    <amp-img width="75"
        height="75"
        layout="responsive"
        src="{{podspec.root}}{{browser.img}}"></amp-img>

{{browser.title}}

{% endfor %}

In general we support the latest two versions of major browsers like Chrome, Firefox, Edge, Safari and Opera. We support desktop, phone, tablet and the web view version of these respective browsers.

Beyond that, the core AMP library and built-in elements should aim for very wide browser support and we accept fixes for all browsers with market share greater than 1 percent.

In particular, we try to maintain "it might not be perfect but isn't broken"-support for the Android 4.0 system browser and Chrome 28+ on phones.

redpajama_set_name: RedPajamaGithub


text:
package brut.androlib.util;

import brut.common.BrutException;
import brut.util.AaptManager;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class AaptVersionTest {

    @Test
    public void testAapt2Iterations() throws BrutException {
        assertEquals(2, AaptManager.getAppVersionFromString("Android Asset Packaging Tool (aapt) 2:17"));
        assertEquals(2, AaptManager.getAppVersionFromString("Android Asset Packaging Tool (aapt) 2.17"));
        assertEquals(1, AaptManager.getAppVersionFromString("Android Asset Packaging Tool, v0.9"));
        assertEquals(1, AaptManager.getAppVersionFromString("Android Asset Packaging Tool, v0.2-2679779"));
    }
}


text:
package net.jp2p.container.factory;

public class FactoryException extends RuntimeException {
	private static final long serialVersionUID = -8597836283568092235L;

	public FactoryException() {
	}

	public FactoryException(String arg0) {
		super(arg0);
	}

	public FactoryException(Throwable arg0) {
		super(arg0);
	}

	public FactoryException(String arg0, Throwable arg1) {
		super(arg0, arg1);
	}

	public FactoryException(String arg0, Throwable arg1, boolean arg2,
			boolean arg3) {
		super(arg0, arg1, arg2, arg3);
	}

}


text: MySQL with configuration for OFM


text:
import {ParseSourceSpan} from '../parse_util';

import * as o from './output_ast';
import {SourceMapGenerator} from './source_map';

const _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
const _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
const _INDENT_WITH = '  ';
export const CATCH_ERROR_VAR = o.variable('error');
export const CATCH_STACK_VAR = o.variable('stack');

export abstract class OutputEmitter {
  abstract emitStatements(
      srcFilePath: string, genFilePath: string, stmts: o.Statement[], exportedVars: string[],
      preamble?: string): string;
}

class _EmittedLine {
  parts: string[] = [];
  srcSpans: ParseSourceSpan[] = [];
  constructor(public indent: number) {}
}

export class EmitterVisitorContext {
  static createRoot(exportedVars: string[]): EmitterVisitorContext {
    return new EmitterVisitorContext(exportedVars, 0);
  }

  private _lines: _EmittedLine[];
  private _classes: o.ClassStmt[] = [];

  constructor(private _exportedVars: string[], private _indent: number) {
    this._lines = [new _EmittedLine(_indent)];
  }

  private get _currentLine(): _EmittedLine { return this._lines[this._lines.length - 1]; }

  isExportedVar(varName: string): boolean { return this._exportedVars.indexOf(varName) !== -1; }

  println(from?: {sourceSpan?: ParseSourceSpan}|null, lastPart: string = ''): void {
    this.print(from, lastPart, true);
  }

  lineIsEmpty(): boolean { return this._currentLine.parts.length === 0; }

  print(from: {sourceSpan?: ParseSourceSpan}|null, part: string, newLine: boolean = false) {
    if (part.length > 0) {
      this._currentLine.parts.push(part);
      this._currentLine.srcSpans.push(from && from.sourceSpan || null);
    }
    if (newLine) {
      this._lines.push(new _EmittedLine(this._indent));
    }
  }

  removeEmptyLastLine() {
    if (this.lineIsEmpty()) {
      this._lines.pop();
    }
  }

  incIndent() {
    this._indent++;
    this._currentLine.indent = this._indent;
  }

  decIndent() {
    this._indent--;
    this._currentLine.indent = this._indent;
  }

  pushClass(clazz: o.ClassStmt) { this._classes.push(clazz); }

  popClass(): o.ClassStmt { return this._classes.pop(); }

  get currentClass(): o.ClassStmt {
    return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;
  }

  toSource(): string {
    return this.sourceLines
        .map(l => l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '')
        .join('\n');
  }

  toSourceMapGenerator(sourceFilePath: string, genFilePath: string, startsAtLine: number = 0):
      SourceMapGenerator {
    const map = new SourceMapGenerator(genFilePath);

    let firstOffsetMapped = false;
    const mapFirstOffsetIfNeeded = () => {
      if (!firstOffsetMapped) {
        // Add a single space so that tools won't try to load the file from disk.
        // Note: We are using virtual urls like `ng:///`, so we have to
        // provide a content here.
        map.addSource(sourceFilePath, ' ').addMapping(0, sourceFilePath, 0, 0);
        firstOffsetMapped = true;
      }
    };

    for (let i = 0; i < startsAtLine; i++) {
      map.addLine();
      mapFirstOffsetIfNeeded();
    }

    this.sourceLines.forEach((line, lineIdx) => {
      map.addLine();

      const spans = line.srcSpans;
      const parts = line.parts;
      let col0 = line.indent * _INDENT_WITH.length;
      let spanIdx = 0;
      // skip leading parts without source spans
      while (spanIdx < spans.length && !spans[spanIdx]) {
        col0 += parts[spanIdx].length;
        spanIdx++;
      }
      if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {
        firstOffsetMapped = true;
      } else {
        mapFirstOffsetIfNeeded();
      }

      while (spanIdx < spans.length) {
        const span = spans[spanIdx];
        const source = span.start.file;
        const sourceLine = span.start.line;
        const sourceCol = span.start.col;
        map.addSource(source.url, source.content)
            .addMapping(col0, source.url, sourceLine, sourceCol);

        col0 += parts[spanIdx].length;
        spanIdx++;

        // assign parts without span or the same span to the previous segment
        while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {
          col0 += parts[spanIdx].length;
          spanIdx++;
        }
      }
    });

    return map;
  }

  private get sourceLines(): _EmittedLine[] {
    if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {
      return this._lines.slice(0, -1);
    }
    return this._lines;
  }
}

export abstract class AbstractEmitterVisitor implements o.StatementVisitor, o.ExpressionVisitor {
  constructor(private _escapeDollarInStrings: boolean) {}

  visitExpressionStmt(stmt: o.ExpressionStatement, ctx: EmitterVisitorContext): any {
    stmt.expr.visitExpression(this, ctx);
    ctx.println(stmt, ';');
    return null;
  }

  visitReturnStmt(stmt: o.ReturnStatement, ctx: EmitterVisitorContext): any {
    ctx.print(stmt, `return `);
    stmt.value.visitExpression(this, ctx);
    ctx.println(stmt, ';');
    return null;
  }

  abstract visitCastExpr(ast: o.CastExpr, context: any): any;

  abstract visitDeclareClassStmt(stmt: o.ClassStmt, ctx: EmitterVisitorContext): any;

  visitIfStmt(stmt: o.IfStmt, ctx: EmitterVisitorContext): any {
    ctx.print(stmt, `if (`);
    stmt.condition.visitExpression(this, ctx);
    ctx.print(stmt, `) {`);
    const hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;
    if (stmt.trueCase.length <= 1 && !hasElseCase) {
      ctx.print(stmt, ` `);
      this.visitAllStatements(stmt.trueCase, ctx);
      ctx.removeEmptyLastLine();
      ctx.print(stmt, ` `);
    } else {
      ctx.println();
      ctx.incIndent();
      this.visitAllStatements(stmt.trueCase, ctx);
      ctx.decIndent();
      if (hasElseCase) {
        ctx.println(stmt, `} else {`);
        ctx.incIndent();
        this.visitAllStatements(stmt.falseCase, ctx);
        ctx.decIndent();
      }
    }
    ctx.println(stmt, `}`);
    return null;
  }

  abstract visitTryCatchStmt(stmt: o.TryCatchStmt, ctx: EmitterVisitorContext): any;

  visitThrowStmt(stmt: o.ThrowStmt, ctx: EmitterVisitorContext): any {
    ctx.print(stmt, `throw `);
    stmt.error.visitExpression(this, ctx);
    ctx.println(stmt, `;`);
    return null;
  }
  visitCommentStmt(stmt: o.CommentStmt, ctx: EmitterVisitorContext): any {
    const lines = stmt.comment.split('\n');
    lines.forEach((line) => { ctx.println(stmt, `// ${line}`); });
    return null;
  }
  abstract visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any;

  visitWriteVarExpr(expr: o.WriteVarExpr, ctx: EmitterVisitorContext): any {
    const lineWasEmpty = ctx.lineIsEmpty();
    if (!lineWasEmpty) {
      ctx.print(expr, '(');
    }
    ctx.print(expr, `${expr.name} = `);
    expr.value.visitExpression(this, ctx);
    if (!lineWasEmpty) {
      ctx.print(expr, ')');
    }
    return null;
  }
  visitWriteKeyExpr(expr: o.WriteKeyExpr, ctx: EmitterVisitorContext): any {
    const lineWasEmpty = ctx.lineIsEmpty();
    if (!lineWasEmpty) {
      ctx.print(expr, '(');
    }
    expr.receiver.visitExpression(this, ctx);
    ctx.print(expr, `[`);
    expr.index.visitExpression(this, ctx);
    ctx.print(expr, `] = `);
    expr.value.visitExpression(this, ctx);
    if (!lineWasEmpty) {
      ctx.print(expr, ')');
    }
    return null;
  }
  visitWritePropExpr(expr: o.WritePropExpr, ctx: EmitterVisitorContext): any {
    const lineWasEmpty = ctx.lineIsEmpty();
    if (!lineWasEmpty) {
      ctx.print(expr, '(');
    }
    expr.receiver.visitExpression(this, ctx);
    ctx.print(expr, `.${expr.name} = `);
    expr.value.visitExpression(this, ctx);
    if (!lineWasEmpty) {
      ctx.print(expr, ')');
    }
    return null;
  }
  visitInvokeMethodExpr(expr: o.InvokeMethodExpr, ctx: EmitterVisitorContext): any {
    expr.receiver.visitExpression(this, ctx);
    let name = expr.name;
    if (expr.builtin != null) {
      name = this.getBuiltinMethodName(expr.builtin);
      if (name == null) {
        // some builtins just mean to skip the call.
        return null;
      }
    }
    ctx.print(expr, `.${name}(`);
    this.visitAllExpressions(expr.args, ctx, `,`);
    ctx.print(expr, `)`);
    return null;
  }

  abstract getBuiltinMethodName(method: o.BuiltinMethod): string;

  visitInvokeFunctionExpr(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext): any {
    expr.fn.visitExpression(this, ctx);
    ctx.print(expr, `(`);
    this.visitAllExpressions(expr.args, ctx, ',');
    ctx.print(expr, `)`);
    return null;
  }
  visitReadVarExpr(ast: o.ReadVarExpr, ctx: EmitterVisitorContext): any {
    let varName = ast.name;
    if (ast.builtin != null) {
      switch (ast.builtin) {
        case o.BuiltinVar.Super:
          varName = 'super';
          break;
        case o.BuiltinVar.This:
          varName = 'this';
          break;
        case o.BuiltinVar.CatchError:
          varName = CATCH_ERROR_VAR.name;
          break;
        case o.BuiltinVar.CatchStack:
          varName = CATCH_STACK_VAR.name;
          break;
        default:
          throw new Error(`Unknown builtin variable ${ast.builtin}`);
      }
    }
    ctx.print(ast, varName);
    return null;
  }
  visitInstantiateExpr(ast: o.InstantiateExpr, ctx: EmitterVisitorContext): any {
    ctx.print(ast, `new `);
    ast.classExpr.visitExpression(this, ctx);
    ctx.print(ast, `(`);
    this.visitAllExpressions(ast.args, ctx, ',');
    ctx.print(ast, `)`);
    return null;
  }

  visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): any {
    const value = ast.value;
    if (typeof value === 'string') {
      ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));
    } else {
      ctx.print(ast, `${value}`);
    }
    return null;
  }

  abstract visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any;

  visitConditionalExpr(ast: o.ConditionalExpr, ctx: EmitterVisitorContext): any {
    ctx.print(ast, `(`);
    ast.condition.visitExpression(this, ctx);
    ctx.print(ast, '? ');
    ast.trueCase.visitExpression(this, ctx);
    ctx.print(ast, ': ');
    ast.falseCase.visitExpression(this, ctx);
    ctx.print(ast, `)`);
    return null;
  }
  visitNotExpr(ast: o.NotExpr, ctx: EmitterVisitorContext): any {
    ctx.print(ast, '!');
    ast.condition.visitExpression(this, ctx);
    return null;
  }
  abstract visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any;
  abstract visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, context: any): any;

  visitBinaryOperatorExpr(ast: o.BinaryOperatorExpr, ctx: EmitterVisitorContext): any {
    let opStr: string;
    switch (ast.operator) {
      case o.BinaryOperator.Equals:
        opStr = '==';
        break;
      case o.BinaryOperator.Identical:
        opStr = '===';
        break;
      case o.BinaryOperator.NotEquals:
        opStr = '!=';
        break;
      case o.BinaryOperator.NotIdentical:
        opStr = '!==';
        break;
      case o.BinaryOperator.And:
        opStr = '&&';
        break;
      case o.BinaryOperator.Or:
        opStr = '||';
        break;
      case o.BinaryOperator.Plus:
        opStr = '+';
        break;
      case o.BinaryOperator.Minus:
        opStr = '-';
        break;
      case o.BinaryOperator.Divide:
        opStr = '/';
        break;
      case o.BinaryOperator.Multiply:
        opStr = '*';
        break;
      case o.BinaryOperator.Modulo:
        opStr = '%';
        break;
      case o.BinaryOperator.Lower:
        opStr = '<';
        break;
      case o.BinaryOperator.LowerEquals:
        opStr = '<=';
        break;
      case o.BinaryOperator.Bigger:
        opStr = '>';
        break;
      case o.BinaryOperator.BiggerEquals:
        opStr = '>=';
        break;
      default:
        throw new Error(`Unknown operator ${ast.operator}`);
    }
    ctx.print(ast, `(`);
    ast.lhs.visitExpression(this, ctx);
    ctx.print(ast, ` ${opStr} `);
    ast.rhs.visitExpression(this, ctx);
    ctx.print(ast, `)`);
    return null;
  }

  visitReadPropExpr(ast: o.ReadPropExpr, ctx: EmitterVisitorContext): any {
    ast.receiver.visitExpression(this, ctx);
    ctx.print(ast, `.`);
    ctx.print(ast, ast.name);
    return null;
  }
  visitReadKeyExpr(ast: o.ReadKeyExpr, ctx: EmitterVisitorContext): any {
    ast.receiver.visitExpression(this, ctx);
    ctx.print(ast, `[`);
    ast.index.visitExpression(this, ctx);
    ctx.print(ast, `]`);
    return null;
  }
  visitLiteralArrayExpr(ast: o.LiteralArrayExpr, ctx: EmitterVisitorContext): any {
    const useNewLine = ast.entries.length > 1;
    ctx.print(ast, `[`, useNewLine);
    ctx.incIndent();
    this.visitAllExpressions(ast.entries, ctx, ',', useNewLine);
    ctx.decIndent();
    ctx.print(ast, `]`, useNewLine);
    return null;
  }
  visitLiteralMapExpr(ast: o.LiteralMapExpr, ctx: EmitterVisitorContext): any {
    const useNewLine = ast.entries.length > 1;
    ctx.print(ast, `{`, useNewLine);
    ctx.incIndent();
    this.visitAllObjects(entry => {
      ctx.print(ast, `${escapeIdentifier(entry.key, this._escapeDollarInStrings, entry.quoted)}: `);
      entry.value.visitExpression(this, ctx);
    }, ast.entries, ctx, ',', useNewLine);
    ctx.decIndent();
    ctx.print(ast, `}`, useNewLine);
    return null;
  }
  visitCommaExpr(ast: o.CommaExpr, ctx: EmitterVisitorContext): any {
    ctx.print(ast, '(');
    this.visitAllExpressions(ast.parts, ctx, ',');
    ctx.print(ast, ')');
    return null;
  }
  visitAllExpressions(
      expressions: o.Expression[], ctx: EmitterVisitorContext, separator: string,
      newLine: boolean = false): void {
    this.visitAllObjects(
        expr => expr.visitExpression(this, ctx), expressions, ctx, separator, newLine);
  }

  visitAllObjects<T>(
      handler: (t: T) => void, expressions: T[], ctx: EmitterVisitorContext, separator: string,
      newLine: boolean = false): void {
    for (let i = 0; i < expressions.length; i++) {
      if (i > 0) {
        ctx.print(null, separator, newLine);
      }
      handler(expressions[i]);
    }
    if (newLine) {
      ctx.println();
    }
  }

  visitAllStatements(statements: o.Statement[], ctx: EmitterVisitorContext): void {
    statements.forEach((stmt) => stmt.visitStatement(this, ctx));
  }
}

export function escapeIdentifier(
    input: string, escapeDollar: boolean, alwaysQuote: boolean = true): any {
  if (input == null) {
    return null;
  }
  const body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, (...match: string[]) => {
    if (match[0] == '$') {
      return escapeDollar ? '\\$' : '$';
    } else if (match[0] == '\n') {
      return '\\n';
    } else if (match[0] == '\r') {
      return '\\r';
    } else {
      return `\\${match[0]}`;
    }
  });
  const requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);
  return requiresQuotes ? `'${body}'` : body;
}

function _createIndent(count: number): string {
  let res = '';
  for (let i = 0; i < count; i++) {
    res += _INDENT_WITH;
  }
  return res;
}


text:
from . import gxapi_cy
from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref

### endblock ClassImports

### block Header
# NOTICE: The code generator will not replace the code in this block
### endblock Header

### block ClassImplementation
# NOTICE: Do not edit anything here, it is generated code
class GXIGRF(gxapi_cy.WrapIGRF):
    """
    GXIGRF class.

    International Geomagnetic Reference Field
    Methods to work with `GXIGRF <geosoft.gxapi.GXIGRF>` objects. The `GXIGRF <geosoft.gxapi.GXIGRF>` object
    contains data for the `GXIGRF <geosoft.gxapi.GXIGRF>` model of the geomagnetic
    reference field.
    """

    def __init__(self, handle=0):
        super(GXIGRF, self).__init__(GXContext._get_tls_geo(), handle)

    @classmethod
    def null(cls):
        """
        A null (undefined) instance of `GXIGRF <geosoft.gxapi.GXIGRF>`

        :returns: A null `GXIGRF <geosoft.gxapi.GXIGRF>`
        :rtype:   GXIGRF
        """
        return GXIGRF()

    def is_null(self):
        """
        Check if this is a null (undefined) instance

        :returns: True if this is a null (undefined) instance, False otherwise.
        :rtype:   bool
        """
        return self._internal_handle() == 0

# Miscellaneous

    def calc(self, el, lon, lat, str_val, inc, dec):
        """
        Calculate `GXIGRF <geosoft.gxapi.GXIGRF>` data for a given `GXIGRF <geosoft.gxapi.GXIGRF>` model.

        :param el:       Elevation (metres)
        :param lon:      Longitude (-180 to 180)
        :param lat:      Latitude  (-90 to 90) Returns
        :param str_val:  Field strength
        :param inc:      Field inclination
        :param dec:      Field declination
        :type  el:       float
        :type  lon:      float
        :type  lat:      float
        :type  str_val:  float_ref
        :type  inc:      float_ref
        :type  dec:      float_ref

        .. versionadded:: 5.0

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_

        **Note:** Calculate `GXIGRF <geosoft.gxapi.GXIGRF>` data (total field, inclination, and declination)
        for a given `GXIGRF <geosoft.gxapi.GXIGRF>` model. The model used will be the same as that
        obtained with `create <geosoft.gxapi.GXIGRF.create>`.
        """
        str_val.value, inc.value, dec.value = self._calc(el, lon, lat, str_val.value, inc.value, dec.value)

    def calc_vv(self, gv_vel, gv_vlon, gv_vlat, gv_vfs, gv_vinc, gv_vdec):
        """
        Calculate `GXIGRF <geosoft.gxapi.GXIGRF>` data `GXVV <geosoft.gxapi.GXVV>`'s for a given `GXIGRF <geosoft.gxapi.GXIGRF>` model.

        :param gv_vel:   Input elevation data (metres)
        :param gv_vlon:  Input longitude data (-180 to 180)
        :param gv_vlat:  Input latitude data  (-90 to 90)
        :param gv_vfs:   Output total field
        :param gv_vinc:  Output inclination
        :param gv_vdec:  Output declination
        :type  gv_vel:   GXVV
        :type  gv_vlon:  GXVV
        :type  gv_vlat:  GXVV
        :type  gv_vfs:   GXVV
        :type  gv_vinc:  GXVV
        :type  gv_vdec:  GXVV

        .. versionadded:: 5.0

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_

        **Note:** Calculate `GXIGRF <geosoft.gxapi.GXIGRF>` data (total field, inclination, and declination)
        for a given `GXIGRF <geosoft.gxapi.GXIGRF>` model. The model used will be the same as that
        obtained with `create <geosoft.gxapi.GXIGRF.create>`.
        All of the `GXVV <geosoft.gxapi.GXVV>`'s should be the same length. The function
        will abort if they are not.

        No assumption is made on what data types are contained by
        any of the `GXVV <geosoft.gxapi.GXVV>`'s. However, all total field, inclination, and
        declination values are internally calculated as real data.
        These values will be converted to the types contained in the
        output `GXVV <geosoft.gxapi.GXVV>`'s.
        """
        self._calc_vv(gv_vel, gv_vlon, gv_vlat, gv_vfs, gv_vinc, gv_vdec)

    @classmethod
    def create(cls, date, year, filename):
        """
        Create an `GXIGRF <geosoft.gxapi.GXIGRF>`.

        :param date:      Date required
        :param year:      Year of the `GXIGRF <geosoft.gxapi.GXIGRF>` model to use
        :param filename:  Name of the `GXIGRF <geosoft.gxapi.GXIGRF>` reference data file
        :type  date:      float
        :type  year:      int
        :type  filename:  str

        :returns:         `GXIGRF <geosoft.gxapi.GXIGRF>` Object
        :rtype:           GXIGRF

        .. versionadded:: 5.0

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_

        **Note:** If the year of the `GXIGRF <geosoft.gxapi.GXIGRF>` model is dummy, then
        the `GXIGRF <geosoft.gxapi.GXIGRF>` year nearest to the line's date will
        be used. Otherwise, the specified year is used.
        """
        ret_val = gxapi_cy.WrapIGRF._create(GXContext._get_tls_geo(), date, year, filename.encode())
        return GXIGRF(ret_val)

    @classmethod
    def date_range(cls, file_name, min, max):
        """
        Determine the range of years covered by an `GXIGRF <geosoft.gxapi.GXIGRF>` or DGRF file

        :param file_name:  Model data file name
        :param min:        Minimum year  (`rMAX <geosoft.gxapi.rMAX>` if none found)
        :param max:        Maximum year  (`rMIN <geosoft.gxapi.rMIN>` if none found)
        :type  file_name:  str
        :type  min:        float_ref
        :type  max:        float_ref

        .. versionadded:: 6.1

        **License:** `Geosoft End-User License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-end-user-lic>`_

        **Note:** This is useful when using a DGRF file, because the system is set
        up only to calculate for years within the date range, and will
        return an error otherwise.
        """
        min.value, max.value = gxapi_cy.WrapIGRF._date_range(GXContext._get_tls_geo(), file_name.encode(), min.value, max.value)

### endblock ClassImplementation
### block ClassExtend
# NOTICE: The code generator will not replace the code in this block
### endblock ClassExtend

### block Footer
# NOTICE: The code generator will not replace the code in this block
### endblock Footer


text:
<?php

namespace ATPCore\View\Helper\Form;

class Html extends \ATP\View\Helper
{
	public function __invoke($params)
	{
		$label = $params['label'];
		unset($params['label']);

		$text = isset($params['value']) ? $params['value'] : "";
		unset($params['value']);

		$text = str_replace(array('{','}'), array('\{', '\}'), $text);

		$attributes = \ATP\MapReduce::process(
			$params,
			function($item, $index){return "{$index}=\"{$item}\"";},
			new \ATP\Reducer\Concatenate(" ")
		);

		$html = "<label for=\"{$params['name']}\">{$label}</label>";
		$html .= "<textarea class=\"wysiwyg\" {$attributes}>{$text}</textarea>";

		return $html;
	}
}


text:
import { get } from "ember-metal/property_get";
import setProperties from "ember-metal/set_properties";
import { computed } from "ember-metal/computed";
import { Mixin } from "ember-metal/mixin";
import EmberError from "ember-metal/error";

var not = computed.not;
var or = computed.or;

/**
  @module ember
  @submodule ember-runtime
 */

function tap(proxy, promise) {
  setProperties(proxy, {
    isFulfilled: false,
    isRejected: false
  });

  return promise.then(function(value) {
    setProperties(proxy, {
      content: value,
      isFulfilled: true
    });
    return value;
  }, function(reason) {
    setProperties(proxy, {
      reason: reason,
      isRejected: true
    });
    throw reason;
  }, "Ember: PromiseProxy");
}

/**
  A low level mixin making ObjectProxy, ObjectController or ArrayController's promise aware.

  ```javascript
  var ObjectPromiseController = Ember.ObjectController.extend(Ember.PromiseProxyMixin);

  var controller = ObjectPromiseController.create({
    promise: $.getJSON('/some/remote/data.json')
  });

  controller.then(function(json){
     // the json
  }, function(reason) {
     // the reason why you have no json
  });
  ```

  the controller has bindable attributes which
  track the promises life cycle

  ```javascript
  controller.get('isPending')   //=> true
  controller.get('isSettled')  //=> false
  controller.get('isRejected')  //=> false
  controller.get('isFulfilled') //=> false
  ```

  When the the $.getJSON completes, and the promise is fulfilled
  with json, the life cycle attributes will update accordingly.

  ```javascript
  controller.get('isPending')   //=> false
  controller.get('isSettled')   //=> true
  controller.get('isRejected')  //=> false
  controller.get('isFulfilled') //=> true
  ```

  As the controller is an ObjectController, and the json now its content,
  all the json properties will be available directly from the controller.

  ```javascript
  // Assuming the following json:
  {
    firstName: 'Stefan',
    lastName: 'Penner'
  }

  // both properties will accessible on the controller
  controller.get('firstName') //=> 'Stefan'
  controller.get('lastName')  //=> 'Penner'
  ```

  If the controller is backing a template, the attributes are
  bindable from within that template

  ```handlebars
  {{#if isPending}}
    loading...
  {{else}}
    firstName: {{firstName}}
    lastName: {{lastName}}
  {{/if}}
  ```
  @class Ember.PromiseProxyMixin
*/
export default Mixin.create({
  /**
    If the proxied promise is rejected this will contain the reason
    provided.

    @property reason
    @default null
  */
  reason:  null,

  /**
    Once the proxied promise has settled this will become `false`.

    @property isPending
    @default true
  */
  isPending:  not('isSettled').readOnly(),

  /**
    Once the proxied promise has settled this will become `true`.

    @property isSettled
    @default false
  */
  isSettled:  or('isRejected', 'isFulfilled').readOnly(),

  /**
    Will become `true` if the proxied promise is rejected.

    @property isRejected
    @default false
  */
  isRejected:  false,

  /**
    Will become `true` if the proxied promise is fulfilled.

    @property isFulfilled
    @default false
  */
  isFulfilled: false,

  /**
    The promise whose fulfillment value is being proxied by this object.

    This property must be specified upon creation, and should not be
    changed once created.

    Example:

    ```javascript
    Ember.ObjectController.extend(Ember.PromiseProxyMixin).create({
      promise: <thenable>
    });
    ```

    @property promise
  */
  promise: computed(function(key, promise) {
    if (arguments.length === 2) {
      return tap(this, promise);
    } else {
      throw new EmberError("PromiseProxy's promise must be set");
    }
  }),

  /**
    An alias to the proxied promise's `then`.

    See RSVP.Promise.then.

    @method then
    @param {Function} callback
    @return {RSVP.Promise}
  */
  then: promiseAlias('then'),

  /**
    An alias to the proxied promise's `catch`.

    See RSVP.Promise.catch.

    @method catch
    @param {Function} callback
    @return {RSVP.Promise}
    @since 1.3.0
  */
  'catch': promiseAlias('catch'),

  /**
    An alias to the proxied promise's `finally`.

    See RSVP.Promise.finally.

    @method finally
    @param {Function} callback
    @return {RSVP.Promise}
    @since 1.3.0
  */
  'finally': promiseAlias('finally')

});

function promiseAlias(name) {
  return function () {
    var promise = get(this, 'promise');
    return promise[name](...arguments);
  };
}


text:
<form name="frm-username" class="username-modal" ng-submit="submitForm(username.$valid)">

Set a username

			<input required type="text" ng-model="username" class="form-control" pattern=".{3,15}">

      3-15 characters. This name will appear when you send messages

			<button type="submit" class="btn btn-primary">Set username</button>

</form>


text:
<?php
// Copyright 2017 DAIMTO ([Linda Lawton](https://twitter.com/LindaLawtonDK)) :  [www.daimto.com](http://www.daimto.com/)
//
// 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.
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by DAIMTO-Google-apis-Sample-generator 1.0.0
//     Template File Name:  methodTemplate.tt
//     Build date: 2017-10-08
//     PHP generator version: 1.0.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// About
//
// Unofficial sample for the Monitoring v3 API for PHP.
// This sample is designed to be used with the Google PHP client library. (https://github.com/google/google-api-php-client)
//
// API Description: Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages.
// API Documentation Link https://cloud.google.com/monitoring/api/
//
// Discovery Doc  https://www.googleapis.com/discovery/v1/apis/monitoring/v3/rest
//
//------------------------------------------------------------------------------
// Installation
//
// The preferred method is via https://getcomposer.org. Follow the installation instructions https://getcomposer.org/doc/00-intro.md
// if you do not already have composer installed.
//
// Once composer is installed, execute the following command in your project root to install this library:
//
// composer require google/apiclient:^2.0
//
//------------------------------------------------------------------------------
// Load the Google API PHP Client Library.
require_once __DIR__ . '/vendor/autoload.php';
session_start();

/***************************************************
* Include this line for service account authencation.  Note: Not all APIs support service accounts.
//require_once __DIR__ . '/ServiceAccount.php';
* Include the following four lines Oauth2 authencation.
* require_once __DIR__ . '/Oauth2Authentication.php';
* $_SESSION['mainScript'] = basename($_SERVER['PHP_SELF']);   // Oauth2callback.php will return here.
* $client = getGoogleClient();
* $service = new Google_Service_Monitoring($client);
****************************************************/

// Option paramaters can be set as needed.
 $optParams = array(

  //'filter' => '[YourValue]',  // An optional filter describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label:resource.type = starts_with("gce_") AND resource.label:id

  //'pageToken' => '[YourValue]',  // If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

  //'pageSize' => '[YourValue]',  // A positive number that is the maximum number of results to return.
  'fields' => '*'
);
// Single Request.
$results = monitoredResourceDescriptorsListExample($service, $name, $optParams);

// Paginiation Example
do {
    if (!$results->getNextPageToken())
		break;

	$optParams['pageToken'] = $results->getNextPageToken();
	$results = filesListExample($service, $name, $optParams);
} while($results->getNextPageToken());

/**
* Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
* @service Authenticated Monitoring service.
* @optParams Optional paramaters are not required by a request.
* @name The project on which to execute the request. The format is "projects/{project_id_or_number}".
* @return ListMonitoredResourceDescriptorsResponse
*/
function monitoredResourceDescriptorsListExample($service, $name, $optParams)
{
	try
	{
		// Parameter validation.
		if ($service == null)
			throw new Exception("service is required.");
		if ($optParams == null)
			throw new Exception("optParams is required.");
		if (name == null)
			throw new Exception("name is required.");
		// Make the request and return the results.
		return $service->monitoredResourceDescriptors->ListMonitoredResourceDescriptors($name, $optParams);
	}
	catch (Exception $e)
	{
		print "An error occurred: " . $e->getMessage();
	}
}
?>


text:
#import <UIKit/UIKit.h>

@interface ViewController : UIViewController <UITextFieldDelegate, UITextViewDelegate>

@property (weak, nonatomic) IBOutlet UITextField *myTextField;
@property (weak, nonatomic) IBOutlet UITextView  *myTextView;

@end


text:
layout: post
title: Deployment Logs
date:   2014-10-31 12:38:28
position: 40
categories: walkthrough
summary: Watch deployments as they are executing and review previous deployment logs.

---
You can review your previous, current and pending deployments by going to the Deploy History page. One this page you'll see a list of your recent Deployments with an option to view the log detail page.

![Deploy History](/assets/deploy_history.png)

Your log details group by internal task (Pull Request, etc). If your deployment is still ongoing the page will update automatically as log data becomes available.

![Deploy Log](/assets/deploy_log.png)


text:
<?PHP
    $this->load->view("includes/Restaurant_Owner/header");
    $this->load->view("includes/Restaurant_Owner/sidebar");
?>

                     Back to Restaurant

Manage Restaurant Table

                        <form role="form" method="post" action='' enctype ="multipart/form-data" >

Seating Hours:

	Category	From	To	Max Cover	Largest Party Size	Booking Limit	Cover Count	Points	Deposit Amount

                                            <?php
                                                $weekdays = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday');

                                                foreach($weekdays as $weekday) {
                                                ?>

                                                    <?php echo ucfirst($weekday); ?>:
                                                    Breakfast
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_from"]:"";?>" name="seating_info_<?php echo $weekday;?>_from[]" class="timepicker">
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_to"]:"";?>" name="seating_info_<?php echo $weekday;?>_to[]"  class="timepicker">
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_max_cover"]:"";?>" name="seating_info_<?php echo $weekday;?>_max_cover[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_largest_party_size"]:"";?>" name="seating_info_<?php echo $weekday;?>_largest_party_size[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_booking_limit"]:"";?>" name="seating_info_<?php echo $weekday;?>_booking_limit[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_cover_count"]:"";?>" name="seating_info_<?php echo $weekday;?>_cover_count[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_point"]:"";?>" name="seating_info_<?php echo $weekday;?>_point[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[0])?$SeatingInfo[0][$weekday."_deposit"]:"";?>" name="seating_info_<?php echo $weekday;?>_deposit[]" >

                                                    Lunch
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_from"]:"";?>" name="seating_info_<?php echo $weekday;?>_from[]" class="timepicker">
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_to"]:"";?>" name="seating_info_<?php echo $weekday;?>_to[]"  class="timepicker">
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_max_cover"]:"";?>" name="seating_info_<?php echo $weekday;?>_max_cover[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_largest_party_size"]:"";?>" name="seating_info_<?php echo $weekday;?>_largest_party_size[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_booking_limit"]:"";?>" name="seating_info_<?php echo $weekday;?>_booking_limit[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_cover_count"]:"";?>" name="seating_info_<?php echo $weekday;?>_cover_count[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_point"]:"";?>" name="seating_info_<?php echo $weekday;?>_point[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[1])?$SeatingInfo[1][$weekday."_deposit"]:"";?>" name="seating_info_<?php echo $weekday;?>_deposit[]" >

                                                    Dinner
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_from"]:"";?>" name="seating_info_<?php echo $weekday;?>_from[]" class="timepicker">
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_to"]:"";?>" name="seating_info_<?php echo $weekday;?>_to[]"  class="timepicker">
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_max_cover"]:"";?>" name="seating_info_<?php echo $weekday;?>_max_cover[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_largest_party_size"]:"";?>" name="seating_info_<?php echo $weekday;?>_largest_party_size[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_booking_limit"]:"";?>" name="seating_info_<?php echo $weekday;?>_booking_limit[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_cover_count"]:"";?>" name="seating_info_<?php echo $weekday;?>_cover_count[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_point"]:"";?>" name="seating_info_<?php echo $weekday;?>_point[]" >
                                                    <input type="text" value="<?php echo isset($SeatingInfo[2])?$SeatingInfo[2][$weekday."_deposit"]:"";?>" name="seating_info_<?php echo $weekday;?>_deposit[]" >

                                                <?php
                                                }
                                            ?>

                                <input type="submit" name="btnsavetable" value="Save" class="btn btn-success">

                        </form>

<?PHP
    $this->load->view("includes/Restaurant_Owner/footer");
?>


text:
package org.drools.examples.traits;

import org.drools.factmodel.traits.TraitFactory;
import org.drools.io.impl.ClassPathResource;
import org.kie.KnowledgeBase;
import org.kie.KnowledgeBaseFactory;
import org.kie.builder.KnowledgeBuilder;
import org.kie.builder.KnowledgeBuilderFactory;
import org.kie.io.ResourceType;
import org.kie.runtime.StatefulKnowledgeSession;

import java.util.Collection;

public class TraitExample {

    private static StatefulKnowledgeSession getSession( String drl ) {

        KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kBuilder.add( new ClassPathResource( "org/drools/examples/traits/" + drl ), ResourceType.DRL );

        if ( kBuilder.hasErrors() ) {
            System.err.println( kBuilder.getErrors().toString() );
        }

        KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase();
        kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );

        return kBase.newStatefulKnowledgeSession();

    }

    public static void run( String demo ) {

        StatefulKnowledgeSession kSession = getSession( demo );

        kSession.fireAllRules();

        Collection c =  kSession.getObjects();
        System.out.println( "------------------------- " + c.size() + " ----------------------" );
        for ( Object o : c ) {
            System.out.println( " \t --- " + o );
        }
        System.out.println( "-----------------------------------------------------------------" );

        kSession.dispose();

    }

    public static void main( String[] args ) {

        run( "noTraits.drl" );

        run( "traitsDon.drl" );

        run( "multipleTraits.drl" );

        run( "traitsMixins.drl" );

        run( "traitsShed.drl" );

    }

}


text:
package pack1;

public class X {
    public void foo(X x) {}
}
class Y {}


text:
class SessionsController < ApplicationController
  def login
    # render 'login'
  end

  def signin
    @user = User.find_by(email: params[:user][:email])

    if @user && @user.authenticate(params[:user][:password])
      # redirect to members page
      session[:user_id] = @user.id
      redirect_to members_show_path
    else
      flash[:error] = "Login error"
      p "something went wrong"
      render 'login'
    end
  end

  def new
    @user = User.new
  end

  def create
    @user = User.new(allowed_params)

    if @user.save
      session[:user_id] = @user.id
      "successful user creation"
      redirect_to new_profile_path
    else
      flash[:notice] = "Error Signing Up"
    end
  end

  def edit
    @user = User.find_by(id: params[:id])
  end

  def update
    @user = User.find_by(id: params[:id])
    if @user.update_attributes(allowed_params)
      # redirect to user profile
      "user info updated successfully"
    else
      # display error and redirect to user profile
      "something went wrong"
    end
  end

  def destroy
    user = User.find_by(id: params[:id])
    if user.destroy
      redirect_to '/'
    else
      # display error
    end
  end

  def signout
    session.clear
    redirect_to '/'
  end

  private

    def allowed_params
      params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :user_type, :phone, :gender, :birth_date)
    end
end


text:
package menus

import (
	"sort"
	"strconv"
	"sync"

	"github.com/beevik/etree"
	"github.com/hexya-erp/hexya/src/actions"
)

// Registry is the menu Collection of the application
var (
	Registry     *Collection
	bootstrapMap map[string]*Menu
)

// A Collection is a hierarchical and sortable Collection of menus
type Collection struct {
	sync.RWMutex
	Menus        []*Menu
	menusMap     map[string]*Menu
	menusMapByID map[int64]*Menu
}

func (mc *Collection) Len() int {
	return len(mc.Menus)
}

func (mc *Collection) Swap(i, j int) {
	mc.Menus[i], mc.Menus[j] = mc.Menus[j], mc.Menus[i]
}

func (mc *Collection) Less(i, j int) bool {
	return mc.Menus[i].Sequence < mc.Menus[j].Sequence
}

// Add adds a menu to the menu Collection
func (mc *Collection) Add(m *Menu) {
	if m.Action != nil {
		m.HasAction = true
	}
	var targetCollection *Collection
	if m.Parent != nil {
		if m.Parent.Children == nil {
			m.Parent.Children = NewCollection()
		}
		targetCollection = m.Parent.Children
		m.Parent.HasChildren = true
	} else {
		targetCollection = mc
	}
	m.ParentCollection = targetCollection
	targetCollection.Menus = append(targetCollection.Menus, m)
	sort.Sort(targetCollection)

	// We add the menu to the Registry which is the top collection
	mc.Lock()
	defer mc.Unlock()
	Registry.menusMap[m.XMLID] = m
	Registry.menusMapByID[m.ID] = m
}

// GetByID returns the Menu with the given id
func (mc *Collection) GetByID(id int64) *Menu {
	mc.RLock()
	defer mc.RUnlock()
	return mc.menusMapByID[id]
}

// GetByXMLID returns the Menu with the given xmlid
func (mc *Collection) GetByXMLID(xmlid string) *Menu {
	mc.RLock()
	defer mc.RUnlock()
	return mc.menusMap[xmlid]
}

// All returns all menus recursively
func (mc *Collection) All() []*Menu {
	mc.RLock()
	defer mc.RUnlock()
	var res []*Menu
	for _, menu := range mc.menusMap {
		res = append(res, menu)
	}
	return res
}

// NewCollection returns a pointer to a new
// Collection instance
func NewCollection() *Collection {
	res := Collection{
		menusMap:     make(map[string]*Menu),
		menusMapByID: make(map[int64]*Menu),
	}
	return &res
}

// A Menu is the representation of a single menu item
type Menu struct {
	ID               int64
	XMLID            string
	Name             string
	ParentID         string
	Parent           *Menu
	ParentCollection *Collection
	Children         *Collection
	Sequence         uint8
	ActionID         string
	Action           *actions.Action
	HasChildren      bool
	HasAction        bool
	WebIcon          string
	names            map[string]string
}

// TranslatedName returns the translated name of this menu
// in the given language
func (m Menu) TranslatedName(lang string) string {
	res, ok := m.names[lang]
	if !ok {
		res = m.Name
	}
	return res
}

// LoadFromEtree reads the menu given etree.Element, creates or updates the menu
// and adds it to the menu registry if it not already.
func LoadFromEtree(element *etree.Element) {
	AddMenuToMapFromEtree(element, bootstrapMap)
}

// AddMenuToMapFromEtree reads the menu from the given element
// and adds it to the given map.
func AddMenuToMapFromEtree(element *etree.Element, mMap map[string]*Menu) map[string]*Menu {
	seq, _ := strconv.Atoi(element.SelectAttrValue("sequence", "10"))
	nextID := len(mMap) + 1
	menu := Menu{
		ID:       int64(nextID),
		XMLID:    element.SelectAttrValue("id", "NO_ID"),
		ActionID: element.SelectAttrValue("action", ""),
		Name:     element.SelectAttrValue("name", ""),
		ParentID: element.SelectAttrValue("parent", ""),
		WebIcon:  element.SelectAttrValue("web_icon", ""),
		Sequence: uint8(seq),
	}
	mMap[menu.XMLID] = &menu
	return mMap
}


text:
/* Slider
 *
 * Styling Slider mainly includes styling the Slider progress bar (dijitSliderProgressBar)
 *
 * Slider progress bar:
 * 1. Slider progress bar (default styling):
 * 		.dijitSliderProgressBarH - progress bar at the middle of horizontal slider
 * 		.dijitSliderLeftBumper - bar at the left of horizontal slider
 * 		.dijitSliderRightBumper - bar at the right of horizontal slider
 * 		.dijitSliderProgressBarV - progress bar at the middle of vertical slider
 * 		.dijitSliderTopBumper - bar at the top of vertical slider
 * 		.dijitSliderBottomtBumper - bar at the bottom of vertical slider
 *
 * 2. hovered Slider progress bar (ie, mouse hover on progress bar)
 * 		.dijitSliderHover .dijitSliderProgressBarH(horizontal) - hovered bar style: background, border
 *
 * 3. focused Slider progress bar (ie, mouse focused on progress bar)
 * 		.dijitSliderFocused .dijitSliderProgressBarH(horizontal) - focus bar style: background, border
 *
 * 4. disabled/read-only Slider progress bar
 * 		.dijitSliderDisabled .dijitSliderProgressBarH(horizontal) - bar styles when slider is disabled
 *
 *
 * Slider Thumbs:
 * 1. Slider Thumbs (default styling):
 * 		.dijitSliderImageHandleH / .dijitSliderImageHandleV - styles for the controller on the progress bar
 *
 * 2. hovered Slider Thumbs (ie, mouse hover on slider thumbs)
 * 		.dijitSliderHover .dijitSliderImageHandleH - hovered controller style
 *
 * 3. focused Slider progress bar (ie, mouse focused on slider thumbs)
 * 		.dijitSliderFocused .dijitSliderImageHandleV - focused controller style
 *
 *
 * Slider Increment/Decrement Buttons:
 * 1. Slider Increment/Decrement Buttons (default styling):
 * 		.dijitSliderDecrementIconH - decrement icon which lies at the left of horizontal slider
 * 		.dijitSliderIncrementIconH - increment icon which lies at the right of horizontal slider
 * 		.dijitSliderDecrementIconV - decrement icon which lies at the bottom of vertical slider
 * 		.dijitSliderIncrementIconV - increment icon which lies at the top of vertical slider
 *
 * 2. hovered Slider Increment/Decrement Buttons (mouse hover on the icons)
 * 		.dijitSliderHover .dijitSliderDecrementIconH - for background, border
 *
 * 3. active Slider Increment/Decrement Buttons (mouse down on the icons)
 * 		.dijitSliderActive .dijitSliderIncrementIconV - for background, border
 *
 * 4. disabled/read-only Slider Increment/Decrement Buttons
 * 		.dijitSliderDisabled .dijitSliderDecrementIconH - styles for the icons in disabled slider
 * 		.dijitSliderReadOnly .dijitSliderIncrementIconV - styles for the icons in read-only slider
 */

.claro .dijitSliderBar {
	border-style: solid;
	outline: 1px;
}
.claro .dijitSliderFocused .dijitSliderBar {
	border-color: #769dc0;
}
.claro .dijitSliderHover .dijitSliderBar {
	border-color: #769dc0;
}
.claro .dijitSliderDisabled .dijitSliderBar {
	background-image: none;
	border-color: #d3d3d3;
}

/* Horizontal Slider */

.claro .dijitRuleLabelsContainerH {
	padding: 2px 0px;
}
.claro .dijitSlider .dijitSliderProgressBarH,
.claro .dijitSlider .dijitSliderLeftBumper{
	background-image: url("images/sliderHorizontal.png");
	background-repeat:repeat-x;
	background-position:0 -20px;
	border-color: #b5bcc7;
	background-color: #cfe5fa;
}
.claro .dijitSlider .dijitSliderRemainingBarH,
.claro .dijitSlider .dijitSliderRightBumper{
	background-image: url("images/sliderHorizontal.png");
	background-repeat:repeat-x;
	background-position:0 -11px;
	border-color: #b5bcc7;
	background-color: #fff;
}
.claro .dijitSliderRightBumper {
	border-right: solid 1px #b5bcc7;
}
.claro .dijitSliderLeftBumper {
	border-left: solid 1px #b5bcc7;
}
.claro .dijitSliderHover .dijitSliderProgressBarH,
.claro .dijitSliderHover .dijitSliderLeftBumper{
	background-position:0 -20px;
	background-color: #abd6ff;
	border-color: #769dc0;
}
.claro .dijitSliderHover .dijitSliderRemainingBarH,
.claro .dijitSliderHover .dijitSliderRightBumper{
	background-position:0 0px;
	background-color: #fff;
	border-color: #769dc0;
}
.claro .dijitSliderFocused .dijitSliderProgressBarH,
.claro .dijitSliderFocused .dijitSliderLeftBumper{
	background-position:0 -30px;
	background-color: #abd6ff;
	border-color: #769dc0;
}
.claro .dijitSliderFocused .dijitSliderRemainingBarH,
.claro .dijitSliderFocused .dijitSliderRightBumper{
	background-position:0 -9px;
	background-color: #fff;
	border-color: #769dc0;
}
.claro .dijitSliderDisabled .dijitSliderProgressBarH,
.claro .dijitSliderDisabled .dijitSliderLeftBumper{
	background-color: #cdcdcd;
	background-image:none;
}
.claro .dijitSliderDisabled .dijitSliderRemainingBarH,
.claro .dijitSliderDisabled .dijitSliderRightBumper{
	background-color: #efefef;
}

/* Vertical Slider */

.claro .dijitRuleLabelsContainerV {
	padding: 0px 2px;
}
.claro .dijitSlider .dijitSliderProgressBarV,
.claro .dijitSlider .dijitSliderBottomBumper{
	background-image: url("images/sliderVertical.png");
	background-repeat:repeat-y;
	background-position:-36px 0;
	border-color: #b5bcc7;
	background-color: #cfe5fa;
}
.claro .dijitSlider .dijitSliderRemainingBarV,
.claro .dijitSlider .dijitSliderTopBumper{
	background-image: url("images/sliderVertical.png");
	background-repeat:repeat-y;
	background-position:-3px 0;
	border-color: #b5bcc7;
	background-color: #fff;
}
.claro .dijitSliderBottomBumper {
	border-bottom: solid 1px #b5bcc7;
}
.claro .dijitSliderTopBumper {
	border-top: solid 1px #b5bcc7;
}
.claro .dijitSliderHover .dijitSliderProgressBarV,
.claro .dijitSliderHover .dijitSliderBottomBumper{
	background-position:-36px 0;
	background-color: #abd6ff;
}
.claro .dijitSliderHover .dijitSliderRemainingBarV,
.claro .dijitSliderHover .dijitSliderTopBumper{
	background-position:0 0;
	background-color: #fff;
}
.claro .dijitSliderFocused .dijitSliderProgressBarV,
.claro .dijitSliderFocused .dijitSliderBottomBumper{
	background-position:-56px 0;
	background-color: #abd6ff;
}
.claro .dijitSliderFocused .dijitSliderRemainingBarV,
.claro .dijitSliderFocused .dijitSliderTopBumper{
	background-position:-18px 0;
	background-color: #fff;
}
.claro .dijitSliderDisabled .dijitSliderProgressBarV,
.claro .dijitSliderDisabled .dijitSliderBottomBumper{
	background-color: #cdcdcd;
}
.claro .dijitSliderDisabled .dijitSliderRemainingBarV,
.claro .dijitSliderDisabled .dijitSliderTopBumper{
	background-color: #efefef;
}

/* ------- Thumbs ------- */

.claro .dijitSliderImageHandleH {
	border: 0px;
	width: 18px;
	height: 16px;
	background-image: url("images/sliderThumbs.png");
	background-repeat:no-repeat;
	background-position:0 0;
}
.claro .dijitSliderHover .dijitSliderImageHandleH {
	background-position:-18px 0;
}
.claro .dijitSliderFocused .dijitSliderImageHandleH {
	background-position:-36px 0;
}
.claro .dijitSliderProgressBarH .dijitSliderThumbHover{
	background-position:-36px 0;
}
.claro .dijitSliderProgressBarH .dijitSliderThumbActive{
	background-position:-36px 0;
}
.claro .dijitSliderReadOnly .dijitSliderImageHandleH,
.claro .dijitSliderDisabled .dijitSliderImageHandleH {
	background-position:-54px 0;
}
.claro .dijitSliderImageHandleV {
	border: 0px;
	width: 18px;
	height: 16px;
	background-image: url("images/sliderThumbs.png");
	background-repeat:no-repeat;
	background-position:-289px 0;
}
.claro .dijitSliderHover .dijitSliderImageHandleV {
	background-position:-307px 0;
}
.claro .dijitSliderFocused .dijitSliderImageHandleV {
	background-position:-325px 0;
}
.claro .dijitSliderProgressBarV .dijitSliderThumbHover{
	background-position:-325px 0;
}
.claro .dijitSliderProgressBarV .dijitSliderThumbActive{
	background-position:-325px 0;
}
.claro .dijitSliderReadOnly .dijitSliderImageHandleV,
.claro .dijitSliderDisabled .dijitSliderImageHandleV {
	background-position:-343px 0;
}

/* ---- Increment/Decrement Buttons ---- */

.claro .dijitSliderButtonContainerH{
	padding: 1px 3px 1px 2px;
}
.claro .dijitSliderButtonContainerV{
	padding: 3px 1px 2px 1px;
}
.claro .dijitSliderDecrementIconH,
.claro .dijitSliderIncrementIconH,
.claro .dijitSliderDecrementIconV,
.claro .dijitSliderIncrementIconV {
	background-image: url('images/commonFormArrows.png');
	background-repeat:no-repeat;
	background-color: #e9ecf2;
	-moz-border-radius: 2px;
	-webkit-border-radius: 2px;
	border: solid 1px #b5bcc7;
	font-size: 1px;
}
.claro .dijitSliderDecrementIconH,
.claro .dijitSliderIncrementIconH {
	height: 12px;
	width: 9px;
}
.claro .dijitSliderDecrementIconV,
.claro .dijitSliderIncrementIconV {
	height: 9px;
	width: 12px;
}
.claro .dijitSliderActive .dijitSliderDecrementIconH,
.claro .dijitSliderActive .dijitSliderIncrementIconH,
.claro .dijitSliderActive .dijitSliderDecrementIconV,
.claro .dijitSliderActive .dijitSliderIncrementIconV,
.claro .dijitSliderHover .dijitSliderDecrementIconH,
.claro .dijitSliderHover .dijitSliderIncrementIconH,
.claro .dijitSliderHover .dijitSliderDecrementIconV,
.claro .dijitSliderHover .dijitSliderIncrementIconV {
	border: solid 1px #769dc0;
	background-color:#fff;
}
.claro .dijitSliderDecrementIconH {
	background-position:-357px 50%;
}
.claro .dijitSliderActive .dijitSliderDecrementIconH
.claro .dijitSliderHover .dijitSliderDecrementIconH {
	background-position:-393px 50%;
}
.claro .dijitSliderIncrementIconH {
	background-position:-251px 50%;
}
.claro .dijitSliderActive .dijitSliderIncrementIconH
.claro .dijitSliderHover .dijitSliderIncrementIconH {
	background-position:-283px 50%;
}
.claro .dijitSliderDecrementIconV {
	background-position:-38px 50%;
}
.claro .dijitSliderActive .dijitSliderDecrementIconV
.claro .dijitSliderHover .dijitSliderDecrementIconV {
	background-position:-73px 50%;
}
.claro .dijitSliderIncrementIconV {
	background-position:-143px 49%;
}
.claro .dijitSliderActive .dijitSliderIncrementIconV
.claro .dijitSliderHover .dijitSliderIncrementIconV {
	background-position:-178px 49%;
}
.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonHover,
.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonHover,
.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonHover,
.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonHover {
	background-color: #cce3fc;
}
.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonActive,
.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonActive,
.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonActive,
.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonActive {
	background-color: #a5d0fc;
	border-color:#6591b9;
}
.claro .dijitSliderButtonInner {
	visibility: hidden;
}
.claro .dijitSliderDisabled .dijitSliderBar{
	border-color: #d3d3d3;
}
.claro .dijitSliderReadOnly *,.claro .dijitSliderDisabled * {
	border-color: #d3d3d3;
	color: #bdbdbd;
}
.claro .dijitSliderReadOnly .dijitSliderDecrementIconH,
.claro .dijitSliderDisabled .dijitSliderDecrementIconH {
	background-position:-321px 50%;
	background-color:#e9e9e9;
}
.claro .dijitSliderReadOnly .dijitSliderIncrementIconH,
.claro .dijitSliderDisabled .dijitSliderIncrementIconH {
	background-position:-215px 50%;
	background-color:#e9e9e9;
}
.claro .dijitSliderReadOnly .dijitSliderDecrementIconV,
.claro .dijitSliderDisabled .dijitSliderDecrementIconV {
	background-position:-3px 49%;
	background-color:#e9e9e9;
}
.claro .dijitSliderReadOnly .dijitSliderIncrementIconV,
.claro .dijitSliderDisabled .dijitSliderIncrementIconV {
	background-position:-107px 49%;
	background-color:#e9e9e9;
}

.dj_ie6 .claro .dijitSlider .dijitSliderProgressBarH,
.dj_ie6 .claro .dijitSlider .dijitSliderLeftBumper,
.dj_ie6 .claro .dijitSlider .dijitSliderRemainingBarH,
.dj_ie6 .claro .dijitSlider .dijitSliderRightBumper,
.dj_ie6 .claro .dijitSlider .dijitSliderProgressBarV,
.dj_ie6 .claro .dijitSlider .dijitSliderTopBumper,
.dj_ie6 .claro .dijitSlider .dijitSliderRemainingBarV,
.dj_ie6 .claro .dijitSlider .dijitSliderBottomBumper {
	background-image:none;
}


text:
package com.vlath.keyboard.compat;

import android.inputmethodservice.InputMethodService;
import android.os.Build;
import android.view.View;

public class ViewOutlineProviderCompatUtils {
    private ViewOutlineProviderCompatUtils() {
        // This utility class is not publicly instantiable.
    }

    public interface InsetsUpdater {
        void setInsets(final InputMethodService.Insets insets);
    }

    private static final InsetsUpdater EMPTY_INSETS_UPDATER = new InsetsUpdater() {
        @Override
        public void setInsets(final InputMethodService.Insets insets) {}
    };

    public static InsetsUpdater setInsetsOutlineProvider(final View view) {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
            return EMPTY_INSETS_UPDATER;
        }
        return ViewOutlineProviderCompatUtilsLXX.setInsetsOutlineProvider(view);
    }
}


text:
namespace peloton {
namespace test {

//===----------------------------------------------------------------------===//
// PELOTON CODEGEN TEST
//===----------------------------------------------------------------------===//

PelotonCodeGenTest::PelotonCodeGenTest() {
  auto *catalog = catalog::Catalog::GetInstance();
  auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
  auto txn = txn_manager.BeginTransaction();

  // create test db
  catalog->CreateDatabase(test_db_name, txn);
  test_db = catalog->GetDatabaseWithName(test_db_name, txn);

  // Create test table
  CreateTestTables(txn);

  txn_manager.CommitTransaction(txn);
}

PelotonCodeGenTest::~PelotonCodeGenTest() {
  auto *catalog = catalog::Catalog::GetInstance();
  auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
  auto txn = txn_manager.BeginTransaction();
  auto result = catalog->DropDatabaseWithName(test_db_name, txn);
  txn_manager.CommitTransaction(txn);
  EXPECT_EQ(ResultType::SUCCESS, result);
}

// Create the test schema for all the tables
std::unique_ptr<catalog::Schema> PelotonCodeGenTest::CreateTestSchema(
    bool add_primary) const {
  bool is_inlined = true;

  // Create the columns
  static const uint32_t int_size =
      type::Type::GetTypeSize(type::TypeId::INTEGER);
  static const uint32_t dec_size =
      type::Type::GetTypeSize(type::TypeId::DECIMAL);
  std::vector<catalog::Column> cols = {
      catalog::Column{type::TypeId::INTEGER, int_size, "COL_A", is_inlined},
      catalog::Column{type::TypeId::INTEGER, int_size, "COL_B", is_inlined},
      catalog::Column{type::TypeId::DECIMAL, dec_size, "COL_C", is_inlined},
      catalog::Column{type::TypeId::VARCHAR, 25, "COL_D", !is_inlined}};

  // Add NOT NULL constraints on COL_A, COL_C, COL_D
  cols[0].AddConstraint(
      catalog::Constraint{ConstraintType::NOTNULL, "not_null"});
  if (add_primary == true)
    cols[0].AddConstraint(
        catalog::Constraint{ConstraintType::PRIMARY, "con_primary"});
  cols[2].AddConstraint(
      catalog::Constraint{ConstraintType::NOTNULL, "not_null"});
  cols[3].AddConstraint(
      catalog::Constraint{ConstraintType::NOTNULL, "not_null"});

  // Return the schema
  return std::unique_ptr<catalog::Schema>{new catalog::Schema(cols)};
}

// Create all the test tables, but don't load any data
void PelotonCodeGenTest::CreateTestTables(concurrency::Transaction *txn) {
  auto *catalog = catalog::Catalog::GetInstance();

  for (int i = 0; i < 4; i++) {
    auto table_schema = CreateTestSchema();
    catalog->CreateTable(test_db_name, test_table_names[i],
                         std::move(table_schema), txn);
    test_table_oids.push_back(catalog->GetTableObject(test_db_name,
                                                      test_table_names[i],
                                                      txn)->table_oid);
  }
  for (int i = 4; i < 5; i++) {
    auto table_schema = CreateTestSchema(true);
    catalog->CreateTable(test_db_name, test_table_names[i],
                         std::move(table_schema), txn);
    test_table_oids.push_back(catalog->GetTableObject(test_db_name,
                                                      test_table_names[i],
                                                      txn)->table_oid);
  }
}

void PelotonCodeGenTest::LoadTestTable(oid_t table_id, uint32_t num_rows,
                                       bool insert_nulls) {
  auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
  auto *txn = txn_manager.BeginTransaction();

  auto &test_table = GetTestTable(table_id);
  auto *table_schema = test_table.GetSchema();
  size_t curr_size = test_table.GetTupleCount();

  auto col_val =
      [](uint32_t tuple_id, uint32_t col_id) { return 10 * tuple_id + col_id; };

  const bool allocate = true;
  auto testing_pool = TestingHarness::GetInstance().GetTestingPool();
  for (uint32_t rowid = curr_size; rowid < (curr_size + num_rows); rowid++) {
    // The input tuple
    storage::Tuple tuple{table_schema, allocate};

    tuple.SetValue(0, type::ValueFactory::GetIntegerValue(col_val(rowid, 0)));
    if (insert_nulls) {
      auto &col = table_schema->GetColumn(1);
      tuple.SetValue(1, type::ValueFactory::GetNullValueByType(col.GetType()));
    } else {
      tuple.SetValue(1, type::ValueFactory::GetIntegerValue(col_val(rowid, 1)));
    }
    tuple.SetValue(2, type::ValueFactory::GetDecimalValue(col_val(rowid, 2)));

    // In case of random, make sure this column has duplicated values
    auto string_value =
        type::ValueFactory::GetVarcharValue(std::to_string(col_val(rowid, 3)));
    tuple.SetValue(3, string_value, testing_pool);

    ItemPointer *index_entry_ptr = nullptr;
    ItemPointer tuple_slot_id =
        test_table.InsertTuple(&tuple, txn, &index_entry_ptr);
    PL_ASSERT(tuple_slot_id.block != INVALID_OID);
    PL_ASSERT(tuple_slot_id.offset != INVALID_OID);

    auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
    txn_manager.PerformInsert(txn, tuple_slot_id, index_entry_ptr);
  }

  txn_manager.CommitTransaction(txn);
}

codegen::QueryCompiler::CompileStats PelotonCodeGenTest::CompileAndExecute(
    const planner::AbstractPlan &plan, codegen::QueryResultConsumer &consumer,
    char *consumer_state) {
  // Start a transaction
  auto &txn_manager = concurrency::TransactionManagerFactory::GetInstance();
  auto *txn = txn_manager.BeginTransaction();

  // Compile
  codegen::QueryCompiler::CompileStats stats;
  codegen::QueryCompiler compiler;
  auto compiled_query = compiler.Compile(plan, consumer, &stats);

  // Run
  compiled_query->Execute(*txn, std::unique_ptr<executor::ExecutorContext>(
                                    new executor::ExecutorContext{txn}).get(),
                          consumer_state);

  txn_manager.CommitTransaction(txn);
  return stats;
}

std::unique_ptr<expression::AbstractExpression>
PelotonCodeGenTest::ConstIntExpr(int64_t val) {
  auto *expr = new expression::ConstantValueExpression(
      type::ValueFactory::GetIntegerValue(val));
  return std::unique_ptr<expression::AbstractExpression>{expr};
}

std::unique_ptr<expression::AbstractExpression>
PelotonCodeGenTest::ConstDecimalExpr(double val) {
  auto *expr = new expression::ConstantValueExpression(
      type::ValueFactory::GetDecimalValue(val));
  return std::unique_ptr<expression::AbstractExpression>{expr};
}

std::unique_ptr<expression::AbstractExpression> PelotonCodeGenTest::ColRefExpr(
    type::TypeId type, uint32_t col_id) {
  auto *expr = new expression::TupleValueExpression(type, 0, col_id);
  return std::unique_ptr<expression::AbstractExpression>{expr};
}

std::unique_ptr<expression::AbstractExpression> PelotonCodeGenTest::CmpExpr(
    ExpressionType cmp_type,
    std::unique_ptr<expression::AbstractExpression> &&left,
    std::unique_ptr<expression::AbstractExpression> &&right) {
  auto *expr = new expression::ComparisonExpression(cmp_type, left.release(),
                                                    right.release());
  return std::unique_ptr<expression::AbstractExpression>{expr};
}

std::unique_ptr<expression::AbstractExpression> PelotonCodeGenTest::CmpLtExpr(
    std::unique_ptr<expression::AbstractExpression> &&left,
    std::unique_ptr<expression::AbstractExpression> &&right) {
  return CmpExpr(ExpressionType::COMPARE_LESSTHAN, std::move(left),
                 std::move(right));
}

std::unique_ptr<expression::AbstractExpression> PelotonCodeGenTest::CmpGtExpr(
    std::unique_ptr<expression::AbstractExpression> &&left,
    std::unique_ptr<expression::AbstractExpression> &&right) {
  return CmpExpr(ExpressionType::COMPARE_GREATERTHAN, std::move(left),
                 std::move(right));
}

std::unique_ptr<expression::AbstractExpression> PelotonCodeGenTest::CmpGteExpr(
    std::unique_ptr<expression::AbstractExpression> &&left,
    std::unique_ptr<expression::AbstractExpression> &&right) {
  return CmpExpr(ExpressionType::COMPARE_GREATERTHANOREQUALTO, std::move(left),
                 std::move(right));
}

std::unique_ptr<expression::AbstractExpression> PelotonCodeGenTest::CmpEqExpr(
    std::unique_ptr<expression::AbstractExpression> &&left,
    std::unique_ptr<expression::AbstractExpression> &&right) {
  return CmpExpr(ExpressionType::COMPARE_EQUAL, std::move(left),
                 std::move(right));
}

//===----------------------------------------------------------------------===//
// PRINTER
//===----------------------------------------------------------------------===//

void Printer::ConsumeResult(codegen::ConsumerContext &ctx,
                            codegen::RowBatch::Row &row) const {
  codegen::CodeGen &codegen = ctx.GetCodeGen();

  // Iterate over the attributes, constructing the printf format along the way
  std::string format = "[";
  std::vector<llvm::Value *> cols;
  bool first = true;
  for (const auto *ai : ais_) {
    // Handle row format
    if (!first) {
      format.append(", ");
    }
    first = false;
    codegen::Value val = row.DeriveValue(codegen, ai);
    PL_ASSERT(val.GetType().type_id != peloton::type::TypeId::INVALID);
    switch (val.GetType().type_id) {
      case type::TypeId::BOOLEAN:
      case type::TypeId::TINYINT:
      case type::TypeId::SMALLINT:
      case type::TypeId::DATE:
      case type::TypeId::INTEGER: {
        format.append("%d");
        break;
      }
      case type::TypeId::TIMESTAMP:
      case type::TypeId::BIGINT: {
        format.append("%ld");
        break;
      }
      case type::TypeId::DECIMAL: {
        format.append("%lf");
        break;
      }
      case type::TypeId::VARCHAR: {
        cols.push_back(val.GetLength());
        format.append("'%.*s'");
        break;
      }
      default:
        throw std::runtime_error("Can't print that shit, bruh");
    }
    cols.push_back(val.GetValue());
  }
  format.append("]\n");

  // Make the printf call
  codegen.CallPrintf(format, cols);
}

//===----------------------------------------------------------------------===//
// COUNTING CONSUMER
//===----------------------------------------------------------------------===//

void CountingConsumer::Prepare(codegen::CompilationContext &ctx) {
  auto &codegen = ctx.GetCodeGen();
  auto &runtime_state = ctx.GetRuntimeState();
  counter_state_id_ =
      runtime_state.RegisterState("consumerState", codegen.Int64Type());
}

void CountingConsumer::InitializeState(codegen::CompilationContext &context) {
  auto &codegen = context.GetCodeGen();
  auto *state_ptr = GetCounter(codegen, context.GetRuntimeState());
  codegen->CreateStore(codegen.Const64(0), state_ptr);
}

// Increment the counter
void CountingConsumer::ConsumeResult(codegen::ConsumerContext &context,
                                     codegen::RowBatch::Row &) const {
  auto &codegen = context.GetCodeGen();

  auto *counter_ptr = GetCounter(context);
  auto *new_count =
      codegen->CreateAdd(codegen->CreateLoad(counter_ptr), codegen.Const64(1));
  codegen->CreateStore(new_count, counter_ptr);
}

}  // namespace test
}  // namespace peloton


text:
using Hl7.Fhir.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Hl7.Fhir.Validation
{
    [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
    public class IdPatternAttribute : ValidationAttribute
    {
        protected override ValidationResult IsValid(object value, ValidationContext validationContext)
        {
            if (value == null) return ValidationResult.Success;

            if (value.GetType() != typeof(string))
                throw new ArgumentException("IdPatternAttribute can only be applied to string properties");

            if (Id.IsValidValue(value as string))
                return ValidationResult.Success;
            else
                return DotNetAttributeValidation.BuildResult(validationContext, "{0} is not a correctly formatted Id", value as string);
        }
    }
}


text:
require "MorcoWrapper2D/mw2_GameObject"
require "MorcoWrapper2D/mw2_Vector4"

mw2_Rect = (function ()
	local _class = {}

	-- enum
	_class.Style =
	{
		FILL = 0,
		LINE = 1
	}

	function _class.new(name)
		local _this = mw2_GameObject.new(name)

	-- public
		_this.mSize = mw2_Vector2.new()
		_this.mStyle = _class.Style.FILL
		_this.mColor = mw2_Vector4.new()

		_this.mInnerSelf = Shape.new()

		function _this.Draw(camera)
			local x = _this.WorldPosition().x - camera.WorldPosition().x
			local y = _this.WorldPosition().y - camera.WorldPosition().y
			local teta = - camera.WorldRotation() * math.pi / 180

			local finalAngle = _this.WorldRotation() - camera.WorldRotation()
			local finalX = (x * math.cos(teta) - y * math.sin(teta))
							+ mw2_Application.Settings.width / 2
			local finalY = (x * math.sin(teta) + y * math.cos(teta))
							+ mw2_Application.Settings.height / 2

			local color = _this.mColor.x * 256 * 256 + _this.mColor.y * 256 + _this.mColor.z;

			if _this.mStyle == _class.Style.FILL then
				_this.mInnerSelf:setFillStyle( Shape.SOLID, color, _this.mColor.t /255 )
				_this.mInnerSelf:setLineStyle(0, 0x0, 0)
			else
				_this.mInnerSelf:setFillStyle( Shape.NONE, 0x0, 0 )
				_this.mInnerSelf:setLineStyle(1, color, _this.mColor.t /255)
			end

			_this.mInnerSelf:beginPath()
			_this.mInnerSelf:moveTo(- _this.mSize.x /2, - _this.mSize.y / 2)
			_this.mInnerSelf:lineTo(- _this.mSize.x /2, - _this.mSize.y / 2)
			_this.mInnerSelf:lineTo(- _this.mSize.x /2, _this.mSize.y / 2)
			_this.mInnerSelf:lineTo(_this.mSize.x /2, _this.mSize.y / 2)
			_this.mInnerSelf:lineTo(_this.mSize.x /2, - _this.mSize.y / 2)
			_this.mInnerSelf:endPath()

			_this.mInnerSelf:setPosition( finalX, finalY )
			_this.mInnerSelf:setRotation( finalAngle )
		end

		return _this
	end

	return _class
end)()