text:
/**
  A `RouteInfoWithAttributes` is an object that contains
  metadata, including the resolved value from the routes
  `model` hook. Like `RouteInfo`, a `RouteInfoWithAttributes`
  represents a specific route within a Transition.
  It is read-only and internally immutable. It is also not
  observable, because a Transition instance is never
  changed after creation.

  @class RouteInfoWithAttributes
  @category ember-routing-router-service
  @public
*/

/**
  The dot-separated, fully-qualified name of the
  route, like "people.index".
  @property {String} name
  @category ember-routing-router-service
  @public
*/

/**
  The final segment of the fully-qualified name of
  the route, like "index"
  @property {String} localName
  @category ember-routing-router-service
  @public
*/

/**
  The values of the route's parameters. These are the
  same params that are received as arguments to the
  route's model hook. Contains only the parameters
  valid for this route, if any (params for parent or
  child routes are not merged).
  @property {Object} params
  @category ember-routing-router-service
  @public
*/

/**
  The ordered list of the names of the params
  required for this route. It will contain the same
  strings as Object.keys(params), but here the order
  is significant. This allows users to correctly pass
  params into routes programmatically.
  @property {Array} paramNames
  @category ember-routing-router-service
  @public
*/

/**
  The values of any queryParams on this route.
  @property {Object} queryParams
  @category ember-routing-router-service
  @public
*/

/**
  This is the resolved return value from the
  route's model hook.
  @property {Object|Array|String} attributes
  @category ember-routing-router-service
  @public
*/

/**
  A reference to the parent route's RouteInfo.
  This can be used to traverse upward to the topmost
  `RouteInfo`.
  @property {RouteInfo|null} parent
  @category ember-routing-router-service
  @public
*/

/**
  A reference to the child route's RouteInfo.
  This can be used to traverse downward to the
  leafmost `RouteInfo`.
  @property {RouteInfo|null} child
  @category ember-routing-router-service
  @public

  Allows you to traverse through the linked list
  of `RouteInfo`s from the topmost to leafmost.
  Returns the first `RouteInfo` in the linked list
  for which the callback returns true.

    This method is similar to the `find()` method
    defined in ECMAScript 2015.

    The callback method you provide should have the
    following signature (all parameters are optional):

    ```javascript
    function(item, index, array);
    ```

    - `item` is the current item in the iteration.
    - `index` is the current index in the iteration.
    - `array` is the array itself.

    It should return the `true` to include the item in
    the results, `false` otherwise.

    Note that in addition to a callback, you can also
    pass an optional target object that will be set as
    `this` on the context.

  @method find
  @param {Function} callback the callback to execute
  @param {Object} [target*] optional target to use
  @returns {Object} Found item or undefined
  @category ember-routing-router-service
  @public
*/

/**
  A RouteInfo is an object that contains metadata
  about a specific route within a Transition. It is
  read-only and internally immutable. It is also not
  observable, because a Transition instance is never
  changed after creation.

  @class RouteInfo
  @category ember-routing-router-service
  @public
*/

/**
  The dot-separated, fully-qualified name of the
  route, like "people.index".
  @property {String} name
  @category ember-routing-router-service
  @public
*/

/**
  The final segment of the fully-qualified name of
  the route, like "index"
  @property {String} localName
  @category ember-routing-router-service
  @public
*/

/**
  The values of the route's parametes. These are the
  same params that are received as arguments to the
  route's model hook. Contains only the parameters
  valid for this route, if any (params for parent or
  child routes are not merged).
  @property {Object} params
  @category ember-routing-router-service
  @public
*/

/**
  The ordered list of the names of the params
  required for this route. It will contain the same
  strings as Object.keys(params), but here the order
  is significant. This allows users to correctly pass
  params into routes programmatically.
  @property {Array} paramNames
  @category ember-routing-router-service
  @public
*/

/**
  The values of any queryParams on this route.
  @property {Object} queryParams
  @category ember-routing-router-service
  @public
*/

/**
  A reference to the parent route's RouteInfo.
  This can be used to traverse upward to the topmost
  `RouteInfo`.
  @property {RouteInfo|null} parent
  @category ember-routing-router-service
  @public
*/

/**
  A reference to the child route's RouteInfo.
  This can be used to traverse downward to the
  leafmost `RouteInfo`.
  @property {RouteInfo|null} child
  @category ember-routing-router-service
  @public

  Allows you to traverse through the linked list
  of `RouteInfo`s from the topmost to leafmost.
  Returns the first `RouteInfo` in the linked list
  for which the callback returns true.

    This method is similar to the `find()` method
    defined in ECMAScript 2015.

    The callback method you provide should have the
    following signature (all parameters are optional):

    ```javascript
    function(item, index, array);
    ```

    - `item` is the current item in the iteration.
    - `index` is the current index in the iteration.
    - `array` is the array itself.

    It should return the `true` to include the item in
    the results, `false` otherwise.

    Note that in addition to a callback, you can also
    pass an optional target object that will be set as
    `this` on the context.

  @method find
  @param {Function} callback the callback to execute
  @param {Object} [target*] optional target to use
  @returns {Object} Found item or undefined
  @category ember-routing-router-service
  @public
*/


text:
/// <reference no-default-lib="true"/>

declare namespace Intl {

    /**
     * [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
     *
     * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
     *
     */
    type UnicodeBCP47LocaleIdentifier = string;

    /**
     * Unit to use in the relative time internationalized message.
     *
     * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters).
     *
     * [Specification](https://tc39.es/ecma402/#sec-singularrelativetimeunit).
     */
    type RelativeTimeFormatUnit =
        | "year" | "years"
        | "quarter" | "quarters"
        | "month" | "months"
        | "week" | "weeks"
        | "day" | "days"
        | "hour" | "hours"
        | "minute" | "minutes"
        | "second" | "seconds"
        ;

    /**
     * The locale matching algorithm to use.
     *
     * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
     *
     * [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
     */
    type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit";

    /**
     * The format of output message.
     *
     * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
     *
     * [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
     */
    type RelativeTimeFormatNumeric = "always" | "auto";

    /**
     * The length of the internationalized message.
     *
     * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
     *
     * [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
     */
    type RelativeTimeFormatStyle = "long" | "short" | "narrow";

    /**
     * An object with some or all of properties of `options` parameter
     * of `Intl.RelativeTimeFormat` constructor.
     *
     * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
     *
     * [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
     */
    interface RelativeTimeFormatOptions {
        localeMatcher?: RelativeTimeFormatLocaleMatcher;
        numeric?: RelativeTimeFormatNumeric;
        style?: RelativeTimeFormatStyle;
    }

    /**
     * An object with properties reflecting the locale
     * and formatting options computed during initialization
     * of the `Intel.RelativeTimeFormat` object
     *
     * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description).
     *
     * [Specification](https://tc39.es/ecma402/#table-relativetimeformat-resolvedoptions-properties)
     */
    interface ResolvedRelativeTimeFormatOptions {
        locale: UnicodeBCP47LocaleIdentifier;
        style: RelativeTimeFormatStyle;
        numeric: RelativeTimeFormatNumeric;
        numberingSystem: string;
    }

    /**
     * An object representing the relative time format in parts
     * that can be used for custom locale-aware formatting.
     *
     * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
     *
     * [Specification](https://tc39.es/ecma402/#sec-FormatRelativeTimeToParts).
     */
    interface RelativeTimeFormatPart {
        type: string;
        value: string;
        unit?: RelativeTimeFormatUnit;
    }

    interface RelativeTimeFormat {
        /**
         * Formats a value and a unit according to the locale
         * and formatting options of the given
         * [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
         * object.
         *
         * While this method automatically provides the correct plural forms,
         * the grammatical form is otherwise as neutral as possible.
         * It is the caller's responsibility to handle cut-off logic
         * such as deciding between displaying "in 7 days" or "in 1 week".
         * This API does not support relative dates involving compound units.
         * e.g "in 5 days and 4 hours".
         *
         * @param value -  Numeric value to use in the internationalized relative time message
         *
         * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit)
         *  to use in the relative time internationalized message.
         *  Possible values are: `"year"`, `"quarter"`, `"month"`, `"week"`,
         *  `"day"`, `"hour"`, `"minute"`, `"second"`.
         *  Plural forms are also permitted.
         *
         * @throws `RangeError` if `unit` was given something other than `unit` possible values
         *
         * @returns Internationalized relative time message as string
         *
         * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format).
         *
         * [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.prototype.format).
         */
        format(
            value: number,
            unit: RelativeTimeFormatUnit,
        ): string;

        /**
         *  A version of the format method which it returns an array of objects
         *  which represent "parts" of the object,
         *  separating the formatted number into its constituent parts
         *  and separating it from other surrounding text.
         *  These objects have two properties:
         * `type` a NumberFormat formatToParts type, and `value`,
         *  which is the String which is the component of the output.
         *  If a "part" came from NumberFormat,
         *  it will have a unit property which indicates the `unit` being formatted;
         *  literals which are part of the larger frame will not have this property.
         *
         *  @param value - Numeric value to use in the internationalized relative time message
         *
         *  @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit)
         *   to use in the relative time internationalized message.
         *   Possible values are: `"year"`, `"quarter"`, `"month"`, `"week"`,
         *   `"day"`, `"hour"`, `"minute"`, `"second"`.
         *   Plural forms are also permitted.
         *
         *  @throws `RangeError` if `unit` was given something other than `unit` possible values
         *
         *  @returns Array of [FormatRelativeTimeToParts](https://tc39.es/ecma402/#sec-FormatRelativeTimeToParts)
         *
         *  [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts).
         *
         *  [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.prototype.formatToParts).
         */
        formatToParts(
            value: number,
            unit: RelativeTimeFormatUnit,
        ): RelativeTimeFormatPart[];

        /**
         * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object.
         *
         * @returns A new object with properties reflecting the locale
         *  and formatting options computed during initialization
         *  of the `Intel.RelativeTimeFormat` object.
         *
         * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions).
         *
         * [Specification](https://tc39.es/ecma402/#sec-intl.relativetimeformat.prototype.resolvedoptions)
         */
        resolvedOptions(): ResolvedRelativeTimeFormatOptions;
    }

    /**
     * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
     * object is a constructor for objects that enable language-sensitive relative time formatting.
     *
     * Part of [Intl object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl)
     * namespace and the [ECMAScript Internationalization API](https://www.ecma-international.org/publications/standards/Ecma-402.htm).
     *
     * [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility).
     *
     * [Polyfills](https://github.com/tc39/proposal-intl-relative-time#polyfills).
     */
    const RelativeTimeFormat: {
        /**
         * Constructor creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
         * objects
         *
         * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
         *  For the general form and interpretation of the locales argument,
         *  see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
         *
         * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
         *  with some or all of options of the formatting.
         *  An object with some or all of the following properties:
         *  - `localeMatcher` - The locale matching algorithm to use.
         *    Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`.
         *    For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
         *  - `numeric` - The format of output message.
         *    Possible values are: `"always"` (default, e.g., `1 day ago`) or `"auto"` (e.g., `yesterday`).
         *    The `"auto"` value allows to not always have to use numeric values in the output.
         *  - `style` - The length of the internationalized message. Possible values are:
         *    `"long"` (default, e.g., in 1 month),
         *    `"short"` (e.g., in 1 mo.)
         *    or `"narrow"` (e.g., in 1 mo.). The narrow style could be similar to the short style for some locales.
         *
         * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object.
         *
         * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
         *
         * [Specification](https://tc39.es/ecma402/#sec-intl-relativetimeformat-constructor).
         */
        new(
            locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
            options?: RelativeTimeFormatOptions,
        ): RelativeTimeFormat;

        /**
         * Returns an array containing those of the provided locales
         * that are supported in date and time formatting
         * without having to fall back to the runtime's default locale.
         *
         * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
         *  For the general form and interpretation of the locales argument,
         *  see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
         *
         * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
         *  with some or all of options of the formatting.
         *  An object with some or all of the following properties:
         *  - `localeMatcher` - The locale matching algorithm to use.
         *    Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`.
         *    For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
         *  - `numeric` - The format of output message.
         *    Possible values are: `"always"` (default, e.g., `1 day ago`) or `"auto"` (e.g., `yesterday`).
         *    The `"auto"` value allows to not always have to use numeric values in the output.
         *  - `style` - The length of the internationalized message. Possible values are:
         *    `"long"` (default, e.g., in 1 month),
         *    `"short"` (e.g., in 1 mo.)
         *    or `"narrow"` (e.g., in 1 mo.). The narrow style could be similar to the short style for some locales.
         *
         * @returns An array containing those of the provided locales
         *  that are supported in date and time formatting
         *  without having to fall back to the runtime's default locale.
         *
         * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf).
         *
         * [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.supportedLocalesOf).
         */
        supportedLocalesOf(
            locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
            options?: RelativeTimeFormatOptions,
        ): UnicodeBCP47LocaleIdentifier[];
    };

    interface NumberFormatOptions {
        compactDisplay?: string;
        notation?: string;
        signDisplay?: string;
        unit?: string;
        unitDisplay?: string;
    }

    interface ResolvedNumberFormatOptions {
        compactDisplay?: string;
        notation?: string;
        signDisplay?: string;
        unit?: string;
        unitDisplay?: string;
    }

    interface DateTimeFormatOptions {
        dateStyle?: "full" | "long" | "medium" | "short";
        timeStyle?: "full" | "long" | "medium" | "short";
        calendar?: string;
        dayPeriod?: "narrow" | "short" | "long";
        numberingSystem?: string;
        hourCycle?: "h11" | "h12" | "h23" | "h24";
        fractionalSecondDigits?: 0 | 1 | 2 | 3;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

class PieText extends PieTextAppModel
{
/**
 * Model name
 *
 * @var string
 * @access public
 */
	var $name = 'PieText';

/**
 * beforeSave callback
 *
 * Used to process the text in textile format.
 *
 * @access public
 * @return Always true so it doesnt avoid saving
 */
	function beforeSave()
	{
		App::import('Vendor', 'Textile');
		$Textile = new Textile;
		$this->data[$this->alias]['processed_text'] = $Textile->textileThis($this->data[$this->alias]['text']);
		return true;
	}
}


text:
crumb :root do
  link "Inicio", root_path
end

 crumb :projects do
   link "Proyectos", projects_path
 end

 crumb :project do |project|
   link project.name, project_path(project)
   parent :projects
 end

 crumb :project_notifications do |project|
   link "Novedades", project_notifications_path(project)
   parent :project, project
 end

 crumb :notification do |notification|
   link notification.title, notification_path(notification)
   parent :project_notifications, notification.project
 end

# If you want to split your breadcrumbs configuration over multiple files, you
# can create a folder named `config/breadcrumbs` and put your configuration
# files there. All *.rb files (e.g. `frontend.rb` or `products.rb`) in that
# folder are loaded and reloaded automatically when you change them, just like
# this file (`config/breadcrumbs.rb`).


text:
"""add owner column

Revision ID: 4d73c542db51
Revises: 566b0cc2f2c
Create Date: 2014-04-15 21:29:50.443484

"""

# revision identifiers, used by Alembic.
revision = '4d73c542db51'
down_revision = '566b0cc2f2c'

from alembic import op
import sqlalchemy as sa

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('session', sa.Column('owner', sa.String(), nullable=True))
    ### end Alembic commands ###

def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('session', 'owner')
    ### end Alembic commands ###


text:
<?php

/**
 *
 * Util class to send request and process the response
 *
 * @author PayU Latam
 * @since 1.0.0
 * @version 1.0
 *
 */
class PayUApiServiceUtil{

	/**
	 * Sends a request type json
	 *
	 * @param Object $request this object is encode to json is used to request data
	 * @param PayUHttpRequestInfo $payUHttpRequestInfo object with info to send an api request
	 * @param bool $removeNullValues if remove null values in request and response object
	 * @return string response
	 * @throws RuntimeException
	 */
	public static function sendRequest($request, PayUHttpRequestInfo $payUHttpRequestInfo, $removeNullValues = NULL){
		if(!isset($removeNullValues)){
			$removeNullValues = PayUConfig::REMOVE_NULL_OVER_REQUEST;
		}

		if($removeNullValues && $request != null){
			$request = PayURequestObjectUtil::removeNullValues($request);
		}

		if($request != NULL){
			$request = PayURequestObjectUtil::encodeStringUtf8($request);
		}

 		if(isset($request->transaction->order->signature)){
 			$request->transaction->order->signature =
 			SignatureUtil::buildSignature($request->transaction->order, PayU::$merchantId, PayU::$apiKey, SignatureUtil::MD5_ALGORITHM);
 		}

		$requestJson = json_encode($request);

		$responseJson = HttpClientUtil::sendRequest($requestJson, $payUHttpRequestInfo);

		if( $responseJson == 200 || $responseJson == 204){
			return true;
		}else{
			$response = json_decode($responseJson);
			if(!isset($response)){
				throw new PayUException(PayUErrorCodes::JSON_DESERIALIZATION_ERROR,sprintf(' Error decoding json. Please verify the json structure received. the json isn\'t added in this message '.
						' for security reasons please verify the variable $responseJson on class PayUApiServiceUtil'));
			}

			if($removeNullValues){
				$response = PayURequestObjectUtil::removeNullValues($response);
			}

			$response = PayURequestObjectUtil::formatDates($response);

			if($payUHttpRequestInfo->environment === Environment::PAYMENTS_API || $payUHttpRequestInfo->environment === Environment::REPORTS_API){
				if(PayUResponseCode::SUCCESS == $response->code){
					return $response;
				}else{
					throw new PayUException(PayUErrorCodes::API_ERROR, $response->error);
				}
			}else if($payUHttpRequestInfo->environment === Environment::SUBSCRIPTIONS_API){
				if(!isset($response->type) || ($response->type != 'BAD_REQUEST' && $response->type != 'NOT_FOUND' && $response->type != 'MALFORMED_REQUEST')){
					return $response;
				}else{
					throw new PayUException(PayUErrorCodes::API_ERROR, $response->description);
				}
			}

		}
	}
}


text:
import os
import shutil
import unicodedata
import webbrowser

import requests
from wox import Wox,WoxAPI
from bs4 import BeautifulSoup

URL = 'http://www.letscorp.net/'

def full2half(uc):
    """Convert full-width characters to half-width characters.
    """
    return unicodedata.normalize('NFKC', uc)

class Main(Wox):

    def request(self,url):
    #如果用户配置了代理,那么可以在这里设置。这里的self.proxy来自Wox封装好的对象
		if self.proxy and self.proxy.get("enabled") and self.proxy.get("server"):
			proxies = {
				"http":"http://{}:{}".format(self.proxy.get("server"),self.proxy.get("port")),
				"https":"http://{}:{}".format(self.proxy.get("server"),self.proxy.get("port"))
			}
			return requests.get(url,proxies = proxies)
		else:
			return requests.get(url)

    def query(self, param):
		r = self.request(URL);
		bs = BeautifulSoup(r.text, 'html.parser')
		posts = bs.find_all('a', 'title');
		result = [{
			'Title': full2half(p.contents[0]),
			'SubTitle': p.contents[0],
			'IcoPath': os.path.join('img', 'letscorp.png'),
			'JsonRPCAction': {
				'method': 'openUrl',
				'parameters': [p['href']]
			}
		} for p in posts]

		return result

    def openUrl(self, url):
		webbrowser.open(url)

if __name__ == '__main__':
	Main()


text:
package com.sylvain.vertx.hypermedia;

import io.vertx.ext.web.Router;

/**
 * Created by SylvainMaillard on 20/03/2016.
 */
public abstract class Resource {

    public void setupRoutes(Router router) {
        // analyse class and add route dynamically.
    }

}


text:
package com.puresoltechnologies.ductiledb.tinkerpop;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Property;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality;
import org.apache.tinkerpop.gremlin.structure.util.ElementHelper;
import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
import org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedVertex;

import com.puresoltechnologies.ductiledb.core.graph.DuctileDBEdge;
import com.puresoltechnologies.ductiledb.core.graph.DuctileDBVertex;
import com.puresoltechnologies.ductiledb.core.graph.EdgeDirection;
import com.puresoltechnologies.ductiledb.core.graph.tx.TransactionType;

public class DuctileVertex extends DuctileElement implements Vertex, WrappedVertex<DuctileDBVertex> {

    public static final String LABEL_DELIMINATOR = "::";

    private DuctileDBVertex baseVertex;

    public DuctileVertex(DuctileDBVertex baseVertex, DuctileGraph graph) {
	super(baseVertex, graph);
	this.baseVertex = baseVertex;
    }

    @Override
    public DuctileEdge addEdge(String label, Vertex inVertex, Object... keyValues) {
	if (null == inVertex) {
	    throw Graph.Exceptions.argumentCanNotBeNull("inVertex");
	}
	ElementHelper.validateLabel(label);
	ElementHelper.legalPropertyKeyValueArray(keyValues);
	if (ElementHelper.getIdValue(keyValues).isPresent()) {
	    throw Edge.Exceptions.userSuppliedIdsNotSupported();
	}
	graph().tx().readWrite();
	DuctileDBEdge baseEdge = getBaseVertex().addEdge(label, ((DuctileVertex) inVertex).getBaseVertex(),
		Collections.emptyMap());
	DuctileEdge edge = new DuctileEdge(baseEdge, graph());
	ElementHelper.attachProperties(edge, keyValues);
	return edge;
    }

    @Override
    public <V> DuctileVertexProperty<V> property(String key, V value) {
	return property(VertexProperty.Cardinality.single, key, value);
    }

    @Override
    public void remove() {
	graph().tx().readWrite();
	graph().getBaseGraph().removeVertex(baseVertex);
    }

    @Override
    public <V> DuctileVertexProperty<V> property(Cardinality cardinality, String key, V value, Object... keyValues) {
	if (cardinality != VertexProperty.Cardinality.single) {
	    throw VertexProperty.Exceptions.multiPropertiesNotSupported();
	}
	if (keyValues.length > 0) {
	    throw VertexProperty.Exceptions.metaPropertiesNotSupported();
	}
	ElementHelper.validateProperty(key, value);
	if (ElementHelper.getIdValue(keyValues).isPresent())
	    throw Vertex.Exceptions.userSuppliedIdsNotSupported();
	graph().tx().readWrite();
	try {
	    if (value == null) {
		getBaseVertex().removeProperty(key);
	    } else {
		getBaseVertex().setProperty(key, value);
	    }
	    return new DuctileVertexProperty<V>(this, key, value);
	} catch (final IllegalArgumentException iae) {
	    throw Property.Exceptions.dataTypeOfPropertyValueNotSupported(value);
	}
    }

    @Override
    public <V> VertexProperty<V> property(String key) {
	V value = getBaseVertex().getProperty(key);
	if (value == null) {
	    return VertexProperty.empty();
	}
	return new DuctileVertexProperty<V>(this, key, value);
    }

    @Override
    public Iterator<Edge> edges(Direction direction, String... edgeLabels) {
	Iterable<DuctileDBEdge> edges;
	switch (direction) {
	case IN:
	    edges = getBaseVertex().getEdges(EdgeDirection.IN, edgeLabels);
	    break;
	case OUT:
	    edges = getBaseVertex().getEdges(EdgeDirection.OUT, edgeLabels);
	    break;
	case BOTH:
	    edges = getBaseVertex().getEdges(EdgeDirection.BOTH, edgeLabels);
	    break;
	default:
	    throw new IllegalArgumentException("Direction '" + direction + "' not supported.");
	}
	List<Edge> resultEdges = new ArrayList<>();
	for (DuctileDBEdge edge : edges) {
	    resultEdges.add(new DuctileEdge(edge, graph()));
	}
	return resultEdges.iterator();
    }

    @Override
    public Iterator<Vertex> vertices(Direction direction, String... edgeLabels) {
	Iterable<DuctileDBVertex> vertices;
	switch (direction) {
	case IN:
	    vertices = getBaseVertex().getVertices(EdgeDirection.IN, edgeLabels);
	    break;
	case OUT:
	    vertices = getBaseVertex().getVertices(EdgeDirection.OUT, edgeLabels);
	    break;
	case BOTH:
	    vertices = getBaseVertex().getVertices(EdgeDirection.BOTH, edgeLabels);
	    break;
	default:
	    throw new IllegalArgumentException("Direction '" + direction + "' not supported.");
	}
	List<Vertex> resultVertices = new ArrayList<>();
	for (DuctileDBVertex vertex : vertices) {
	    resultVertices.add(new DuctileVertex(vertex, graph()));
	}
	return resultVertices.iterator();
    }

    @Override
    public <V> Iterator<VertexProperty<V>> properties(String... propertyKeys) {
	List<VertexProperty<V>> properties = new ArrayList<>();
	if (propertyKeys.length > 0) {
	    for (String key : propertyKeys) {
		@SuppressWarnings("unchecked")
		V value = (V) getBaseVertex().getProperty(key);
		if (value != null) {
		    properties.add(new DuctileVertexProperty<V>(this, key, value));
		}
	    }
	} else {
	    for (String key : getBaseVertex().getPropertyKeys()) {
		@SuppressWarnings("unchecked")
		V value = (V) getBaseVertex().getProperty(key);
		if (value != null) {
		    properties.add(new DuctileVertexProperty<V>(this, key, value));
		}
	    }
	}
	return properties.iterator();
    }

    @Override
    public DuctileDBVertex getBaseVertex() {
	if ((!baseVertex.getTransaction().isOpen())
		&& (baseVertex.getTransaction().getTransactionType() == TransactionType.THREAD_LOCAL)) {
	    /*
	     * The transaction is closed already, so we reconnect this vertex to
	     * a new base vertex. This is requested by Tinkerpop tests.
	     */
	    baseVertex = graph().getBaseGraph().getVertex(baseVertex.getId());
	}
	return baseVertex;
    }

    @Override
    public String label() {
	graph().tx().readWrite();
	return String.join(LABEL_DELIMINATOR, labels());
    }

    public Set<String> labels() {
	final Set<String> labels = new TreeSet<>();
	for (String label : getBaseVertex().getTypes()) {
	    labels.add(label);
	}
	return Collections.unmodifiableSet(labels);
    }

    @Override
    public boolean equals(final Object object) {
	return ElementHelper.areEqual(this, object);
    }

    @Override
    public int hashCode() {
	return ElementHelper.hashCode(this);
    }

    @Override
    public String toString() {
	return StringFactory.vertexString(this);
    }

}


text:
<!DOCTYPE html>

  <meta charset="utf-8">

  <link rel="stylesheet" href="/guide-view.css">

  <link rel="stylesheet" href="bbox.css">

static

absolute

spacer


text:
package org.hibernate.examples.mapping.compositeId.manytoone;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.hibernate.examples.model.AbstractHibernateEntity;
import org.hibernate.examples.utils.HashTool;
import org.hibernate.examples.utils.ToStringHelper;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

/**
 * org.hibernate.examples.mapping.compositeId.manytoone.Product
 *
 * @author 배성혁 sunghyouk.bae@gmail.com
 * @since 2013. 11. 29. 오후 5:07
 */
@Entity
@Table(name = "CompositeId_Product")
//@Cache(region = "composite", usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
public class Product extends AbstractHibernateEntity<Long> {

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "productId")
  @Setter(AccessLevel.PROTECTED)
  private Long id;

  @Column(name = "productName")
  private String name;

  @OneToMany(mappedBy = "id.product", cascade = {CascadeType.ALL}, orphanRemoval = true)
  @LazyCollection(value = LazyCollectionOption.EXTRA)
  private Set<OrderDetail> orderDetails = new HashSet<OrderDetail>();

  @Override
  public int hashCode() {
    return HashTool.compute(name);
  }

  @Override
  public ToStringHelper buildStringHelper() {
    return super.buildStringHelper()
        .add("name", name);
  }

  private static final long serialVersionUID = -4725360631652953447L;
}


text:
<!-- ISSUE TITLE FORMAT

     {{Search Space Language}}: Create New {{IA Name}} Fathead

     E.g. Python: Create New Pip Fathead -->

# Create a new {IA Name} Fathead Instant Answer
Help us make DuckDuckGo the best search engine for programmers!

### What do I need to know?
You'll need to know how to code in **Perl**, **Python**, **Ruby**, or **JavaScript**.
![fathead languages](https://cloud.githubusercontent.com/assets/873785/19787916/57b4c31a-9c73-11e6-9bd9-f85c8893ec93.jpg)

### What am I doing?
You will write a script that scrapes or downloads the data source below, and generates an **output.txt** file containing the parsed documentation. You can learn more about Fatheads and the `output.txt` syntax [**here**](https://docs.duckduckhack.com/resources/fathead-overview.html).

**Data source**: {URL to Data Source}
<!-- ^^^ FILL THIS IN ^^^ -->

**Instant Answer Page**: *to be created by developer*
<!-- ^^^ FILL THIS IN, AFTER ISSUE IS CLAIMED ^^^ -->

### What is the Goal?
As part of our [Programming Mission](https://forum.duckduckhack.com/t/duckduckhack-programming-mission-overview/53), we're aiming to reach 100% Instant Answer (IA) coverage for searches related to programming languages by creating new Instant Answers, and improving existing ones.

Here are some Fathead examples:

- Ruby Docs
    - [Code](https://github.com/duckduckgo/zeroclickinfo-fathead/tree/master/lib/fathead/ruby) | [Example Query](https://duckduckgo.com/?q=array+bsearch&ia=about)
- MDN CSS
    - [Code](https://github.com/duckduckgo/zeroclickinfo-fathead/tree/master/lib/fathead/mdn_css) | [Example Query](https://duckduckgo.com/?q=css+background-position&ia=about)

  ![css background-position search](https://cloud.githubusercontent.com/assets/873785/19787980/cdf51566-9c73-11e6-9ef2-ac44dede62c7.png)

[See more related Instant Answers](https://duck.co/ia?repo=fathead)

## Get Started
- [ ] 1) Claim this issue by commenting below
- [ ] 2) Review our [Contributing Guide](https://github.com/duckduckgo/zeroclickinfo-fathead/blob/master/CONTRIBUTING.md)
- [ ] 3) [Set up your development environment](https://docs.duckduckhack.com/welcome/setup-dev-environment.html), and fork this repository
- [ ] 4) Create a new Instant Answer Page: https://duck.co/ia/new_ia (then let us know, here!)
- [ ] 5) Create the Fathead
- [ ] 6) Create a Pull Request
- [ ] 7) Ping @{Language Leader Handle} for a review
<!-- ^^^ FILL THIS IN ^^^ -->

## Resources
- Join [DuckDuckHack Slack](https://quackslack.herokuapp.com/) to ask questions
- Join the [DuckDuckHack Forum](https://forum.duckduckhack.com/) to discuss project planning and Instant Answer metrics
- Read the [DuckDuckHack Documentation](https://docs.duckduckhack.com/) for technical help


text:
package com.mgreau.wwsmad.websocket.messages;

import org.asciidoctor.ast.DocumentHeader;

/**
 * This message can be send by both peers (client/server) :
 *

 *
by peer client : when a writer wants to see how his doc looks like in HTML

 *
by peer server :
 *

 *
if client want to have the last snapshot to work on it

 *
each time an other writer send a new version if the client is connected to live editing

 *

 *

 *

 *
 * @author @mgreau
 *
 */
public class AsciidocMessage extends Message {

	/** The current person who send this version */
	private String currentWriter;

	/** Asciidoc file information */
	private DocumentHeader docHeader;

	/** Asciidoc source origin content */
	private String adocSource;

	/** Asciidoc source from another user to merge with the adocSource */
	private String adocSourceToMerge;

	/** Patch to apply to source */
	private String patchToApply;

	/** Document format which is sent to peerΠ*/
	protected TypeFormat format;

	/** Action to do with this message : render, compute diff, patch **/
	private String action;

	/** part of the message to render */
	private String part;

	public AsciidocMessage(){
	}

	public AsciidocMessage(String currentWriter, String adocSource){
		this.format = TypeFormat.asciidoc;
		this.currentWriter = currentWriter;
		this.adocSource = adocSource;
	}

	public AsciidocMessage(String currentWriter, String adocSource, TypeFormat format){
		this.format = TypeFormat.asciidoc;
		if (format !=  null)
			this.format = format;
		this.currentWriter = currentWriter;
		this.adocSource = adocSource;
	}

	public String toString(){
		return "[AsciidocMessage]" + " - By writer: ..." + currentWriter;
	}

	public String getCurrentWriter() {
		return currentWriter;
	}

	public void setCurrentWriter(String currentWriter) {
		this.currentWriter = currentWriter;
	}

	public String getAdocSource() {
		return adocSource;
	}

	public void setAdocSource(String adocSource) {
		this.adocSource = adocSource;
	}

	public DocumentHeader getDocHeader() {
		return docHeader;
	}

	public void setDocHeader(DocumentHeader docHeader) {
		this.docHeader = docHeader;
	}

	public TypeFormat getFormat() {
		return format;
	}

	public void setFormat(TypeFormat format) {
		this.format = format;
	}

	public String getAdocSourceToMerge() {
		return adocSourceToMerge;
	}

	public void setAdocSourceToMerge(String adocSourceToMerge) {
		this.adocSourceToMerge = adocSourceToMerge;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getPatchToApply() {
		return patchToApply;
	}

	public void setPatchToApply(String patchToApply) {
		this.patchToApply = patchToApply;
	}

	public String getPart() {
		return part;
	}

	public void setPart(String part) {
		this.part = part;
	}

}


text:
DCML.registerTag("Label", {
    contentCanBe = "text";
    argumentType = {
        X = "number";
        Y = "number";
        backgroundColour = "colour";
        textColour = "colour";
    };
    aliasHandler = true
})

local len = string.len

class "Label" extends "Node" {
    text = "Label";
}

function Label:initialise( ... )
    ParseClassArguments( self, { ... }, { {"text", "string"}, {"X", "number"}, {"Y", "number"} }, true, false )

    if not self.__defined.width then
        self.width = "auto"
    end
    self.super( self.X, self.Y, self.width, 1 )

    self.canvas.width = self.width
end

function Label:preDraw()
    -- draw the text to the canvas
    local draw = self.canvas

    draw:drawTextLine( self.text, 1, 1, self.textColour, self.backgroundColour, self.width ) -- text, X, Y, textColour, backgroundColour, maxWidth(optional)
end

function Label:getWidth()
    return self.width == "auto" and len( self.text ) or self.width
end

function Label:setWidth( width )
    self.width = width

    if not self.canvas then return end
    self.canvas.width = self.width
end

function Label:setText( text )
    self.text = text

    if not self.canvas then return end
    self.canvas.width = self.width
end


text:
package test.demo.gyniu.v2ex.utils;

import android.os.Handler;
import android.os.Looper;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ExecutorUtils {
    private static final Handler mUiHandler;
    private static final ExecutorService mCachePool;
    private static final ScheduledExecutorService mScheduledPool;

    static {
        mUiHandler = new Handler(Looper.getMainLooper());
        mCachePool = Executors.newCachedThreadPool();

        // JELLY_BEAN(16) has bug that can't set core pool size to 0, otherwise it will not create
        // thread to run task.
        ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(4);
        executor.setKeepAliveTime(3, TimeUnit.SECONDS);
        executor.allowCoreThreadTimeOut(true);
        mScheduledPool = executor;
    }

    /**
     * @see ExecutorService#submit(Callable)
     */
    public static <T> Future<T> submit(Callable<T> task) {
        return mCachePool.submit(task);
    }

    /**
     * @see ExecutorService#submit(Runnable)
     */
    public static Future<?> submit(Runnable task) {
        return mCachePool.submit(task);
    }

    /**
     * @see ExecutorService#submit(Runnable, Object)
     */
    public static <T> Future<T> submit(Runnable task, T result) {
        return mCachePool.submit(task, result);
    }

    /**
     * @see ScheduledExecutorService#scheduleWithFixedDelay(Runnable, long, long, TimeUnit)
     */
    public static ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
        return mScheduledPool.scheduleWithFixedDelay(command, initialDelay, delay, unit);
    }

    /**
     * @see ScheduledExecutorService#schedule(Runnable, long, TimeUnit)
     */
    public static ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
        return mScheduledPool.schedule(command, delay, unit);
    }

    /**
     * @see ScheduledExecutorService#schedule(Callable, long, TimeUnit)
     */
    public static <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
        return mScheduledPool.schedule(callable, delay, unit);
    }

    /**
     * @see ScheduledExecutorService#scheduleAtFixedRate(Runnable, long, long, TimeUnit)
     */
    public static ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
        return mScheduledPool.scheduleAtFixedRate(command, initialDelay, period, unit);
    }

    /**
     * @see ExecutorService#execute(Runnable)
     */
    public static void execute(Runnable command) {
        mCachePool.execute(command);
    }

    public static void runInUiThread(Runnable runnable) {
        mUiHandler.post(runnable);
    }
}


text:
#include "opengl-precomp.h"	 // Precompiled header
//
#define MRPT_NO_WARN_BIG_HDR
#include <mrpt/core/initializer.h>
#include <mrpt/math/registerAllClasses.h>
#include <mrpt/opengl.h>
#include <mrpt/opengl/registerAllClasses.h>
// deps:
#include <mrpt/img/registerAllClasses.h>
#include <mrpt/poses/registerAllClasses.h>

MRPT_INITIALIZER(registerAllClasses_mrpt_opengl)
{
	using namespace mrpt::opengl;

#if !defined(DISABLE_MRPT_AUTO_CLASS_REGISTRATION)
	// Opengl classes:
	registerClass(CLASS_ID(CArrow));
	registerClass(CLASS_ID(CAssimpModel));
	registerClass(CLASS_ID(CAxis));
	registerClass(CLASS_ID(CBox));
	registerClass(CLASS_ID(CCamera));
	registerClass(CLASS_ID(CColorBar));
	registerClass(CLASS_ID(CCylinder));
	registerClass(CLASS_ID(CDisk));
	registerClass(CLASS_ID(CEllipsoid2D));
	registerClass(CLASS_ID(CEllipsoid3D));
	registerClass(CLASS_ID(CEllipsoidInverseDepth2D));
	registerClass(CLASS_ID(CEllipsoidInverseDepth3D));
	registerClass(CLASS_ID(CEllipsoidRangeBearing2D));
	registerClass(CLASS_ID(CFrustum));
	registerClass(CLASS_ID(CGridPlaneXY));
	registerClass(CLASS_ID(CGridPlaneXZ));
	registerClass(CLASS_ID(CMesh));
	registerClass(CLASS_ID(CMesh3D));
	registerClass(CLASS_ID(CMeshFast));
	registerClass(CLASS_ID(COctoMapVoxels));
	registerClass(CLASS_ID(COpenGLScene));
	registerClass(CLASS_ID(COpenGLViewport));
	registerClass(CLASS_ID(CPointCloud));
	registerClass(CLASS_ID(CPointCloudColoured));
	registerClass(CLASS_ID(CPolyhedron));
	registerClass(CLASS_ID(CRenderizable));
	registerClass(CLASS_ID(CSetOfLines));
	registerClass(CLASS_ID(CSetOfObjects));
	registerClass(CLASS_ID(CSetOfTriangles));
	registerClass(CLASS_ID(CSetOfTexturedTriangles));
	registerClass(CLASS_ID(CSimpleLine));
	registerClass(CLASS_ID(CSphere));
	registerClass(CLASS_ID(CText));
	registerClass(CLASS_ID(CText3D));
	registerClass(CLASS_ID(CTexturedPlane));
	registerClass(CLASS_ID(CVectorField2D));
	registerClass(CLASS_ID(CVectorField3D));

// These ones are in the lib: mrpt-obsmaps
// registerClass( CLASS_ID( CPlanarLaserScan ) );
// registerClass( CLASS_ID( CAngularObservationMesh ) );
#endif
}

void mrpt::opengl::registerAllClasses_mrpt_opengl()
{
	::registerAllClasses_mrpt_opengl();
	// deps:
	mrpt::img::registerAllClasses_mrpt_img();
	mrpt::poses::registerAllClasses_mrpt_poses();
}


text:
%%%%%%%%%%%%%%%%%%%%%
%
% Author: Wachter Johannes
% Date: 17.01.2014
% File: individual/settings.tex
%
% Individual settings

% place here your individual settings
% e.g.
\renewcommand{\mypapersize}{A4}


text:
package com.rarebooks.library

import akka.testkit.TestProbe

class RareBooksAppSpec extends BaseAkkaSpec("as-3004-rare-books-app-spec") {

  "Creating RareBooksApp" should {
    new RareBooksApp(system) {
      createCustomer(3, 100, 5)
    }
    "create a top-level actor named 'rare-books'" in {
      TestProbe().expectActor("/user/rare-books")
    }
    "create n customers as top-level actors when calling createCustomer" in {
      TestProbe().expectActor("/user/$a")
      TestProbe().expectActor("/user/$b")
      TestProbe().expectActor("/user/$c")
    }
  }
}


text:
package framework

import (
	"github.com/kubernetes-sigs/kube-batch/pkg/scheduler/api"
)

// Event structure
type Event struct {
	Task *api.TaskInfo
}

// EventHandler structure
type EventHandler struct {
	AllocateFunc   func(event *Event)
	DeallocateFunc func(event *Event)
}


text:
using log4net.Core;

namespace Public.Common.Lib.Logging.Log4Net
{
    public class LoggerWrapper : ILogger
    {
        public LogImpl Logger { get; }

        public LoggerWrapper(LogImpl logger)
        {
            this.Logger = logger;
        }

        public bool IsEnabled(Level level)
        {
            var log4Level = level.ToLog4Level();

            var output = this.Logger.Logger.IsEnabledFor(log4Level);
            return output;
        }

        public void Log(Level level, object message)
        {
            switch(level)
            {
                case Level.Info:
                    this.Logger.Info(message);
                    break;

                case Level.Debug:
                    this.Logger.Debug(message);
                    break;

                case Level.Warn:
                    this.Logger.Warn(message);
                    break;

                case Level.Error:
                    this.Logger.Error(message);
                    break;

                case Level.Fatal:
                    this.Logger.Fatal(message);
                    break;

                default:
                    // Do nothing.
                    break;
            }
        }
    }
}


text:
import { Component } from '@angular/core';
import { Graphs, SpanType, StatisticsView } from 'app/entities/statistics.model';

@Component({
    selector: 'jhi-statistics',
    templateUrl: './statistics.component.html',
})
export class StatisticsComponent {
    // html properties
    SpanType = SpanType;
    graphTypes = [
        Graphs.SUBMISSIONS,
        Graphs.ACTIVE_USERS,
        Graphs.LOGGED_IN_USERS,
        Graphs.RELEASED_EXERCISES,
        Graphs.EXERCISES_DUE,
        Graphs.CONDUCTED_EXAMS,
        Graphs.EXAM_PARTICIPATIONS,
        Graphs.EXAM_REGISTRATIONS,
        Graphs.ACTIVE_TUTORS,
        Graphs.CREATED_RESULTS,
        Graphs.CREATED_FEEDBACKS,
    ];
    currentSpan: SpanType = SpanType.WEEK;
    statisticsView: StatisticsView = StatisticsView.ARTEMIS;

    constructor() {}

    onTabChanged(span: SpanType): void {
        this.currentSpan = span;
    }
}


text:
package com.solaiemes.services.connector;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JSONSerializer;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;

import com.solaiemes.constant.Constants;
import com.solaiemes.main.Main;

public class JoynConnector {

	private static final Log log = LogFactory.getLog(JoynConnector.class);
	public static void sendLongResponse(String contactId, String responseText, String username,String token){

		HttpPost im = new HttpPost(Constants.URLIM);
		im.addHeader("app_id", Constants.API_ID);
		im.addHeader("app_key", Constants.API_KEY);

		try {

			List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4);
		    nameValuePairs.add(new BasicNameValuePair("action", "sendIMMessageAutomaticSession"));
		    nameValuePairs.add(new BasicNameValuePair("username", username));
		    if(token!=null)
		    	nameValuePairs.add(new BasicNameValuePair("token", token));
		    nameValuePairs.add(new BasicNameValuePair("contactId", contactId));
		    nameValuePairs.add(new BasicNameValuePair("message", responseText));
		    im.setEntity(new UrlEncodedFormEntity(nameValuePairs));
			HttpResponse response = Main.getHttsClient().execute(im);

			int errorCode =response.getStatusLine().getStatusCode();

			if(errorCode == 200) {
		        String responseBody = EntityUtils.toString(response.getEntity());
		        JSONObject json = (JSONObject) JSONSerializer.toJSON(responseBody);
		  	    if(json==null){
		            log.error("Send IM error:"+username+", Notification, JSON response is null");
		        }else if(json.getInt("errorCode")!=0){
		  	    	log.error("Send IM error:"+username+", Code error is not 0, "+json.getInt("errorCode"));
		  	    }else{
		  	    	log.info("Send IM OK "+username);
		  	    }
			}else{
				log.error("Error invoke Send IM Api "+username+", "+errorCode);
			}
		} catch (ClientProtocolException e) {
			log.error("sendLongResponse(), ClientProtocolException: "+e.getCause());
		} catch (IOException e) {
			log.error("sendLongResponse(), IOException: "+e.getCause());
		}

	}

	public static void sendFile(String contentType, String contactId, String filename, String subject, String fileUrl,String username,String token){

		HttpPost ft = new HttpPost(Constants.URLFT);
		ft.addHeader("app_id", Constants.API_ID);
		ft.addHeader("app_key", Constants.API_KEY);

		try {

			List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4);
		    nameValuePairs.add(new BasicNameValuePair("action", "sendFile"));
		    nameValuePairs.add(new BasicNameValuePair("username", username));
		    if(token!=null)
		    	nameValuePairs.add(new BasicNameValuePair("token", token));
		    nameValuePairs.add(new BasicNameValuePair("contactId", contactId));
		    nameValuePairs.add(new BasicNameValuePair("subject", subject));
		    nameValuePairs.add(new BasicNameValuePair("filename", filename));
		    nameValuePairs.add(new BasicNameValuePair("fileUrl", fileUrl));
		    nameValuePairs.add(new BasicNameValuePair("contentType", contentType));

		    ft.setEntity(new UrlEncodedFormEntity(nameValuePairs));
			HttpResponse response = Main.getHttsClient().execute(ft);

			int errorCode =response.getStatusLine().getStatusCode();

			if(errorCode == 200) {
		        String responseBody = EntityUtils.toString(response.getEntity());
		        JSONObject json = (JSONObject) JSONSerializer.toJSON(responseBody);
		  	    if(json==null){
		            log.error("Send FT error:"+username+", Notification, JSON response is null");
		        }else if(json.getInt("errorCode")!=0){
		  	    	log.error("Send FT error:"+username+", Code error is not 0, "+json.getInt("errorCode"));
		  	    }else{
		  	    	log.info("Send FT OK "+username);
		  	    }
			}else{
				log.error("Error invoke Send FT Api "+username+", "+errorCode+", "+response.getStatusLine().toString());
			}
		} catch (ClientProtocolException e) {
			log.error("sendLongResponse(), ClientProtocolException: "+e.getCause());
		} catch (IOException e) {
			log.error("sendLongResponse(), IOException: "+e.getCause());
		}
	  }

	public static JSONArray comet(String username){
		JSONArray jsa=new JSONArray();
		try{
			HttpGet comet = new HttpGet(Constants.URLNOTIFIER+"?username="+username);
			comet.addHeader("app_id", Constants.API_ID);
			comet.addHeader("app_key", Constants.API_KEY);
			HttpResponse response = Main.getHttsClient().execute(comet);
			StatusLine statusLine = response.getStatusLine();

				if(statusLine!=null){
					HttpEntity rEntity = response.getEntity();
					if(statusLine.getStatusCode() == 200 && rEntity!=null) {
						String responseBody = EntityUtils.toString(rEntity);
						JSONObject json = (JSONObject) JSONSerializer.toJSON(responseBody);
						if(json!=null && !json.isEmpty() && json.containsKey("notifications")){
					        jsa=json.getJSONArray("notifications");
					    }
					}
				}

		} catch (Exception e) {}

		return jsa;
}

}


text:
package com.facebook.buck.io;

import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assume.assumeTrue;

import com.facebook.buck.event.DefaultBuckEventBus;
import com.facebook.buck.io.filesystem.PathOrGlobMatcher;
import com.facebook.buck.model.BuildId;
import com.facebook.buck.testutil.integration.TemporaryPaths;
import com.facebook.buck.timing.DefaultClock;
import com.facebook.buck.timing.FakeClock;
import com.facebook.buck.util.Ansi;
import com.facebook.buck.util.Console;
import com.facebook.buck.util.Verbosity;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

public class WatchmanWatcherIntegrationTest {

  @Rule public TemporaryPaths tmp = new TemporaryPaths();

  private Watchman watchman;
  private EventBus eventBus;
  private WatchmanEventCollector watchmanEventCollector;

  @Before
  public void setUp() throws InterruptedException, IOException {

    // Create an empty watchman config file.
    Files.write(tmp.getRoot().resolve(".watchmanconfig"), new byte[0]);

    watchman =
        Watchman.build(
            ImmutableSet.of(tmp.getRoot()),
            ImmutableMap.copyOf(System.getenv()),
            new Console(Verbosity.ALL, System.out, System.err, Ansi.withoutTty()),
            new DefaultClock(),
            Optional.empty());
    assumeTrue(watchman.getWatchmanClient().isPresent());

    eventBus = new EventBus();
    watchmanEventCollector = new WatchmanEventCollector();
    eventBus.register(watchmanEventCollector);
  }

  @Test
  public void ignoreDotFileInGlob() throws IOException, InterruptedException {
    WatchmanWatcher watcher = createWatchmanWatcher(new PathOrGlobMatcher("**/*.swp"));

    // Create a dot-file which should be ignored by the above glob.
    Path path = tmp.getRoot().getFileSystem().getPath("foo/bar/.hello.swp");
    Files.createDirectories(tmp.getRoot().resolve(path).getParent());
    Files.write(tmp.getRoot().resolve(path), new byte[0]);

    // Verify we don't get an event for the path.
    watcher.postEvents(
        new DefaultBuckEventBus(FakeClock.DO_NOT_CARE, new BuildId()),
        WatchmanWatcher.FreshInstanceAction.NONE);
    assertThat(watchmanEventCollector.getEvents(), Matchers.empty());
  }

  @Test
  public void globMatchesWholeName() throws IOException, InterruptedException {
    WatchmanWatcher watcher = createWatchmanWatcher(new PathOrGlobMatcher("*.txt"));

    // Create a dot-file which should be ignored by the above glob.
    Path path = tmp.getRoot().getFileSystem().getPath("foo/bar/hello.txt");
    Files.createDirectories(tmp.getRoot().resolve(path).getParent());
    Files.write(tmp.getRoot().resolve(path), new byte[0]);

    // Verify we still get an event for the created path.
    watcher.postEvents(
        new DefaultBuckEventBus(FakeClock.DO_NOT_CARE, new BuildId()),
        WatchmanWatcher.FreshInstanceAction.NONE);
    ImmutableList<WatchmanEvent> events = watchmanEventCollector.getEvents();
    assertThat(events.size(), Matchers.equalTo(1));
    WatchmanPathEvent event = (WatchmanPathEvent) events.get(0);
    Path eventPath = event.getPath();
    assertThat(eventPath, Matchers.equalTo(path));
    assertSame(event.getKind(), WatchmanPathEvent.Kind.CREATE);
  }

  // Create a watcher for the given ignore paths, clearing the initial overflow event before
  // returning it.
  private WatchmanWatcher createWatchmanWatcher(PathOrGlobMatcher... ignorePaths)
      throws IOException, InterruptedException {

    WatchmanWatcher watcher =
        new WatchmanWatcher(
            ImmutableMap.of(
                tmp.getRoot(), ProjectWatch.of(tmp.getRoot().toString(), Optional.empty())),
            eventBus,
            ImmutableSet.copyOf(ignorePaths),
            watchman,
            ImmutableMap.of(
                tmp.getRoot(),
                new WatchmanCursor(
                    new StringBuilder("n:buckd").append(UUID.randomUUID()).toString())));

    // Clear out the initial overflow event.
    watcher.postEvents(
        new DefaultBuckEventBus(FakeClock.DO_NOT_CARE, new BuildId()),
        WatchmanWatcher.FreshInstanceAction.NONE);
    watchmanEventCollector.clear();

    return watcher;
  }

  private static final class WatchmanEventCollector {

    private final List<WatchmanEvent> events = new ArrayList<>();

    @Subscribe
    protected void handle(WatchmanEvent event) {
      events.add(event);
    }

    public void clear() {
      events.clear();
    }

    public ImmutableList<WatchmanEvent> getEvents() {
      return ImmutableList.copyOf(events);
    }
  }
}


text:
;(function () {
    'use strict';

    var module = angular.module('alv-ch-ng.forms', ['alv-ch-ng.core','ui.bootstrap.typeahead','ui.bootstrap.tooltip']);

    module.directive('formDatepicker', ['$compile','$translate','UiRenderService', function ($compile,$translate,UiRenderService) {
        return {
            priority: 10,
            restrict: 'A',
            scope: {
                ngModel: '=',
                formDatepicker: '='
            },
            link: function (scope, element, attrs) {
                var config = UiRenderService.getDatepickerConfig();
                var extend = scope.formDatepicker || false;
                if (extend){
                    if (angular.isString(extend)) {
                        angular.extend(config, angular.fromJson(extend));
                    } else {
                        angular.extend(config, extend);
                    }
                }

                // update config and element when options change
                scope.$watch('formDatepicker', function() {
                    angular.extend(config, scope.formDatepicker);
                    element.datepicker('remove');
                    element.datepicker(config);
                    element.datepicker('update',scope.ngModel);
                }, true);

                config.language=$translate.use();

                // do layout
                element.addClass("form-control");
                if (attrs['formDatepickerComponent']){
                    var component=angular.element('');
                    if (attrs['formDatepickerComponentInset']){
                        component.addClass('input-group-inset');
                    }
                    if (attrs['formDatepickerComponentIcon']){
                        component.attr('glyph-icon',attrs['formDatepickerComponentIcon']);
                    }
                    else if (attrs['formDatepickerComponentSymbol']){
                        component.attr('admin-symbol',attrs['formDatepickerComponentSymbol']);
                    }
                    else {
                        component.attr('glyph-icon','calendar');
                    }
                    element.wrap(angular.element('

'));
                    $compile(component)(scope);
                    if (attrs['formDatepickerComponentLeft'] || attrs['formDatepickerComponentInset']){
                        element.before(component);
                    }
                    else {
                        element.after(component);
                    }
                }

                // init datepicker
                element.datepicker(config);

                scope.$root.$on('$translateChangeSuccess', function () {
                    config.language=$translate.use();
                    element.datepicker('remove');
                    element.datepicker(config);
                    element.datepicker('update',scope.ngModel);
                });

                scope.showDatepicker=function(){
                    element.datepicker('show');
                };
            }
        };
    }]);

    module.directive('formPlaceholderLabel', ['$compile', function ($compile) {
        return {
            priority: 10,
            restrict: 'A',
            link: function (scope, element, attrs) {
                var placeholderType = attrs.formPlaceholderLabelType;
                if (placeholderType !== 'label' && placeholderType !== 'inside' && placeholderType !== 'outline') {
                    placeholderType = 'label';
                }
                var fg = angular.element('

');
                fg.addClass('placeholder-' + placeholderType);

                var placeholder = angular.element('');
                $compile(placeholder)(scope);

                placeholder.hide();

                if (attrs.id !== undefined) {
                    placeholder.attr("for", attrs.id);
                }

                element.wrap(fg);
                element.after(placeholder);

                scope.$watch(attrs.ngModel, function (newValue) {
                    if (newValue === "" || angular.isUndefined(newValue)) {
                        element.next().fadeOut("fast");
                        element.removeClass('active');
                    }
                    else {
                        element.addClass('active');
                        element.next().fadeIn("fast");
                    }
                });
            }
        };
    }]);

    module.directive('formTextarea', function () {
        return {
            priority: 20,
            restrict: 'A',
            link: function (scope, element, attrs) {
                element.addClass('form-control');
                if (angular.isString(attrs.formTextareaResize)){
                    element.addClass('form-resize-'+attrs.formTextareaResize);
                    if (element.parent().hasClass('form-group') && attrs.formTextareaOverflow!==undefined){
                        element.addClass('form-overflow');
                        element.parent().css('height',element.parent().outerHeight(true));
                    }
                }
            }
        };
    });

    module.directive('formInput', function () {
        return {
            restrict: 'A',
            priority: 10,
            link: function (scope, element) {
                element.addClass("form-control");
            }
        };
    });

    module.directive('formPassword', ['$compile', function ($compile) {
        return {
            restrict: 'A',
            priority: 20,
            link: function (scope, element) {
                element.addClass("form-control").addClass('inset-align-right');

                var inputGroup = angular.element('

');
                var inputGroupInset = angular.element('');

                $compile(inputGroupInset)(scope);

                element.wrap(inputGroup);
                element.after(inputGroupInset);

                scope.formShowPassword = function(){
                    if (element.attr('type')==='password'){
                        element.attr('type', 'text');
                    }
                    else {
                        element.attr('type', 'password');
                    }
                };

                scope.formIsShowPassword=function(){
                    if (element.attr('type')==='password'){
                        return false;
                    }
                    return true;
                };
            }
        };
    }]);

    module.directive('formMailcheck', ['$compile', function($compile) {
        return {
            restrict: 'A',
            priority: 20,
            scope: true,
            controller: function($scope, $parse){
                this.model = null;
                this.suggestion = null;
                this.empty = function() {
                    this.suggested = false;
                    return this.suggestion = null;
                };
                this.suggest = function(suggestion) {
                    this.suggested = true;
                    return this.suggestion = suggestion;
                };
                return this.select = function() {
                    $parse(this.model).assign($scope,this.suggestion.full);
                    return this.empty();
                };
            },
            compile: function(){
                return {
                    pre: function(scope, element, attrs, controller) {
                        return scope.mailcheck = controller;
                    },
                    post: function(scope, element, attrs, controller) {
                        controller.model = attrs['ngModel'];
                        var helpText    = angular.element('
'+
                        ' '+
                        '{{mailcheck.suggestion.address}}@{{mailcheck.suggestion.domain}}?'+
                        '
');
                        $compile(helpText)(scope);

                        if (attrs.formMailcheck){
                            var defaultText = angular.element('

');
                            $compile(defaultText)(scope);
                            element.before(defaultText);
                            element.before(helpText);
                        }
                        else {
                            element.after(helpText);
                        }

                        return element.on('keyup blur', function() {
                            return element.mailcheck({
                                domains: ['alice.it','ymail.com','aol.com','besonet.ch','bluemail.ch','bluewin.ch','freenet.ch','freenet.de','gmail.com','googlemail.com','gmx.ch','gmx.net','hispeed.ch','hotmail.ch','hotmail.com','sunrise.ch','me.com','msn.ch','outlook.com','seco.admin.ch','yahoo.de','yahoo.com'],
                                topLevelDomains: ['ch','com','net','de','it','fr','at','li','es'],
                                suggested: function(ele, suggestion) {
                                    return controller.suggest(suggestion);
                                },
                                empty: function() {
                                    return scope.$apply(function() {
                                        return controller.empty();
                                    });
                                }
                            });
                        });
                    }
                };
            }
        };
    }]);

    module.directive('formLabel', ['$compile', 'UiRenderService', function ($compile, UiRenderService) {
        return {
            restrict: 'A',
            priority: 10,
            link: function (scope, element, attrs) {
                var labelTranslate=true;
                var helpTextTranslate=true;
                var inlineForm = element.parent().hasClass("form-inline");
                var horizontalForm = element.parent().hasClass("form-horizontal");
                var fg = angular.element('

');
                var cb = angular.element('

');
                var horizontalFormLayer = UiRenderService.getFormGridContent();
                if (attrs.type === "checkbox" || attrs.type === "radio") {
                    cb.addClass(attrs.type);
                    cb.addClass(UiRenderService.getClassPrefix('check'));
                }

                // label/helptext i18n Text and compile
                if (attrs.formLabelTranslate === "false") {
                    labelTranslate=false;
                }
                var labelText=angular.element(''+attrs.formLabel + '');
                if (labelTranslate) {
                    labelText = angular.element('');
                    $compile(labelText)(scope);
                }

                if (attrs.formHelpextTranslate==='false'){
                    helpTextTranslate=false;
                }
                var helpText;
                if (attrs.formHelptext !== undefined) {
                    helpText = UiRenderService.getHelptext(attrs.formHelptext,helpTextTranslate);
                    $compile(helpText)(scope);
                }

                // wrap form group
                if (horizontalForm || (attrs.type !== "checkbox" && attrs.type !== "radio")) {
                    element.wrap(fg);
                }
                // wrap checkbox/radio layer
                if (attrs.type === "checkbox" || attrs.type === "radio") {
                    // wrap horizontal form for checkbox/radio
                    if (horizontalForm) {
                        horizontalFormLayer.addClass(UiRenderService.getFormGridLabelClass(true));
                        element.wrap(horizontalFormLayer);
                    }
                    element.wrap(cb);
                }

                // label
                var label = angular.element('');
                if (horizontalForm && attrs.type !== "checkbox" && attrs.type !== "radio") {
                    label.addClass(UiRenderService.getFormGridLabelClass()).addClass('control-label');
                }
                if (inlineForm && attrs.type !== "checkbox" && attrs.type !== "radio") {
                    label.addClass('sr-only');
                }
                if (attrs.type !== "checkbox" && attrs.type !== "radio") {
                    label.append(labelText);
                    element.before(label);
                    if (horizontalForm) {
                        element.wrap(horizontalFormLayer);
                    }
                }
                else {
                    labelText.addClass(attrs.type + '-label');
                    label.append(labelText);
                    label.append(angular.element(''));
                    element.after(label);
                }

                if (attrs.formHelptext !== undefined && !horizontalForm && !inlineForm) {
                    element.before(helpText);
                }
                else if (attrs.formHelptext !== undefined && horizontalForm) {
                    element.after(helpText);
                }
                else if (attrs.formHelptext !== undefined && inlineForm) {
                    helpText.addClass('sr-only');
                    element.after(helpText);
                }

                // ng-show
                if (attrs.ngShow !== undefined) {
                    scope.$watch(attrs.ngShow, function (display) {
                        var _element = element.parent();
                        if (horizontalForm || attrs.formPrepend || attrs.formAppend || attrs.formPrependDropdown || attrs.formAppendDropdown) {
                            _element = _element.parent();
                        }

                        if (display === true || display === 'true') {
                            _element.addClass("ng-show");
                            _element.removeClass("ng-hide");
                        }
                        else {
                            _element.addClass("ng-hide");
                            _element.removeClass("ng-show");
                        }
                    });
                }
                // ng-hide
                if (attrs.ngHide !== undefined) {
                    scope.$watch(attrs.ngHide, function (hide) {
                        var _element = element.parent();
                        if (horizontalForm || attrs.formPrepend || attrs.formAppend || attrs.formPrependDropdown || attrs.formAppendDropdown) {
                            _element = _element.parent();
                        }

                        if (hide === true || hide === 'true') {
                            _element.addClass("ng-hide");
                            _element.removeClass("ng-show");
                        }
                        else {
                            _element.addClass("ng-show");
                            _element.removeClass("ng-hide");
                        }
                    });
                }
            }
        };
    }]);

    // todo refactoring
    module.directive('formTag', ['$compile', '$parse', function ($compile, $parse) {
        return {
            restrict: 'A',
            priority: 20,
            link: function (scope, element, attrs) {
                var targetModel = $parse(attrs.formTargetModel)(scope);
                var fg = angular.element('

');
                var tagLayer = angular.element('');
                var tagLayerItem = angular.element('
{{item.text}}<button type="button" data-dismiss="alert" aria-hidden="true" class="close" ng-click="removeFromModel($index)">×</button>
');
                $compile(tagLayerItem)(scope);
                tagLayer.append(tagLayerItem);
                element.wrap(fg);
                element.before(tagLayer);
                element.addClass("tag-input");
                scope.removeFromModel = function (tagIndex) {
                    targetModel.splice(tagIndex, 1);
                };
                scope.addToTargetModel = function (newObject) {
                    var duplicate = false;
                    angular.forEach(targetModel, function (value) {
                        if (angular.equals(newObject, value)) {
                            duplicate = true;
                        }
                    });
                    if (!duplicate) {
                        targetModel.push(newObject);
                    }
                };
            }
        };
    }]);

    // todo refacroring and simplify > formAddons
    module.directive('formAppendDropdown', ['$compile', '$parse', function ($compile, $parse) {
        return {
            restrict: 'A',
            priority: 10,
            link: function (scope, element, attrs) {
                var targetModel = $parse(attrs.formTargetModel)(scope);

                var inputGroup = angular.element('

');
                var inputGroupAppend = angular.element('');
                var inputGroupDropdown = angular.element('

');
                var dropdownTitle = '';
                if (attrs.formAppendDropdownTitle !== undefined) {
                    dropdownTitle = attrs.formAppendDropdownTitle + " ";
                }
                var dropdownButton = angular.element('<button class="dropdown-toggle btn" type="button" data-toggle="dropdown">' + dropdownTitle + '</button>');
                var dropdownList = angular.element('

');
                var dropdownListItem = angular.element('
{{item.text}}
');

                $compile(dropdownListItem)(scope);

                dropdownList.append(dropdownListItem);
                inputGroupDropdown.append(dropdownButton);
                inputGroupDropdown.append(dropdownList);
                inputGroupAppend.append(inputGroupDropdown);

                if (!element.parent().hasClass("input-group")) {
                    element.wrap(inputGroup);
                }
                element.after(inputGroupAppend);

                scope.addToTargetModel = function (newObject) {
                    var duplicate = false;
                    angular.forEach(targetModel, function (value) {
                        if (angular.equals(newObject, value)) {
                            duplicate = true;
                        }
                    });
                    if (!duplicate) {
                        targetModel.push(newObject);
                    }
                };
            }
        };
    }]);

    module.directive('formPrependDropdown', ['$compile', '$parse', function ($compile, $parse) {
        return {
            restrict: 'A',
            priority: 10,
            link: function (scope, element, attrs) {
                var targetModel = $parse(attrs.formTargetModel)(scope);

                var inputGroup = angular.element('

');
                var inputGroupPrepend = angular.element('');
                var inputGroupDropdown = angular.element('

');
                var dropdownTitle = '';
                if (attrs.formPrependDropdownTitle !== undefined) {
                    dropdownTitle = attrs.formPrependDropdownTitle + " ";
                }
                var dropdownButton = angular.element('<button class="dropdown-toggle btn" type="button" data-toggle="dropdown">' + dropdownTitle + '</button>');
                var dropdownList = angular.element('

');
                var dropdownListItem = angular.element('
{{item.text}}
');

                $compile(dropdownListItem)(scope);

                dropdownList.append(dropdownListItem);
                inputGroupDropdown.append(dropdownButton);
                inputGroupDropdown.append(dropdownList);
                inputGroupPrepend.append(inputGroupDropdown);

                if (!element.parent().hasClass("input-group")) {
                    element.wrap(inputGroup);
                }
                element.before(inputGroupPrepend);

                scope.addToTargetModel = function (newObject) {
                    var duplicate = false;
                    angular.forEach(targetModel, function (value) {
                        if (angular.equals(newObject, value)) {
                            duplicate = true;
                        }
                    });
                    if (!duplicate) {
                        targetModel.push(newObject);
                    }
                };
            }
        };
    }]);

    module.directive('formAppend', ['$compile', function ($compile) {
        return {
            restrict: 'A',
            priority: 20,
            link: function (scope, element, attrs) {
                var inputGroup = angular.element('

');
                var inputGroupAppend = angular.element('');

                if (attrs.formAppendIcon === undefined && attrs.formAppendBtn === undefined){
                    var appendText = angular.element('');
                    $compile(appendText)(scope);
                    inputGroupAppend.append(appendText);
                }
                else if (attrs.formAppendIcon === "true" && attrs.formAppendBtn === undefined) {
                    inputGroupAppend.attr('glyph-icon', attrs.formAppend);
                    $compile(inputGroupAppend)(scope);
                }

                if (attrs.formAppendBtn !== undefined) {
                    var appendBtnType="button";
                    if (attrs.formAppendBtnSubmit !== undefined && attrs.formAppendBtnSubmit==="true") {
                        appendBtnType="submit";
                    }
                    var appendBtn = angular.element('<button type="'+appendBtnType+'" ng-click="' + attrs.formAppendBtn + '"></button>');
                    if (attrs.formAppendIcon === "true") {
                        appendBtn.attr('glyph-icon', attrs.formAppend);
                    }
                    else {
                        appendBtn.attr('i18n-msg', attrs.formAppend);
                    }
                    if (element.hasClass('input-sm')){
                        appendBtn.addClass('btn-sm');
                    }
                    if (element.hasClass('input-lg')){
                        appendBtn.addClass('btn-lg');
                    }
                    $compile(appendBtn)(scope);
                    inputGroupAppend = angular.element('');
                    inputGroupAppend.append(appendBtn);
                }
                if (!element.parent().hasClass("input-group")) {
                    element.wrap(inputGroup);
                }
                element.after(inputGroupAppend);
            }
        };
    }]);

    module.directive('formPrepend', ['$compile', function ($compile) {
        return {
            restrict: 'A',
            priority: 20,
            link: function (scope, element, attrs) {
                var inputGroup = angular.element('

');
                var inputGroupPrepend = angular.element('');

                if (attrs.formPrependIcon === undefined && attrs.formPrependBtn === undefined){
                    var prependText = angular.element('');
                    $compile(prependText)(scope);
                    inputGroupPrepend.append(prependText);
                }
                else if (attrs.formPrependIcon === "true" && attrs.formPrependBtn === undefined) {
                    inputGroupPrepend.attr('glyph-icon', attrs.formPrepend);
                    $compile(inputGroupPrepend)(scope);
                }

                if (attrs.formPrependBtn !== undefined) {
                    var prependBtnType="button";
                    if (attrs.formPrependBtnSubmit !== undefined && attrs.formPrependBtnSubmit==="true") {
                        prependBtnType="submit";
                    }
                    var prependBtn = angular.element('<button type="'+prependBtnType+'" ng-click="' + attrs.formPrependBtn + '"></button>');
                    if (attrs.formPrependIcon === "true"){
                        prependBtn.attr('glyph-icon', attrs.formPrepend);
                    }
                    else {
                        prependBtn.attr('i18n-msg', attrs.formPrepend);
                    }
                    if (element.hasClass('input-sm')){
                        prependBtn.addClass('btn-sm');
                    }
                    if (element.hasClass('input-lg')){
                        prependBtn.addClass('btn-lg');
                    }
                    $compile(prependBtn)(scope);
                    inputGroupPrepend = angular.element('');
                    inputGroupPrepend.append(prependBtn);
                }
                if (!element.parent().hasClass("input-group")) {
                    element.wrap(inputGroup);
                }
                element.before(inputGroupPrepend);
            }
        };
    }]);

    module.directive('formInset', ['$compile', function ($compile) {
        return {
            restrict: 'A',
            priority: 20,
            link: function (scope, element, attrs) {
                var inputGroup = angular.element('

');
                var inputGroupInset = angular.element('');

                if (attrs.formInsetAction === undefined && attrs.formInsetBtn === undefined){
                    inputGroupInset.attr('glyph-icon', attrs.formInset);
                    $compile(inputGroupInset)(scope);
                }
                else {
                    var insetAction = angular.element('');

                    if (attrs.formInsetBtn !== undefined) {
                        var insetBtnType="button";
                        if (attrs.formInsetBtn==="submit") {
                            insetBtnType="submit";
                        }
                        insetAction = angular.element('<button type="'+insetBtnType+'" ng-click="' + attrs.formInsetAction + '"></button>');
                        if (element.hasClass('input-sm')){
                            insetAction.addClass('btn-sm');
                        }
                        if (element.hasClass('input-lg')){
                            insetAction.addClass('btn-lg');
                        }
                    }

                    insetAction.attr('glyph-icon', attrs.formInset);
                    $compile(insetAction)(scope);
                    inputGroupInset.append(insetAction);
                }

                if (!element.parent().hasClass("input-group")) {
                    element.wrap(inputGroup);
                }

                if (attrs.formInsetAlign==='right'){
                    element.addClass("inset-align-right");
                    element.after(inputGroupInset);
                }
                else {
                    element.before(inputGroupInset);
                }
            }
        };
    }]);

    module.directive('formAlert', ['$compile',function($compile){
        return {
            priority: 5,
            restrict: 'A',
            link: function(scope, element, attrs){
                var trigger = attrs.formAlertTrigger || true;
                var severity = attrs.alertSeverity || "info";
                var dismissable = attrs.alertDismissable || false;
                var dismissableText = attrs.alertDismissableText || false;
                var alert=angular.element('<alert ng-show="'+trigger+'" alert-severity="'+severity+'" alert-dismissable="'+dismissable+'"></alert>');
                if (dismissableText){
                    alert.attr('alert-dismissable-text',dismissableText);
                }
                alert.addClass('form-alert');
                $compile(alert)(scope);
                element.after(alert);
            }
        };
    }]);
}());
;angular.module('alv-ch-ng.forms').run(['$templateCache', function($templateCache) {
  'use strict';

  $templateCache.put('template/tooltip/tooltip-html-unsafe-popup.html',
    "
\n" +
    "

\n" +
    "

\n" +
    "
\n"
  );

  $templateCache.put('template/tooltip/tooltip-popup.html',
    "
\n" +
    "

\n" +
    "

\n" +
    "
\n"
  );

  $templateCache.put('template/typeahead/typeahead-match.html',
    ""
  );

  $templateCache.put('template/typeahead/typeahead-popup.html',
    "
\n" +
    "
\n" +
    "

\n" +
    "
\n" +
    "
"
  );

}]);


text:
package plugin

import (
  "gitlab.com/Kpovoc/chat-steward/internal/app/core/message"
  "gitlab.com/Kpovoc/chat-steward/internal/app/core/response"
  "gitlab.com/Kpovoc/chat-steward/internal/app/plugin/info"
  "gitlab.com/Kpovoc/chat-steward/internal/app/plugin/show"
  "gitlab.com/Kpovoc/chat-steward/internal/app/plugin/titles"
  "gitlab.com/Kpovoc/chat-steward/internal/app/plugin/eightball"
  "math/rand"
)

type PluginConf struct {
  Info []info.InfoConfItem
}

func GetPluginResponse(pluginName string, msgContent string, m *message.Message) *response.Response {

  switch pluginName {
  case "8ball":
    fallthrough
  case "eightball":
    return eightball.Plugin(msgContent, randNum)
  case "suggest":
    return titles.Plugin(m, msgContent)
  case "show":
    return show.Plugin(m.Sender, msgContent)
  case "info":
    return info.Plugin(msgContent)
  default:
    return nil
  }
}

func randNum(x int) int {
  return rand.Intn(x)
}


text: Wox plugin for edit hosts files


text:
WEBANALYTICS_HTML_CODE = """

"""


text:
package com.codespair.mockstocks.service.kafka.consumer;

import com.codespair.mockstocks.config.KafkaConfigProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

@Component
@DependsOn("stringJsonNodeClientConsumer")
@Slf4j
public class SimpleStreamClient {
    KafkaConfigProperties config;
    StringJsonNodeClientConsumer client;

    public SimpleStreamClient(KafkaConfigProperties kafkaConfigProperties,
                              StringJsonNodeClientConsumer stringJsonNodeClientConsumer) {
        this.config = kafkaConfigProperties;
        this.client = stringJsonNodeClientConsumer;
    }

    public void startConsumingStockQuotes() {
        log.info("SimpleStreamClient.startconsumingStockQuotes");
        client.configure(topicName() + "-client", topicName());
        client.startConsumer();
    }

    private String topicName() {
        // streams from stock-quote
        return config.getStockQuote().getTopic();
    }
}


text:
// ======================================================================== //
// Copyright 2009-2015 Intel Corporation                                    //
//                                                                          //
// 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.                                           //
// ======================================================================== //

#pragma once

#include "default.h"

namespace embree
{
  struct State
  {
  public:
    /*! state construction */
    State (bool singledevice);

    /*! state destruction */
    ~State();

    /*! verifies that state is correct */
    void verify();

    /*! parses state from a configuration file */
    bool parseFile(const FileName& fileName);

    /*! parses the state from a string */
    void parseString(const char* cfg);

    /*! parses the state from a stream */
    void parse(Ref<TokenStream> cin);

    /*! prints the state */
    void print();

    /*! checks if verbosity level is at least N */
    bool verbosity(int N);

    /*! checks if some particular ISA is enabled */
    bool hasISA(const int isa);

  public:
    std::string tri_accel;                 //!< acceleration structure to use for triangles
    std::string tri_builder;               //!< builder to use for triangles
    std::string tri_traverser;             //!< traverser to use for triangles
    double      tri_builder_replication_factor; //!< maximally factor*N many primitives in accel

  public:
    std::string tri_accel_mb;              //!< acceleration structure to use for motion blur triangles
    std::string tri_builder_mb;            //!< builder to use for motion blur triangles
    std::string tri_traverser_mb;          //!< traverser to use for triangles

  public:
    std::string quad_accel;                 //!< acceleration structure to use for quads
    std::string quad_builder;               //!< builder to use for quads
    std::string quad_traverser;             //!< traverser to use for quads

  public:
    std::string quad_accel_mb;             //!< acceleration structure to use for motion blur quads
    std::string quad_builder_mb;           //!< builder to use for motion blur quads
    std::string quad_traverser_mb;         //!< traverser to use for motion blur quads

  public:
    std::string line_accel;                 //!< acceleration structure to use for line segments
    std::string line_builder;               //!< builder to use for line segments
    std::string line_traverser;             //!< traverser to use for line segments

  public:
    std::string line_accel_mb;             //!< acceleration structure to use for motion blur line segments
    std::string line_builder_mb;           //!< builder to use for motion blur line segments
    std::string line_traverser_mb;         //!< traverser to use for motion blur line segments

  public:
    std::string hair_accel;                //!< hair acceleration structure to use
    std::string hair_builder;              //!< builder to use for hair
    std::string hair_traverser;            //!< traverser to use for hair
    double      hair_builder_replication_factor; //!< maximally factor*N many primitives in accel

  public:
    std::string hair_accel_mb;             //!< acceleration structure to use for motion blur hair

  public:
    int object_accel_min_leaf_size;         //!< minimal leaf size for object acceleration structure
    int object_accel_max_leaf_size;         //!< maximal leaf size for object acceleration structure

  public:
    int object_accel_mb_min_leaf_size;         //!< minimal leaf size for mblur object acceleration structure
    int object_accel_mb_max_leaf_size;         //!< maximal leaf size for mblur object acceleration structure

  public:
    float       memory_preallocation_factor;
    size_t      tessellation_cache_size;   //!< size of the shared tessellation cache
    std::string subdiv_accel;              //!< acceleration structure to use for subdivision surfaces

  public:
    bool float_exceptions;                 //!< enable floating point exceptions
    int scene_flags;                       //!< scene flags to use
    size_t verbose;                        //!< verbosity of output
    size_t benchmark;                      //!< true
    size_t regression_testing;             //!< enables regression tests at startup

  public:
    size_t numThreads;                     //!< number of threads to use in builders
    bool set_affinity;                     //!< sets affinity for worker threads
    int enabled_cpu_features;              //!< CPU ISA features to use

  public:
    struct ErrorHandler
    {
    public:
      ErrorHandler();
      ~ErrorHandler();
      RTCError* error();

    public:
      tls_t thread_error;
      std::vector<RTCError*> thread_errors;
      MutexSys errors_mutex;
    };
    ErrorHandler errorHandler;
    static ErrorHandler g_errorHandler;

  public:
    RTCErrorFunc error_function;
    RTCMemoryMonitorFunc memory_monitor_function;
  };
}


text:
define('dojo/nls/dojo_ko-kr',{
'dijit/nls/loading':{"loadingState":"로드 중...","errorState":"죄송합니다. 오류가 발생했습니다."}
,
'dijit/nls/common':{"buttonOk":"확인","buttonCancel":"취소","buttonSave":"저장","itemClose":"닫기"}
,
'dijit/form/nls/validate':{"invalidMessage":"입력된 값이 올바르지 않습니다.","missingMessage":"이 값은 필수입니다.","rangeMessage":"이 값은 범위를 벗어납니다."}
,
'dijit/form/nls/ComboBox':{"previousMessage":"이전 선택사항","nextMessage":"기타 선택사항"}
,
'dojox/form/nls/Uploader':{"label":"파일 선택..."}
,
'dojo/cldr/nls/number':{"scientificFormat":"#E0","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","infinity":"∞","list":";","percentSign":"%","minusSign":"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","decimalFormat-short":"000조","currencySpacing-afterCurrency-insertBetween":" ","nan":"NaN","plusSign":"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencyFormat":"¤#,##0.00;(¤#,##0.00)","perMille":"‰","group":",","percentFormat":"#,##0%","decimalFormat-long":"000조","decimalFormat":"#,##0.###","decimal":".","currencySpacing-beforeCurrency-insertBetween":" ","exponential":"E"}
});