text:
#pragma once
#include <aws/devicefarm/DeviceFarm_EXPORTS.h>
#include <aws/devicefarm/model/OfferingTransaction.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace DeviceFarm
{
namespace Model
{
  /**
   *
The result of a renewal offering.

See Also:
   AWS
   * API Reference

   */
  class AWS_DEVICEFARM_API RenewOfferingResult
  {
  public:
    RenewOfferingResult();
    RenewOfferingResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    RenewOfferingResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /**
     *
Represents the status of the offering transaction for the renewal.

     */
    inline const OfferingTransaction& GetOfferingTransaction() const{ return m_offeringTransaction; }

    /**
     *
Represents the status of the offering transaction for the renewal.

     */
    inline void SetOfferingTransaction(const OfferingTransaction& value) { m_offeringTransaction = value; }

    /**
     *
Represents the status of the offering transaction for the renewal.

     */
    inline void SetOfferingTransaction(OfferingTransaction&& value) { m_offeringTransaction = std::move(value); }

    /**
     *
Represents the status of the offering transaction for the renewal.

     */
    inline RenewOfferingResult& WithOfferingTransaction(const OfferingTransaction& value) { SetOfferingTransaction(value); return *this;}

    /**
     *
Represents the status of the offering transaction for the renewal.

     */
    inline RenewOfferingResult& WithOfferingTransaction(OfferingTransaction&& value) { SetOfferingTransaction(std::move(value)); return *this;}

  private:

    OfferingTransaction m_offeringTransaction;
  };

} // namespace Model
} // namespace DeviceFarm
} // namespace Aws


text:
from robotide.lib.robot.errors import DataError

class ArgumentMapper(object):

    def __init__(self, argspec):
        """:type argspec: :py:class:`robot.running.arguments.ArgumentSpec`"""
        self._argspec = argspec

    def map(self, positional, named, replace_defaults=True):
        template = KeywordCallTemplate(self._argspec)
        template.fill_positional(positional)
        template.fill_named(named)
        if replace_defaults:
            template.replace_defaults()
        return template.args, template.kwargs

class KeywordCallTemplate(object):

    def __init__(self, argspec):
        """:type argspec: :py:class:`robot.running.arguments.ArgumentSpec`"""
        self._argspec = argspec
        self.args = [None if arg not in argspec.defaults
                     else DefaultValue(argspec.defaults[arg])
                     for arg in argspec.positional]
        self.kwargs = []

    def fill_positional(self, positional):
        self.args[:len(positional)] = positional

    def fill_named(self, named):
        spec = self._argspec
        for name, value in named:
            if name in spec.positional and spec.supports_named:
                index = spec.positional.index(name)
                self.args[index] = value
            elif spec.kwargs or name in spec.kwonlyargs:
                self.kwargs.append((name, value))
            else:
                raise DataError("Non-existing named argument '%s'." % name)
        named_names = {name for name, _ in named}
        for name in spec.kwonlyargs:
            if name not in named_names:
                value = DefaultValue(spec.defaults[name])
                self.kwargs.append((name, value))

    def replace_defaults(self):
        is_default = lambda arg: isinstance(arg, DefaultValue)
        while self.args and is_default(self.args[-1]):
            self.args.pop()
        self.args = [a if not is_default(a) else a.value for a in self.args]
        self.kwargs = [(n, v) for n, v in self.kwargs if not is_default(v)]

class DefaultValue(object):

    def __init__(self, value):
        self.value = value

    def resolve(self, variables):
        try:
            return variables.replace_scalar(self.value)
        except DataError as err:
            raise DataError('Resolving argument default values failed: %s'
                            % err.message)

redpajama_set_name: RedPajamaGithub


text:
package com.google.refine.browsing;

import com.google.refine.model.Project;
import com.google.refine.model.Record;

/**
 * Interface for visiting records one by one. The records visited are only those that match some
 * particular criteria, such as facets' constraints.
 */
public interface RecordVisitor {
    public void start(Project project); // called before any visit() call

    public boolean visit(
            Project project,
            Record record
    );

    public void end(Project project); // called after all visit() calls
}


text:
package nl.basjes.parse.useragent.clienthints.parsers;

import lombok.Getter;
import nl.basjes.parse.useragent.clienthints.ClientHints.Brand;
import nl.basjes.parse.useragent.parser.ClientHintsBaseVisitor;
import nl.basjes.parse.useragent.parser.ClientHintsLexer;
import nl.basjes.parse.useragent.parser.ClientHintsParser;
import nl.basjes.parse.useragent.parser.ClientHintsParser.BrandContext;
import nl.basjes.parse.useragent.utils.DefaultANTLRErrorListener;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CodePointCharStream;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;

import java.util.ArrayList;

public class BrandListParser extends ClientHintsBaseVisitor<Void> implements DefaultANTLRErrorListener {

    public static ArrayList<Brand> parse(String inputString) {
        return new BrandListParser(inputString).getResult();
    }

    @Getter
    private ArrayList<Brand> result;

    public BrandListParser(String inputString) {
        result = new ArrayList<>();
        CodePointCharStream input = CharStreams.fromString(inputString);
        ClientHintsLexer lexer = new ClientHintsLexer(input);
        lexer.removeErrorListeners();
        lexer.addErrorListener(this);

        CommonTokenStream tokens = new CommonTokenStream(lexer);
        ClientHintsParser parser = new ClientHintsParser(tokens);
        parser.removeErrorListeners();
        parser.addErrorListener(this);

        ParserRuleContext brandVersionListContext = parser.brandList();
        visit(brandVersionListContext);
    }

    @Override
    public Void visitBrand(BrandContext ctx) {
        if (ctx.name == null || ctx.version == null) {
            return null;
        }
        String name = ctx.name.getText();
        String version = ctx.version.getText();

        result.add(new Brand(name, version));
        return null;
    }

    @Override
    public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
        // Ignore Syntax errors. People WILL try to hack this.
    }
}


text:
<法規>
<法規性質>命令</法規性質>
<英文法規名稱>Regulations Governing the Permission for Foreign Attorneys to Employ ROC Attorneys or to Partner with ROC Attorneys to Operate a Foreign Law Firm</英文法規名稱>
<中文法規名稱>外國法事務律師僱用中華民國律師或與中華民國律師合夥經營法律事務所許可及管理辦法</中文法規名稱>
<法規網址>https://law.moj.gov.tw/Eng/LawClass/LawAll.aspx?pcode=I0020018</法規網址>
<最新英文異動日期>20201030</最新英文異動日期>
<廢止註記>
</廢止註記>
<附件 />
<沿革內容><![CDATA[1.Promulgated on February 20, 2002 by the Order of Ministry of Justice of No. 0910800356.
2.Amended October 30, 2020 by the Order No.10904524190 of Ministry of Justice.]]></沿革內容>
<前言><![CDATA[]]></前言>
<法規內容>
  <條文>
    <條號>Article 1</條號>
    <條文內容><![CDATA[These regulations are formulated in accordance with the proviso in the provisions of Paragraph 2 of Article 132 of the Attorney Regulation Act (hereinafter referred to as this Act).]]></條文內容>
  </條文>
  <條文>
    <條號>Article 2</條號>
    <條文內容><![CDATA[Foreign attorneys may apply to the Ministry of Justice, pursuant to these regulations, for permission to employ ROC attorneys, or to form a partnership with ROC attorneys, in order to operate a foreign law firm.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 3</條號>
    <條文內容><![CDATA[When a foreign attorney applies for permission to employ an ROC attorney, following documents should be submitted:
1.Two copies of the Application Form;
2.Two copies of the Identification documentation for the foreign attorney and ROC attorney, attorney license and Bar Association Membership certificate.
3.Two copies of the Employment contract.
The following items should be stated in an employment contract, as mentioned in the third subparagraph of the preceding paragraph:
1.Name of the foreign attorney, the Ministry of Justice Permit Number, nationality, number of identification documentation, domestic and overseas domicile and residence addresses, and name of the law firm and address.
2.Name of the ROC attorney intended to be employed, attorney license number and domicile or residence address.
3.Job description of the ROC attorney intended to be employed;
4.Salary;
5.Employment duration and the start and ending dates of the employment contract.
The employment contract as mentioned in subparagraph 3 of the first paragraph shall be written in Chinese or English; if English is used, a copy of a Chinese translation should be included.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 4</條號>
    <條文內容><![CDATA[When foreign attorneys apply for permission to form a partnership with ROC attorneys, the application should be submitted in the name of natural persons of all partners of foreign attorneys and ROC attorneys, along with the following documents:
1.Application Form in duplicate;
2.Identification documentation for the foreign attorney and ROC attorney, attorney license and Bar Association Membership certificate, all in duplicate.
3.Partnership contract in duplicate.
The following information should be specified in the partnership contract, as mentioned in subparagraph 3 of the preceding paragraph:
1.Name and address of the partnership office;
2.Names of the foreign attorneys, the Ministry of Justice Permit Number, nationality, number of identification documentation, domestic and overseas domicile and residence addresses;
3.Name of the ROC attorney, attorney license number and domicile or residence address;
4.Job description of each partner.
The partnership contract as mentioned in subparagraph 3 of the first paragraph shall be written in Chinese or English; if English is used, a copy of a Chinese translation should be included.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 5</條號>
    <條文內容><![CDATA[If any one of the following conditions exists in the applications as described in the preceding two articles, the permission will not be granted:
1.The application does not comply with the proviso in the provisions of Paragraph 1 of Article 123 of this Act;
2.Required documents, pursuant to the provisions of preceding two articles, were not submitted with the permit application, the submitted documents lack details or compliance with regulations, and where required corrective action was not made within the prescribed deadline after receiving notification of such requirements, or where the correction made was incomplete pursuant to specified corrective items;
3.There are sufficient facts to support the likelihood of violating the provisions of Article 11 of these regulations;
4.The attorney who applies for a partnership or employment violates the provisions of Article 121 of this Act, and the circumstances are serious in nature;
The Ministry of Justice shall make an approval/rejection decision within 60 days from the next day following the receipt of the application as described in the preceding two Articles. However, this provision does not apply to an application, where submitted documents lack details or compliance with regulations, to which a notification of corrective action within a prescribed deadline is sent.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 6</條號>
    <條文內容><![CDATA[Prior to granting permission for foreign attorneys to employ or form partnerships with ROC attorneys, the Ministry of Justice shall consult with the local Bar Association where the foreign law firm is located, and the National Bar Association for their opinions.
After consulting with local and National bar association for their opinions pursuant to the provisions of preceding paragraph, the Ministry of Justice shall notify the said bar associations of the approval/rejection status of the said application.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 7</條號>
    <條文內容><![CDATA[After obtaining permission to form a partnership with ROC attorneys, if any of the partners in the foreign law firm is changed, and the partnership with ROC attorneys continues, the foreign attorneys must submit a proof of agreement signed by all partners, and apply for permission to change. However, if all partners of either contingency, the foreign attorneys or ROC attorneys, change at the same time, the resulting law firm shall re-apply for permission.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 8</條號>
    <條文內容><![CDATA[Where foreign attorneys employ or partner with ROC attorneys, each foreign attorney's practice permit, as well as each ROC attorney's Attorney License, shall be displayed in clearly visible spaces in the law firm.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 9</條號>
    <條文內容><![CDATA[When a foreign attorney, or an ROC attorney, of an approved foreign law firm hires an ROC attorney, an application for permission of such a hiring is still required, pursuant to the provisions of these regulations]]></條文內容>
  </條文>
  <條文>
    <條號>Article 10</條號>
    <條文內容><![CDATA[Foreign attorneys, who have been granted permission to employ or partner with ROC attorneys, must immediately submit a report to the Ministry of Justice when the employment or partnership is terminated. The local Bar Association and National Bar Association shall also be notified of such a termination.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 11</條號>
    <條文內容><![CDATA[Foreign attorneys, who have been granted permission to employ or partner with ROC attorneys, may not use such employment or partnership as a guise to conduct legal affairs other than as prescribed in provisions of Article 120 of this Act.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 12</條號>
    <條文內容><![CDATA[Foreign attorneys, who have been granted permission to employ or partner with ROC attorneys, shall abide by the laws of the Republic of China, the Attorneys' Code of Ethics of ROC lawyers, and the charter of the Bar Association.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 13</條號>
    <條文內容><![CDATA[Foreign attorneys, who have been granted permission to employ or partner with ROC attorneys, shall abide by the laws of the Republic of China, the Attorneys' Code of Ethics of ROC lawyers, and the charter of the Bar Association.]]></條文內容>
  </條文>
  <條文>
    <條號>Article 14</條號>
    <條文內容><![CDATA[These Regulations shall come into force on the date of their promulgation.]]></條文內容>
  </條文>
</法規內容>
</法規>


text:
//
//  GTLQueryGroupssettings.h
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Groups Settings API (groupssettings/v1)
// Description:
//   Lets you manage permission levels and related settings of a group.
// Documentation:
//   https://developers.google.com/google-apps/groups-settings/get_started
// Classes:
//   GTLQueryGroupssettings (3 custom class methods, 2 custom properties)

#if GTL_BUILT_AS_FRAMEWORK
  #import "GTL/GTLQuery.h"
#else
  #import "GTLQuery.h"
#endif

@class GTLGroupssettingsGroups;

@interface GTLQueryGroupssettings : GTLQuery

//
// Parameters valid on all methods.
//

// Selector specifying which fields to include in a partial response.
@property (nonatomic, copy) NSString *fields;

//
// Method-specific parameters; see the comments below for more information.
//
@property (nonatomic, copy) NSString *groupUniqueId;

#pragma mark -
#pragma mark "groups" methods
// These create a GTLQueryGroupssettings object.

// Method: groupsSettings.groups.get
// Gets one resource by id.
//  Required:
//   groupUniqueId: The resource ID
//  Authorization scope(s):
//   kGTLAuthScopeGroupssettingsAppsGroupsSettings
// Fetches a GTLGroupssettingsGroups.
+ (instancetype)queryForGroupsGetWithGroupUniqueId:(NSString *)groupUniqueId;

// Method: groupsSettings.groups.patch
// Updates an existing resource. This method supports patch semantics.
//  Required:
//   groupUniqueId: The resource ID
//  Authorization scope(s):
//   kGTLAuthScopeGroupssettingsAppsGroupsSettings
// Fetches a GTLGroupssettingsGroups.
+ (instancetype)queryForGroupsPatchWithObject:(GTLGroupssettingsGroups *)object
                                groupUniqueId:(NSString *)groupUniqueId;

// Method: groupsSettings.groups.update
// Updates an existing resource.
//  Required:
//   groupUniqueId: The resource ID
//  Authorization scope(s):
//   kGTLAuthScopeGroupssettingsAppsGroupsSettings
// Fetches a GTLGroupssettingsGroups.
+ (instancetype)queryForGroupsUpdateWithObject:(GTLGroupssettingsGroups *)object
                                 groupUniqueId:(NSString *)groupUniqueId;

@end


text:
sap.ui.jsview("SMADJS.view.colour", {

	/** Specifies the Controller belonging to this View.
	 * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
	 * @memberOf controller.RegoJS
	 */
	getControllerName: function() {
		return "SMADJS.controller.colour";
	},

	/** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
	 * Since the Controller is given to this method, its event handlers can be attached right away.
	 * @memberOf controller.RegoJS
	 */
	createContent: function(oController) {

    var columns = [];

    var oColumn = new sap.m.Column({
      header: new sap.m.Text({text:"Id"})
    });
    columns.push(oColumn);

		oColumn = new sap.m.Column({
      header: new sap.m.Text({text:"First Name"})
    });
    columns.push(oColumn);

    oColumn = new sap.m.Column({
      header: new sap.m.Text({text:"Last Name"})
    });
    columns.push(oColumn);

		oColumn = new sap.m.Column({
      header: new sap.m.Text({text:"School Year"})
    });
    columns.push(oColumn);

		oColumn = new sap.m.Column({
      header: new sap.m.Text({text:"Friend Request"})
    });
    columns.push(oColumn);

    var oTable = new sap.m.Table(this.createId("table"), {
      columns: columns,
			mode: sap.m.ListMode.SingleSelectMaster
    });

		var oButtonDownload = new sap.m.Button({
			text:"Download",
			type:"Accept",
			press:[oController.downloadColourGroup,oController]
		});

		var oBar = new sap.m.Bar({
			contentRight:[oButtonDownload]
		});

    var oDetailPage = new sap.m.Page(this.createId("ColourTablePage"),{
			title: "{i18n>titleColourDetailView}",
			content: [oTable],
			showFooter:true,
			footer:[oBar]
		});

		var masterColumns = [];

		oColumn = new sap.m.Column({
			//header: new sap.m.Text({text:"Colour"})
		});
		masterColumns.push(oColumn);

		var oMasterTable = new sap.m.Table(this.createId("masterTable"),{
			columns: masterColumns,
			mode: sap.m.ListMode.SingleSelectMaster
		});

		var oMasterPage = new sap.m.Page(this.createId("ColourMasterPage"),{
			title: "{i18n>titleColourMasterView}",
			content: [oMasterTable]
		});

		var app = new sap.m.SplitApp(this.createId("myColourApp"), {
			initialDetail: oDetailPage,
			initialMaster: oMasterPage
		});
		app.addDetailPage(oDetailPage);
		app.addMasterPage(oMasterPage);
		return app;
  }
});


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="http://schemas.android.com/apk/res-auto">

    <string name="app_name" translatable="false">Sunshine</string>
    <string name="openweather_app_id" translatable="false">a1769c5ca9df922ed2c5198d4c9681ff</string>
    <string name="title_activity_details">Details</string>
    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>
    <string name="action_refresh">Refresh</string>
    <string name="action_map">Map Location</string>
    <string name="action_share">Share</string>
    <string name="today">Today</string>
    <string name="tomorrow">Tomorrow</string>
    <!-- Date format for displaying day of week and date (i.e. Mon Jun 1) [CHAR LIMIT=20] -->
    <string name="format_full_friendly_date">
        <xliff:g id="day_of_week">%1$s</xliff:g>, <xliff:g id="date">%2$s</xliff:g>
    </string>
    <!-- Strings for formatting weather-related data -->
    <!-- Temperature format [CHAR LIMIT=5] -->
    <string name="format_temperature"><xliff:g id="temp">%1.0f</xliff:g>\u00B0</string>

    <!-- Windspeed formats -->
    <!-- Wind in mph [CHAR LIMIT=25] -->
    <string name="format_wind_mph">Wind: <xliff:g id="speed">%1$1.0f</xliff:g> mph <xliff:g id="direction">%2$s</xliff:g></string>

    <!-- Wind in kph [CHAR LIMIT=25] -->
    <string name="format_wind_kmh">Wind: <xliff:g id="speed">%1$1.0f</xliff:g> km/h <xliff:g id="direction">%2$s</xliff:g></string>

    <!-- Pressure format CHAR LIMIT=25] -->
    <string name="format_pressure">Pressure: <xliff:g id="pressure">%1.0f</xliff:g> hPa</string>

    <!-- Humidity format CHAR LIMIT=25]-->
    <string name="format_humidity">Humidity: <xliff:g id="humidity">%1.0f</xliff:g> %%</string>

    <string name="sync_account_type">sunshine.cloudchen.com</string>
    <string name="content_authority">cloudchen.com.sunshine</string>

    <string name="pref_last_notification">last_notification</string>
    <string name="format_notification">
        Forecast: <xliff:g id="condition">%1$s</xliff:g> High: <xliff:g id="high">%2$s</xliff:g> Low: <xliff:g>%3$s</xliff:g>
    </string>

</resources>


text:
Sequel.require 'adapters/shared/access'
Sequel.require 'adapters/utils/split_alter_table'

module Sequel
  module ADO
    # Database and Dataset instance methods for Access specific
    # support via ADO.
    module Access
      class AdoSchema
        QUERY_TYPE = {
          :columns => 4,
          :indexes => 12,
          :tables  => 20,
          :views   => 23,
          :foreign_keys => 27
        }

        attr_reader :type, :criteria

        def initialize(type, crit)
          @type     = QUERY_TYPE[type]
          @criteria = Array(crit)
        end

        class Column
          DATA_TYPE = {
            2   => "SMALLINT",
            3   => "INTEGER",
            4   => "REAL",
            5   => "DOUBLE",
            6   => "MONEY",
            7   => "DATETIME",
            11  => "BIT",
            14  => "DECIMAL",
            16  => "TINYINT",
            17  => "BYTE",
            72  => "GUID",
            128 => "BINARY",
            130 => "TEXT",
            131 => "DECIMAL",
            201 => "TEXT",
            205 => "IMAGE"
          }

          def initialize(row)
            @row = row
          end

          def [](col)
            @row[col]
          end

          def allow_null
            self["IS_NULLABLE"]
          end

          def default
            self["COLUMN_DEFAULT"]
          end

          def db_type
            t = DATA_TYPE[self["DATA_TYPE"]]
            if t == "DECIMAL" && precision
              t + "(#{precision.to_i},#{(scale || 0).to_i})"
            elsif t == "TEXT" && maximum_length && maximum_length > 0
              t + "(#{maximum_length.to_i})"
            else
              t
            end
          end

          def precision
            self["NUMERIC_PRECISION"]
          end

          def scale
            self["NUMERIC_SCALE"]
          end

          def maximum_length
            self["CHARACTER_MAXIMUM_LENGTH"]
          end
        end
      end

      module DatabaseMethods
        extend Sequel::Database::ResetIdentifierMangling
        include Sequel::Access::DatabaseMethods
        include Sequel::Database::SplitAlterTable

        DECIMAL_TYPE_RE = /decimal/io
        LAST_INSERT_ID = "SELECT @@IDENTITY".freeze

        # Remove cached schema after altering a table, since otherwise it can be cached
        # incorrectly in the rename column case.
        def alter_table(name, *)
          super
          remove_cached_schema(name)
          nil
        end

        # Access doesn't let you disconnect if inside a transaction, so
        # try rolling back an existing transaction first.
        def disconnect_connection(conn)
          conn.RollbackTrans rescue nil
          super
        end

        def execute_insert(sql, opts=OPTS)
          synchronize(opts[:server]) do |conn|
            begin
              r = log_yield(sql){conn.Execute(sql)}
              res = log_yield(LAST_INSERT_ID){conn.Execute(LAST_INSERT_ID)}
              res.getRows.transpose.each{|r| return r.shift}
            rescue ::WIN32OLERuntimeError => e
              raise_error(e)
            end
          end
          nil
        end

        def tables(opts=OPTS)
          m = output_identifier_meth
          ado_schema_tables.map {|tbl| m.call(tbl['TABLE_NAME'])}
        end

        def views(opts=OPTS)
          m = output_identifier_meth
          ado_schema_views.map {|tbl| m.call(tbl['TABLE_NAME'])}
        end

        # Note OpenSchema returns compound indexes as multiple rows
        def indexes(table_name,opts=OPTS)
          m = output_identifier_meth
          idxs = ado_schema_indexes(table_name).inject({}) do |memo, idx|
            unless idx["PRIMARY_KEY"]
              index = memo[m.call(idx["INDEX_NAME"])] ||= {
                :columns=>[], :unique=>idx["UNIQUE"]
              }
              index[:columns] << m.call(idx["COLUMN_NAME"])
            end
            memo
          end
          idxs
        end

        # Note OpenSchema returns compound foreign key relationships as multiple rows
        def foreign_key_list(table, opts=OPTS)
          m = output_identifier_meth
          fks = ado_schema_foreign_keys(table).inject({}) do |memo, fk|
            name = m.call(fk['FK_NAME'])
            specs = memo[name] ||= {
              :columns => [],
              :table   => m.call(fk['PK_TABLE_NAME']),
              :key     => [],
              :deferrable => fk['DEFERRABILITY'],
              :name    => name,
              :on_delete => fk['DELETE_RULE'],
              :on_update => fk['UPDATE_RULE']
            }
            specs[:columns] << m.call(fk['FK_COLUMN_NAME'])
            specs[:key]     << m.call(fk['PK_COLUMN_NAME'])
            memo
          end
          fks.values
        end

        private

        # Emulate rename_column by adding the column, copying data from the old
        # column, and dropping the old column.
        def alter_table_sql(table, op)
          case op[:op]
          when :rename_column
            unless sch = op[:schema]
              raise(Error, "can't find existing schema entry for #{op[:name]}") unless sch = op[:schema] || schema(table).find{|c| c.first == op[:name]}
              sch = sch.last
            end
            [
              alter_table_sql(table, :op=>:add_column, :name=>op[:new_name], :default=>sch[:ruby_default], :type=>sch[:db_type], :null=>sch[:allow_null]),
              from(table).update_sql(op[:new_name]=>op[:name]),
              alter_table_sql(table, :op=>:drop_column, :name=>op[:name])
            ]
          when :set_column_null, :set_column_default
            raise(Error, "can't find existing schema entry for #{op[:name]}") unless sch = op[:schema] || schema(table).find{|c| c.first == op[:name]}
            sch = sch.last

            sch = if op[:op] == :set_column_null
              sch.merge(:allow_null=>op[:null])
            else
              sch.merge(:ruby_default=>op[:default])
            end

            [
              alter_table_sql(table, :op=>:rename_column, :name=>op[:name], :new_name=>:sequel_access_backup_column, :schema=>sch),
              alter_table_sql(table, :op=>:rename_column, :new_name=>op[:name], :name=>:sequel_access_backup_column, :schema=>sch)
            ]
          else
            super
          end
        end

        def begin_transaction(conn, opts=OPTS)
          log_yield('Transaction.begin'){conn.BeginTrans}
        end

        def commit_transaction(conn, opts=OPTS)
          log_yield('Transaction.commit'){conn.CommitTrans}
        end

        def rollback_transaction(conn, opts=OPTS)
          log_yield('Transaction.rollback'){conn.RollbackTrans}
        end

        def schema_column_type(db_type)
          case db_type.downcase
          when 'bit'
            :boolean
          when 'byte', 'guid'
            :integer
          when 'image'
            :blob
          else
            super
          end
        end

        def schema_parse_table(table_name, opts)
          m = output_identifier_meth(opts[:dataset])
          m2 = input_identifier_meth(opts[:dataset])
          tn = m2.call(table_name.to_s)
          idxs = ado_schema_indexes(tn)
          ado_schema_columns(tn).map {|row|
            specs = {
              :allow_null => row.allow_null,
              :db_type => row.db_type,
              :default => row.default,
              :primary_key => !!idxs.find {|idx|
                                idx["COLUMN_NAME"] == row["COLUMN_NAME"] &&
                                idx["PRIMARY_KEY"]
                              },
              :type =>  if row.db_type =~ DECIMAL_TYPE_RE && row.scale == 0
                          :integer
                        else
                          schema_column_type(row.db_type)
                        end,
              :ado_type => row["DATA_TYPE"]
            }
            specs[:default] = nil if blank_object?(specs[:default])
            specs[:allow_null] = specs[:allow_null] && !specs[:primary_key]
            [ m.call(row["COLUMN_NAME"]), specs ]
          }
        end

        def ado_schema_tables
          rows=[]
          fetch_ado_schema(:tables, [nil,nil,nil,'TABLE']) do |row|
            rows << row
          end
          rows
        end

        def ado_schema_views
          rows=[]
          fetch_ado_schema(:views, [nil,nil,nil]) do |row|
            rows << row
          end
          rows
        end

        def ado_schema_indexes(table_name)
          rows=[]
          fetch_ado_schema(:indexes, [nil,nil,nil,nil,table_name.to_s]) do |row|
            rows << row
          end
          rows
        end

        def ado_schema_columns(table_name)
          rows=[]
          fetch_ado_schema(:columns, [nil,nil,table_name.to_s,nil]) do |row|
            rows << AdoSchema::Column.new(row)
          end
          rows.sort!{|a,b| a["ORDINAL_POSITION"] <=> b["ORDINAL_POSITION"]}
        end

        def ado_schema_foreign_keys(table_name)
          rows=[]
          fetch_ado_schema(:foreign_keys, [nil,nil,nil,nil,nil,table_name.to_s]) do |row|
            rows << row
          end
          rows.sort!{|a,b| a["ORDINAL"] <=> b["ORDINAL"]}
        end

        def fetch_ado_schema(type, criteria=[])
          execute_open_ado_schema(type, criteria) do |s|
            cols = s.Fields.extend(Enumerable).map {|c| c.Name}
            s.getRows.transpose.each do |r|
              row = {}
              cols.each{|c| row[c] = r.shift}
              yield row
            end unless s.eof
          end
        end

        # This is like execute() in that it yields an ADO RecordSet, except
        # instead of an SQL interface there's this OpenSchema call
        # cf. http://msdn.microsoft.com/en-us/library/ee275721(v=bts.10)
        #
        def execute_open_ado_schema(type, criteria=[])
          ado_schema = AdoSchema.new(type, criteria)
          synchronize(opts[:server]) do |conn|
            begin
              r = log_yield("OpenSchema #{type.inspect}, #{criteria.inspect}") {
                if ado_schema.criteria.empty?
                  conn.OpenSchema(ado_schema.type)
                else
                  conn.OpenSchema(ado_schema.type, ado_schema.criteria)
                end
              }
              yield(r) if block_given?
            rescue ::WIN32OLERuntimeError => e
              raise_error(e)
            end
          end
          nil
        end
      end

      class Dataset < ADO::Dataset
        include Sequel::Access::DatasetMethods
      end
    end
  end
end


text:
from project import db
import datetime, hashlib, random

class User(db.Document):
	created = db.DateTimeField(default=datetime.datetime.now(), required=True)
	email = db.StringField(max_length=255, required=True, unique=True)
	salt = db.StringField(max_length=255, required=True)
	password = db.StringField(max_length=255, required=True)
	roles = db.ListField(db.StringField(max_length=50))

	def hasRole(self,role):
		return role in self.roles

	def addRole(self,role):
		if role not in self.roles:
			self.roles.append(role)
		return self

	def removeRole(self,role):
		if role in self.roles:
			self.roles.remove(role)
		return self

	def changePassword(self,password):
		self.password =	hashlib.sha224(self.salt.join(password)).hexdigest()
		self.save()
		return self

	def toJSON(self):
		import json
		return json.dumps({'created': self.created.isoformat(), 'email': self.email, 'roles': self.roles, 'id':str(self.id)})

	@staticmethod
	def createUser(email, password):
		user = User(email=email)
		user.salt = str(random.getrandbits(128))
		user.password = hashlib.sha224(user.salt.join(password)).hexdigest()
		user.save()
		return user

	@staticmethod
	def validateUser(email, password):
		user = User.objects(email=email).first()
		if user == None:
			return None
		password = hashlib.sha224(user.salt.join(password)).hexdigest()
		if user.password == password:
			return user
		else:
			return None

	def __str__(self):
		return self.email

	def __repr__(self):
		return str(self.toJSON())

	meta = {
		'allow_inheritance': True,
		'indexes': ['-created', 'email'],
		'ordering': ['-created']
	}


text:
// <copyright file="ImageProcessingExtensions.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>

namespace ImageSharp
{
    using ImageSharp.PixelFormats;

    using ImageSharp.Processing;

    /// <summary>
    /// Extension methods for the <see cref="Image{TPixel}"/> type.
    /// </summary>
    public static partial class ImageExtensions
    {
        /// <summary>
        /// Applies the processor to the image.
        /// <remarks>This method does not resize the target image.</remarks>
        /// </summary>
        /// <typeparam name="TPixel">The pixel format.</typeparam>
        /// <param name="source">The image this method extends.</param>
        /// <param name="processor">The processor to apply to the image.</param>
        /// <returns>The <see cref="Image{TPixel}"/>.</returns>
        public static Image<TPixel> Apply<TPixel>(this Image<TPixel> source, IImageProcessor<TPixel> processor)
            where TPixel : struct, IPixel<TPixel>
        {
            source.ApplyProcessor(processor, source.Bounds);
            return source;
        }
    }
}


text:
namespace Elders.Cronus;

/// <summary>
/// A message which signals a trigger to execute some random logic.
/// </summary>
public interface ISignal : IMessage { }


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Microsoft.Practices.Prism.UnityExtensions</name>
    </assembly>
    <members>
        <member name="T:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources">
            <summary>
              A strongly-typed resource class, for looking up localized strings, etc.
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.ResourceManager">
            <summary>
              Returns the cached ResourceManager instance used by this class.
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.Culture">
            <summary>
              Overrides the current thread's CurrentUICulture property for all
              resource lookups using this strongly typed resource class.
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.AddingUnityBootstrapperExtensionToContainer">
            <summary>
              Looks up a localized string similar to Adding UnityBootstrapperExtension to container..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.BootstrapperSequenceCompleted">
            <summary>
              Looks up a localized string similar to Bootstrapper sequence completed..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.ConfiguringDefaultRegionBehaviors">
            <summary>
              Looks up a localized string similar to Configuring default region behaviors..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.ConfiguringModuleCatalog">
            <summary>
              Looks up a localized string similar to Configuring module catalog..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.ConfiguringRegionAdapters">
            <summary>
              Looks up a localized string similar to Configuring region adapters..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.ConfiguringServiceLocatorSingleton">
            <summary>
              Looks up a localized string similar to Configuring ServiceLocator singleton..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.ConfiguringUnityContainer">
            <summary>
              Looks up a localized string similar to Configuring the Unity container..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.CreatingModuleCatalog">
            <summary>
              Looks up a localized string similar to Creating module catalog..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.CreatingShell">
            <summary>
              Looks up a localized string similar to Creating the shell..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.CreatingUnityContainer">
            <summary>
              Looks up a localized string similar to Creating Unity container..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.InitializingModules">
            <summary>
              Looks up a localized string similar to Initializing modules..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.InitializingShell">
            <summary>
              Looks up a localized string similar to Initializing the shell..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.LoggerCreatedSuccessfully">
            <summary>
              Looks up a localized string similar to Logger was created successfully..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.NotOverwrittenGetModuleEnumeratorException">
            <summary>
              Looks up a localized string similar to The method 'GetModuleEnumerator' of the bootstrapper must be overwritten in order to use the default module initialization logic..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.NullLoggerFacadeException">
            <summary>
              Looks up a localized string similar to The ILoggerFacade is required and cannot be null..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.NullModuleCatalogException">
            <summary>
              Looks up a localized string similar to The IModuleCatalog is required and cannot be null in order to initialize the modules..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.NullUnityContainerException">
            <summary>
              Looks up a localized string similar to The IUnityContainer is required and cannot be null..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.RegisteringFrameworkExceptionTypes">
            <summary>
              Looks up a localized string similar to Registering Framework Exception Types..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.SettingTheRegionManager">
            <summary>
              Looks up a localized string similar to Setting the RegionManager..
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.TypeMappingAlreadyRegistered">
            <summary>
              Looks up a localized string similar to Type '{0}' was already registered by the application. Skipping....
            </summary>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.Properties.Resources.UpdatingRegions">
            <summary>
              Looks up a localized string similar to Updating Regions..
            </summary>
        </member>
        <member name="T:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper">
            <summary>
            Base class that provides a basic bootstrapping sequence that
            registers most of the Composite Application Library assets
            in a <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>.
            </summary>
            <remarks>
            This class must be overriden to provide application specific configuration.
            </remarks>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.Run(System.Boolean)">
            <summary>
            Run the bootstrapper process.
            </summary>
            <param name="runWithDefaultConfiguration">If <see langword="true"/>, registers default Composite Application Library services in the container. This is the default behavior.</param>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.ConfigureServiceLocator">
            <summary>
            Configures the LocatorProvider for the <see cref="T:Microsoft.Practices.ServiceLocation.ServiceLocator"/>.
            </summary>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.RegisterFrameworkExceptionTypes">
            <summary>
            Registers in the <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> the <see cref="T:System.Type"/> of the Exceptions
            that are not considered root exceptions by the <see cref="T:Microsoft.Practices.Prism.ExceptionExtensions"/>.
            </summary>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.ConfigureContainer">
            <summary>
            Configures the <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>. May be overwritten in a derived class to add specific
            type mappings required by the application.
            </summary>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.InitializeModules">
            <summary>
            Initializes the modules. May be overwritten in a derived class to use a custom Modules Catalog
            </summary>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.CreateContainer">
            <summary>
            Creates the <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> that will be used as the default container.
            </summary>
            <returns>A new instance of <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>.</returns>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.RegisterTypeIfMissing(System.Type,System.Type,System.Boolean)">
            <summary>
            Registers a type in the container only if that type was not already registered.
            </summary>
            <param name="fromType">The interface type to register.</param>
            <param name="toType">The type implementing the interface.</param>
            <param name="registerAsSingleton">Registers the type as a singleton.</param>
        </member>
        <member name="P:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapper.Container">
            <summary>
            Gets the default <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> for the application.
            </summary>
            <value>The default <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> instance.</value>
        </member>
        <member name="T:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapperExtension">
            <summary>
            Implements a <see cref="T:Microsoft.Practices.Unity.UnityContainerExtension"/> that checks if a specific type was registered with the container.
            </summary>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapperExtension.IsTypeRegistered(Microsoft.Practices.Unity.IUnityContainer,System.Type)">
            <summary>
            Evaluates if a specified type was registered in the container.
            </summary>
            <param name="container">The container to check if the type was registered in.</param>
            <param name="type">The type to check if it was registered.</param>
            <returns><see langword="true"/> if the <paramref name="type"/> was registered with the container.</returns>
            <remarks>
            In order to use this extension, you must first call <see cref="M:Microsoft.Practices.Unity.UnityContainerExtensions.AddNewExtension``1(Microsoft.Practices.Unity.IUnityContainer)"/>
            and specify <see cref="T:Microsoft.Practices.Unity.UnityContainerExtension"/> as the extension type.
            </remarks>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapperExtension.Initialize">
            <summary>
            Initializes the container with this extension's functionality.
            </summary>
        </member>
        <member name="T:Microsoft.Practices.Prism.UnityExtensions.UnityServiceLocatorAdapter">
            <summary>
            Defines a <seealso cref="T:Microsoft.Practices.Unity.IUnityContainer"/> adapter for the <see cref="T:Microsoft.Practices.ServiceLocation.IServiceLocator"/> interface to be used by the Composite Application Library.
            </summary>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityServiceLocatorAdapter.#ctor(Microsoft.Practices.Unity.IUnityContainer)">
            <summary>
            Initializes a new instance of <see cref="T:Microsoft.Practices.Prism.UnityExtensions.UnityServiceLocatorAdapter"/>.
            </summary>
            <param name="unityContainer">The <seealso cref="T:Microsoft.Practices.Unity.IUnityContainer"/> that will be used
            by the <see cref="M:Microsoft.Practices.Prism.UnityExtensions.UnityServiceLocatorAdapter.DoGetInstance(System.Type,System.String)"/> and <see cref="M:Microsoft.Practices.Prism.UnityExtensions.UnityServiceLocatorAdapter.DoGetAllInstances(System.Type)"/> methods.</param>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityServiceLocatorAdapter.DoGetInstance(System.Type,System.String)">
            <summary>
            Resolves the instance of the requested service.
            </summary>
            <param name="serviceType">Type of instance requested.</param>
            <param name="key">Name of registered service you want. May be null.</param>
            <returns>The requested service instance.</returns>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityServiceLocatorAdapter.DoGetAllInstances(System.Type)">
            <summary>
            Resolves all the instances of the requested service.
            </summary>
            <param name="serviceType">Type of service requested.</param>
            <returns>Sequence of service instance objects.</returns>
        </member>
        <member name="T:Microsoft.Practices.Prism.UnityExtensions.UnityContainerHelper">
            <summary>
            Extensions methods to extend and facilitate the usage of <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>.
            </summary>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityContainerHelper.IsTypeRegistered(Microsoft.Practices.Unity.IUnityContainer,System.Type)">
            <summary>
            Returns whether a specified type has a type mapping registered in the container.
            </summary>
            <param name="container">The <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> to check for the type mapping.</param>
            <param name="type">The type to check if there is a type mapping for.</param>
            <returns><see langword="true"/> if there is a type mapping registered for <paramref name="type"/>.</returns>
            <remarks>In order to use this extension method, you first need to add the
            <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> extension to the <see cref="T:Microsoft.Practices.Prism.UnityExtensions.UnityBootstrapperExtension"/>.
            </remarks>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityContainerHelper.TryResolve``1(Microsoft.Practices.Unity.IUnityContainer)">
            <summary>
            Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type.
            </summary>
            <param name="container">The cointainer that will be used to resolve the type.</param>
            <typeparam name="T">The type to resolve.</typeparam>
            <returns>The instance of <typeparamref name="T"/> built up by the container.</returns>
        </member>
        <member name="M:Microsoft.Practices.Prism.UnityExtensions.UnityContainerHelper.TryResolve(Microsoft.Practices.Unity.IUnityContainer,System.Type)">
            <summary>
            Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type.
            </summary>
            <param name="container">The cointainer that will be used to resolve the type.</param>
            <param name="typeToResolve">The type to resolve.</param>
            <returns>The instance of <paramref name="typeToResolve"/> built up by the container.</returns>
        </member>
    </members>
</doc>


text:
<!DOCTYPE html>

	<link href="video-js.css" rel="stylesheet">
	<title>AB loop test page</title>

AB loop test page

	First video
	<video id="video0" class="video-js" controls preload="auto" width="640" height="264" data-setup='"fluid": false,"playbackRates": [0.1, 0.2, 0.5, 1, 2, 5], "inactivityTimeout": 0 }'>
				<source src="http://vjs.zencdn.net/v/oceans.mp4" type='video/mp4'>

	</video>
	<button onclick="saveSettings(videos[0]);" >Save</button>

	Second video
	<video id="video1" class="video-js" controls preload="auto"  width="640" height="264">
		<source src="oceans.mp4" type='video/mp4'>
	</video>
	<button onclick="saveSettings(videos[1]);" >Save</button>

<textarea id="data" cols="80"></textarea>
	<button onclick="loadSettings();" >Load</button>

	video


text:
Your Spotify account is paired.

    {{ numPlaylists }} playlists found

Unpair

  Ready to jam?

    Let's pair your Spotify Premium account.

    Log in with Spotify

  <spinner [class.hidden]="!loadingSpotifyAuth"></spinner>


text:
Modularized port of googlecode project crypto-js.

## Node.js (Install)

Requirements:
* Node.js
* npm (Node.js package manager)

```bash
npm install crypto-js
```

### USE

```javascript
var AES = require("crypto-js/aes");
var SHA256 = require("crypto-js/sha256");
```

## Client (browser)

### USE

```javascript
require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) {

});
```

## API

See: https://code.google.com/p/crypto-js


text:
package cgroups

import (
	"bufio"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"

	rspec "github.com/opencontainers/runtime-spec/specs-go"
)

var (
	// AbsCgroupPath is absolute path for container's cgroup mount
	AbsCgroupPath = "/cgrouptest"
	// RelCgroupPath is relative path for container's cgroup mount
	RelCgroupPath = "testdir/cgrouptest/container"
)

// Cgroup represents interfaces for cgroup validation
type Cgroup interface {
	GetBlockIOData(pid int, cgPath string) (*rspec.LinuxBlockIO, error)
	GetCPUData(pid int, cgPath string) (*rspec.LinuxCPU, error)
	GetDevicesData(pid int, cgPath string) ([]rspec.LinuxDeviceCgroup, error)
	GetHugepageLimitData(pid int, cgPath string) ([]rspec.LinuxHugepageLimit, error)
	GetMemoryData(pid int, cgPath string) (*rspec.LinuxMemory, error)
	GetNetworkData(pid int, cgPath string) (*rspec.LinuxNetwork, error)
	GetPidsData(pid int, cgPath string) (*rspec.LinuxPids, error)
}

// FindCgroup gets cgroup root mountpoint
func FindCgroup() (Cgroup, error) {
	f, err := os.Open("/proc/self/mountinfo")
	if err != nil {
		return nil, err
	}
	defer f.Close()

	cgroupv2 := false
	scanner := bufio.NewScanner(f)
	for scanner.Scan() {
		text := scanner.Text()
		fields := strings.Split(text, " ")
		// Safe as mountinfo encodes mountpoints with spaces as \040.
		index := strings.Index(text, " - ")
		postSeparatorFields := strings.Split(text[index+3:], " ")
		numPostFields := len(postSeparatorFields)

		// This is an error as we can't detect if the mount is for "cgroup"
		if numPostFields == 0 {
			return nil, fmt.Errorf("Found no fields post '-' in %q", text)
		}

		if postSeparatorFields[0] == "cgroup" {
			// No need to parse the rest of the postSeparatorFields

			cg := &CgroupV1{
				MountPath: filepath.Dir(fields[4]),
			}
			return cg, nil
		} else if postSeparatorFields[0] == "cgroup2" {
			cgroupv2 = true
			continue
			//TODO cgroupv2 unimplemented
		}
	}

	if err := scanner.Err(); err != nil {
		return nil, err
	}

	if cgroupv2 {
		return nil, fmt.Errorf("cgroupv2 is not supported yet")
	}
	return nil, fmt.Errorf("cgroup is not found")
}

// GetSubsystemPath gets path of subsystem
func GetSubsystemPath(pid int, subsystem string) (string, error) {
	contents, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/cgroup", pid))
	if err != nil {
		return "", err
	}

	parts := strings.Split(strings.TrimSpace(string(contents)), "\n")
	for _, part := range parts {
		elem := strings.SplitN(part, ":", 3)
		if len(elem) < 3 {
			continue
		}
		subelems := strings.Split(elem[1], ",")
		for _, subelem := range subelems {
			if subelem == subsystem {
				return elem[2], nil
			}
		}
	}

	return "", fmt.Errorf("subsystem %s not found", subsystem)
}


text:
package com.typesafe.netty;

import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import org.reactivestreams.tck.SubscriberWhiteboxVerification;

import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.atomic.AtomicInteger;

public class ProbeHandler<T> extends ChannelDuplexHandler implements SubscriberWhiteboxVerification.SubscriberPuppet {

    private static final int NO_CONTEXT = 0;
    private static final int RUN = 1;
    private static final int CANCEL = 2;

    private final SubscriberWhiteboxVerification.WhiteboxSubscriberProbe<T> probe;
    private final Class<T> clazz;
    private final Queue<WriteEvent> queue = new LinkedList<>();
    private final AtomicInteger state = new AtomicInteger(NO_CONTEXT);
    private volatile ChannelHandlerContext ctx;
    // Netty doesn't provide a way to send errors out, so we capture whether it was an error or complete here
    private volatile Throwable receivedError = null;

    public ProbeHandler(SubscriberWhiteboxVerification.WhiteboxSubscriberProbe<T> probe, Class<T> clazz) {
        this.probe = probe;
        this.clazz = clazz;
    }

    @Override
    public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
        this.ctx = ctx;
        if (!state.compareAndSet(NO_CONTEXT, RUN)) {
            ctx.fireChannelInactive();
        }
    }

    @Override
    public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
        queue.add(new WriteEvent(clazz.cast(msg), promise));
    }

    @Override
    public void close(ChannelHandlerContext ctx, ChannelPromise future) throws Exception {
        if (receivedError == null) {
            probe.registerOnComplete();
        } else {
            probe.registerOnError(receivedError);
        }
    }

    @Override
    public void flush(ChannelHandlerContext ctx) throws Exception {
        while (!queue.isEmpty()) {
            WriteEvent event = queue.remove();
            probe.registerOnNext(event.msg);
            event.future.setSuccess();
        }
    }

    @Override
    public void triggerRequest(long elements) {
        // No need, the channel automatically requests
    }

    @Override
    public void signalCancel() {
        if (!state.compareAndSet(NO_CONTEXT, CANCEL)) {
            ctx.fireChannelInactive();
        }
    }

    private class WriteEvent {
        final T msg;
        final ChannelPromise future;

        private WriteEvent(T msg, ChannelPromise future) {
            this.msg = msg;
            this.future = future;
        }
    }

    public Subscriber<T> wrap(final Subscriber<T> subscriber) {
        return new Subscriber<T>() {
            public void onSubscribe(Subscription s) {
                probe.registerOnSubscribe(ProbeHandler.this);
                subscriber.onSubscribe(s);
            }
            public void onNext(T t) {
                subscriber.onNext(t);
            }
            public void onError(Throwable t) {
                receivedError = t;
                subscriber.onError(t);
            }
            public void onComplete() {
                subscriber.onComplete();
            }
        };
    }
}


text:
package alert

import (
	. "aliyun-openapi-go-sdk/core"
)

type CreateAlertRequest struct {
	RoaRequest
	ProjectName string
	Alert       string
}

func (r *CreateAlertRequest) SetProjectName(value string) {
	r.ProjectName = value
	r.PathParams.Set("ProjectName", value)
}
func (r *CreateAlertRequest) GetProjectName() string {
	return r.ProjectName
}
func (r *CreateAlertRequest) SetAlert(value string) {
	r.Alert = value
	r.QueryParams.Set("Alert", value)
}
func (r *CreateAlertRequest) GetAlert() string {
	return r.Alert
}

func (r *CreateAlertRequest) Init() {
	r.RoaRequest.Init()
	r.PathPattern = "/projects/ProjectName/alerts"
	r.SetMethod("POST")
	r.SetProtocol("HTTP")
	r.SetProduct(Product)
}

type CreateAlertResponse struct {
	code    string `xml:"code" json:"code"`
	message string `xml:"message" json:"message"`
	success string `xml:"success" json:"success"`
	traceId string `xml:"traceId" json:"traceId"`
	result  string `xml:"result" json:"result"`
}

func CreateAlert(req *CreateAlertRequest, accessId, accessSecret string) (*CreateAlertResponse, error) {
	var pResponse CreateAlertResponse
	body, err := ApiHttpRequest(accessId, accessSecret, req)
	if err != nil {
		return nil, err
	}
	ApiUnmarshalResponse(req.GetFormat(), body, &pResponse)
	return &pResponse, err
}


text:
module Spec
  module Expectations
    class InvalidMatcherError < ArgumentError; end

    class ExpectationMatcherHandler
      def self.handle_matcher(actual, matcher, &block)
        ::Spec::Matchers.last_should = :should
        ::Spec::Matchers.last_matcher = matcher

        return ::Spec::Matchers::PositiveOperatorMatcher.new(actual) if matcher.nil?

        match = matcher.matches?(actual, &block)
        ::Spec::Expectations.fail_with(matcher.failure_message) unless match
        match
      end
    end

    class NegativeExpectationMatcherHandler
      def self.handle_matcher(actual, matcher, &block)
        ::Spec::Matchers.last_should = :should_not
        ::Spec::Matchers.last_matcher = matcher

        return ::Spec::Matchers::NegativeOperatorMatcher.new(actual) if matcher.nil?

        match = matcher.matches?(actual, &block)
        ::Spec::Expectations.fail_with(matcher.negative_failure_message) if match
        match
      end
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<!--

 -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/pages.xsd">
    <page name="CmsBlockEdit" area="Adminhtml" mca="cms/block/edit" module="Magento_Cms">
        <block name="blockForm" class="Magento\Cms\Test\Block\Adminhtml\Block\Edit\BlockForm" locator="[id='page:main-container']" strategy="css selector" />
        <block name="pageMainActions" class="Magento\Backend\Test\Block\FormPageActions" locator=".page-main-actions" strategy="css selector" />
    </page>
</config>


text:
using Radial;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WishStore.Models
{
    /// <summary>
    /// 订单金额
    /// </summary>
    public class OrderAmount
    {
        /// <summary>
        /// 获取或设置所购商品金额
        /// </summary>
        public decimal Goods { get; set; }
        /// <summary>
        /// 获取或设置运费
        /// </summary>
        public decimal Carriage { get; set; }
        /// <summary>
        /// 获取或设置人工调整金额(可为负数)
        /// </summary>
        public decimal Manual { get; set; }
        /// <summary>
        /// 获取或设置应付金额
        /// </summary>
        public decimal Payable { get; set; }
    }

    /// <summary>
    /// 订单支付信息
    /// </summary>
    public class OrderPayment
    {
        /// <summary>
        /// 获取或设置支付渠道名称.
        /// </summary>
        public string Channel { get; set; }

        /// <summary>
        /// 获取或设置交易流水号
        /// </summary>
        public string Serial { get; set; }

        /// <summary>
        /// 获取或设置交易帐号
        /// </summary>
        public string Account { get; set; }

        /// <summary>
        /// 获取或设置收款银行
        /// </summary>
        public string Bank { get; set; }

        /// <summary>
        /// 获取或设置交易备注
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 获取或设置是否已支付
        /// </summary>
        public bool IsPaid { get; set; }

        /// <summary>
        /// 获取或设置是否为手工支付
        /// </summary>
        public bool IsManual { get; set; }

        /// <summary>
        /// 获取或设置支付时间
        /// </summary>
        public DateTime? PaidTime { get; set; }
    }

    /// <summary>
    /// 订单取消
    /// </summary>
    public class OrderCancel
    {
        /// <summary>
        /// 获取或设置取消时间.
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 获取或设置取消原因
        /// </summary>
        public string Reason { get; set; }
    }

    /// <summary>
    /// 订单状态
    /// </summary>
    public enum OrderState
    {
        /// <summary>
        /// 等待支付(=0)
        /// </summary>
        [EnumDescription("等待支付")]
        Pending = 0,
        /// <summary>
        /// 正在配货(=1)
        /// </summary>
        [EnumDescription("正在配货")]
        Assembling = 1,
        /// <summary>
        /// 已发货(=2)
        /// </summary>
        [EnumDescription("已发货")]
        Shipped = 2,
        /// <summary>
        /// 取消(=-1)
        /// </summary>
        [EnumDescription("取消")]
        Canceled = -1
    }

    /// <summary>
    /// OrderItem.
    /// </summary>
    public class OrderItem
    {
        /// <summary>
        /// Gets or sets the product identifier.
        /// </summary>
        public string ProductId { get; set; }
        /// <summary>
        /// Gets or sets the name of the product.
        /// </summary>
        public string ProductName { get; set; }
        /// <summary>
        /// Gets or sets the product default image url.
        /// </summary>
        public string ProductImage { get; set; }

        /// <summary>
        /// Gets or sets the unit price.
        /// </summary>
        public decimal UnitPrice { get; set; }

        /// <summary>
        /// Gets or sets the unit weight.
        /// </summary>
        public float UnitWeight { get; set; }

        /// <summary>
        /// Gets or sets the quantity.
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 获取或设置是否为赠品
        /// </summary>
        public bool IsGift { get; set; }

        /// <summary>
        /// Gets or sets the amount total.
        /// </summary>
        public decimal AmountTotal { get; set; }

        /// <summary>
        /// Gets or sets the weight total.
        /// </summary>
        public float WeightTotal { get; set; }
    }

    /// <summary>
    /// Order.
    /// </summary>
    public class Order : ModelBase, IConcurrency, IRecyclable
    {
        /// <summary>
        /// Gets or sets the user identifier.
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// Gets or sets the items.
        /// </summary>
        public OrderItem[] Items { get; set; }

        /// <summary>
        /// Gets or sets the amount.
        /// </summary>
        public OrderAmount Amount { get; set; }

        /// <summary>
        /// Gets or sets the recipient.
        /// </summary>
        public Recipient Recipient { get; set; }

        /// <summary>
        /// Gets or sets the invoice.
        /// </summary>
        public Invoice Invoice { get; set; }

        /// <summary>
        /// Gets or sets the payment.
        /// </summary>
        public OrderPayment Payment { get; set; }

        /// <summary>
        /// Gets or sets the state.
        /// </summary>
        public OrderState State { get; set; }

        /// <summary>
        /// Gets or sets the user message.
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// Gets or sets the create time.
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// Gets or sets the cancel.
        /// </summary>
        public OrderCancel Cancel { get; set; }

        /// <summary>
        /// Gets or sets the version.
        /// </summary>
        public int Version { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is delete.
        /// </summary>
        public bool IsDelete { get; set; }
    }
}


text:
   /**
    *  Gets URI that identifies the test.
    *  @return uri identifier of test
    */
function getTargetURI() {
      return "http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent11";
   }

var docsLoaded = -1000000;
var builder = null;

//
//   This function is called by the testing framework before
//      running the test suite.
//
//   If there are no configuration exceptions, asynchronous
//        document loading is started.  Otherwise, the status
//        is set to complete and the exception is immediately
//        raised when entering the body of the test.
//
function setUpPage() {
   setUpPageStatus = 'running';
   try {
     //
     //   creates test document builder, may throw exception
     //
     builder = createConfiguredBuilder();

      docsLoaded = 0;

      var docRef = null;
      if (typeof(this.doc) != 'undefined') {
        docRef = this.doc;
      }
      docsLoaded += preload(docRef, "doc", "hc_staff");

       if (docsLoaded == 1) {
          setUpPageStatus = 'complete';
       }
    } catch(ex) {
        catchInitializationError(builder, ex);
        setUpPageStatus = 'complete';
    }
}

//
//   This method is called on the completion of
//      each asychronous load started in setUpTests.
//
//   When every synchronous loaded document has completed,
//      the page status is changed which allows the
//      body of the test to be executed.
function loadComplete() {
    if (++docsLoaded == 1) {
        setUpPageStatus = 'complete';
    }
}

//EventMonitor's require a document level variable named monitor
var monitor;

/**
*
The same monitor is registered twice, removed once, and an event is dispatched.
The monitor should receive only no handleEvent calls.

* @author Curt Arnold
* @see http://www.w3.org/TR/DOM-Level-2-Events/events#Events-EventTarget-dispatchEvent
* @see http://www.w3.org/TR/DOM-Level-2-Events/events#xpointer(id('Events-EventTarget-dispatchEvent')/raises/exception[@name='EventException']/descr/p[substring-before(.,':')='UNSPECIFIED_EVENT_TYPE_ERR'])
*/
function dispatchEvent11() {
   var success;
    if(checkInitialization(builder, "dispatchEvent11") != null) return;
    var doc;
      var target;
      var evt;
      var preventDefault;
      monitor = new EventMonitor();

      var events = new Array();

      var docRef = null;
      if (typeof(this.doc) != 'undefined') {
        docRef = this.doc;
      }
      doc = load(docRef, "doc", "hc_staff");
      doc.addEventListener("foo", monitor.handleEvent, false);
      doc.addEventListener("foo", monitor.handleEvent, false);
      doc.removeEventListener("foo", monitor.handleEvent, false);
     evt = doc.createEvent("Events");
      evt.initEvent("foo",true,false);
      preventDefault = doc.dispatchEvent(evt);
      events = monitor.allEvents;
assertSize("eventCount",0,events);

}

function runTest() {
   dispatchEvent11();
}


text:
package com.ibm.ws.repository.common.enums;

/**
 * Denotes the meaning of the attachment URL
 * <p>
 * Note that when the attachment content is to be stored in the repository server, the attachment link type should be unset.
 */
public enum AttachmentLinkType {

    /**
     * @deprecated Not used
     */
    EFD,

    /**
     * URL links directly to the attachment file
     */
    DIRECT,

    /**
     * URL links to a web page where the attachment file is available
     */
    WEB_PAGE;
}


text:
from rpy2.robjects import IntVector

from .base import RTS
from ...conf import settings
from ...api.timeseries import is_timeseries
from ...api.roll import rollsingle

def v2bool(v):
    try:
        return v[0]
    except:
        return False

def tozoo(ts):
    if is_timeseries(ts):
        if ts.type == 'zoo':
            return ts
        else:
            raise NotImplementedError(
                'Cannot convert %s to zoo timeserie' % ts
            )
    else:
        raise ValueError('%s is not a timeserie object' % ts)

class Zoo(RTS):
    # we don't include median since it fails on NA and even windows
    special_roll = ('mean', 'max')
    libraries = ['zoo,PerformanceAnalytics']

    def factory(self, date, data, raw = False):
        if not raw:
            tdate = self.dateconvert
            date = IntVector([tdate(dt) for dt in date])
        # data = FloatVector(data)
        return self.r['zoo'](data,date)

    def colnames(self):
        # TODO: Not working since we did not set names
        return self.r['colnames'](self._ts)

    def _rollapply(self,
                   func, window = 20, name = None,
                   fallback = False, **kwargs):
        name = name or self.makename(func,window=window)
        # R does not like to evaluate function on the whole windows for some reasons
        merge = False
        if window == len(self):
            return rollsingle(self, func, window, name = name, **kwargs)
        if func in self.special_roll:
            return self.rcts('roll%s' % func, window, name = name, **kwargs)
        else:
            return self.rcts('rollapply', window, self.r[func], name = name, **kwargs)

    def start(self):
        return self.dateinverse(self.rc('start')[0])

    def end(self):
        return self.dateinverse(self.rc('end')[0])

    def _mergesingle(self, ts, all = True):
        ts = tozoo(ts)
        name = settings.splittingnames.join(self.names() + ts.names())
        return self.rcts('merge', ts._ts, all = all, name = name)

    def merge(self, ts, all = True):
        if is_timeseries(ts):
            return self._mergesingle(ts, all = all)
        else:
            rs = self
            for t in ts:
                rs = rs._mergesingle(t, all = all)
            return rs


text:
import http.server
import socketserver
import os

PORT = 8080

web_dir = os.path.join(os.path.dirname(__file__), 'data')
os.chdir(web_dir)

Handler = http.server.SimpleHTTPRequestHandler
# httpd = socketserver.TCPServer(("104.198.0.87", PORT), Handler)
httpd = socketserver.TCPServer(("", PORT), Handler)
print("serving at port", PORT)
httpd.serve_forever()


text:
function kern = whiteKernExpandParam(kern, params)

% WHITEKERNEXPANDPARAM Create kernel structure from WHITE kernel's parameters.
% FORMAT
% DESC returns a white noise kernel structure filled with the
% parameters in the given vector. This is used as a helper function to
% enable parameters to be optimised in, for example, the NETLAB
% optimisation functions.
% ARG kern : the kernel structure in which the parameters are to be
% placed.
% ARG param : vector of parameters which are to be placed in the
% kernel structure.
% RETURN kern : kernel structure with the given parameters in the
% relevant locations.
%
% SEEALSO : whiteKernParamInit, whiteKernExtractParam, kernExpandParam
%
% COPYRIGHT : Neil D. Lawrence, 2004, 2005, 2006

% KERN

kern.variance = params(1);


text:
describe('constant of a module', function() {
    var foo;
    beforeEach(function() {
        foo = {};
        Modulerjs.create(foo);
    });

    it('api', function() {
        foo.define('foo', function() {
            expect(this.constant.set).toBeDefined();
            expect(this.constant.get).toBeDefined();
            return {};
        });
    });
    it('constant can only be defined once', function() {
        foo.define('bar', function() {
            expect(this.constant.set('foo', 'foo is a constant')).toBe(true);
            expect(this.constant.set('foo', 'should not be able to set')).toBe(false);
            return {};
        });
    });
});
describe('more on constant', function() {
    var foo = {};
    var asyncRst1, asyncRst2;
    beforeEach(function(done) {
        Modulerjs.create(foo);
        foo.constant.set('c1', 'constant1');
        foo.constant.set('c2', 'constant2');
        foo.require(['Person'], function(Person) {
            asyncRst1 = this.constant.get('c1');
            asyncRst2 = this.constant.get('c2');
            done();
        });
    });
    it('at define', function() {
        foo.define('bar', function() {
            expect(this.constant.get('c1')).toBe('constant1');
            expect(this.constant.get('c2')).toBe('constant2');
        });
    });
    it('at require', function() {
        expect(asyncRst1).toBe('constant1');
        expect(asyncRst2).toBe('constant2');
    });
});
describe('constant in dynmaic script', function() {
    var foo = {};
    var rst;
    beforeEach(function(done) {
        Modulerjs.create(foo);
        foo.constant.set('c0', 'constant1 in foo');
        foo.require(['constantInDynamicScript'], function(global) {
            rst = global;
            done();
        });
    });
    it('should work', function() {
        expect(rst.constant).toBeDefined();
        expect(rst.constant.get('c0')).toBe('constant1 in foo');
    });
});
describe('constant in dynmaic script in ready callback', function() {
    var foo = {};
    var rst;
    beforeEach(function(done) {
        Modulerjs.create(foo);
        foo.constant.set('c0', 'constant1 in foo');
        foo.require(['constantInDynamicScript'], function(global) {
            return global;
        }, function(global) {
            rst = global;
            done();
        });
    });
    it('should work', function() {
        expect(rst.constant).toBeDefined();
        expect(rst.constant.get('c0')).toBe('constant1 in foo');
    });
});
describe('different modules share utils but not constant', function() {
    var foo = {}, bar = {};
    var asyncRst1, asyncRst2, p;
    beforeEach(function(done) {
        Modulerjs.create(foo);
        Modulerjs.create(bar);
        foo.constant.set('c1', 'constant1 in foo');
        foo.constant.set('c2', 'constant2 in foo');
        bar.constant.set('c1', 'constant1 in bar');
        bar.constant.set('c2', 'constant2 in bar');
        foo.require(['Person'], function(Person) {
            p = new Person();
            this.constant.set('c3', 'constant of foo set in require method');
            asyncRst1 = this.constant.get('c1');
            asyncRst2 = this.constant.get('c2');
            done();
        });
    });
    it('share utils', function() {
        expect(p.speak('thing')).toBe('thing.');
        foo.define('bar', function() {
            this.util.dummyMethod = function() {
                return 'dummy';
            };
            expect(this.constant.get('c1')).toBe('constant1 in foo');
            expect(this.constant.get('c2')).toBe('constant2 in foo');
            expect(this.constant.get('c3')).toBe('constant of foo set in require method');
        });
        bar.define('bar', function() {
            expect(this.util.dummyMethod()).toBe('dummy');
            expect(this.constant.get('c1')).toBe('constant1 in bar');
            expect(this.constant.get('c2')).toBe('constant2 in bar');
        });
    });
});


text:
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<form method="post" action="upfile" enctype="multipart/form-data">
    <input name="id">
    用户名:<input name="username">
    文件上传:<input name="file" type="file">
    <input type="submit">
</form>

</body>
</html>


text:
<?php

/**
 * PHP version 7.3
 *
 * @category IdResponse
 * @package  RetailCrm\Api\Model\Response
 */

namespace RetailCrm\Api\Model\Response;

use RetailCrm\Api\Component\Serializer\Annotation as JMS;

/**
 * Class IdResponse
 *
 * @category IdResponse
 * @package  RetailCrm\Api\Model\Response
 */
class IdResponse extends SuccessResponse
{
    /**
     * @var int
     *
     * @JMS\Type("int")
     * @JMS\SerializedName("id")
     */
    public $id;
}


text:
Description
===========

Configures postfix

Requirements
============

Needs postfix, sysrc, svc

Attributes
==========

* Key, Value

Usage
=====

```json
"run_list": [
    "recipe[postfix-config]"
]
```

License and Author
==================

Author:: John Ko <git@johnko.ca>
Copyright:: 2014, John Ko

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.


text:
const {assert} = chai;

import * as FormatterWorker from '../../../../../front_end/entrypoints/formatter_worker/formatter_worker.js';

function formatSCSS(text: string): string {
  return FormatterWorker.FormatterWorker.format('text/x-scss', text, '  ').content;
}

describe('SCSSFormatter', () => {
  it('formats selector with quotes', () => {
    const formattedCode = formatSCSS('a[href=\'/\']');
    assert.strictEqual(formattedCode, 'a[href=\'/\']');
  });

  it('formats compound selector', () => {
    const formattedCode = formatSCSS('#content > a:hover');
    assert.strictEqual(formattedCode, '#content > a:hover');
  });

  it('formats import selector', () => {
    const formattedCode = formatSCSS('@import url(style.css);');
    assert.strictEqual(formattedCode, '@import url(style.css);');
  });

  it('formats import and compound selector', () => {
    const formattedCode = formatSCSS('@import url("style.css") projection, tv;');
    assert.strictEqual(formattedCode, '@import url("style.css") projection, tv;');
  });

  it('formats separate import and selector', () => {
    const formattedCode = formatSCSS('@import "/css/fireball_unicode.css"; html {}');
    assert.strictEqual(formattedCode, `@import "/css/fireball_unicode.css"; html {
}
`);
  });

  it('formats nested selectors in media query', () => {
    const formattedCode = formatSCSS('@media screen { body { color: red; } }');
    assert.strictEqual(formattedCode, `@media screen {
  body {
    color: red;
  }
}
`);
  });

  it('formats font-face selector', () => {
    const formattedCode = formatSCSS('@font-face { font-family: "MyHelvetica"; }');
    assert.strictEqual(formattedCode, `@font-face {
  font-family: "MyHelvetica";
}
`);
  });

  it('formats color values', () => {
    const formattedCode = formatSCSS(
        'p { color: color; red: red; color: #000; color: #FFF; color: #123AbC; color: #faebfe; color:papayawhip; }');
    assert.strictEqual(formattedCode, `p {
  color: color;
  red: red;
  color: #000;
  color: #FFF;
  color: #123AbC;
  color: #faebfe;
  color: papayawhip;
}
`);
  });

  it('formats important declaration', () => {
    const formattedCode = formatSCSS('p { margin: -10px !important; }');
    assert.strictEqual(formattedCode, `p {
  margin: -10px !important;
}
`);
  });

  it('formats variable declaration and usage', () => {
    const formattedCode = formatSCSS('$margin-left: $offsetBefore + 12px + $offsetAfter;');
    assert.strictEqual(formattedCode, '$margin-left: $offsetBefore + 12px + $offsetAfter;');
  });

  it('formats nested selectors with correct indentation', () => {
    const formattedCode = formatSCSS(`$type: monster;
p {
@if $type == ocean {
color: blue;
} @else if $type == matador {
color: red;
} @else if $type == monster {
color: green;
} @else {
color: black;
}
}`);
    assert.strictEqual(formattedCode, `$type: monster; p {
  @if $type == ocean {
    color: blue;
  }

  @else if $type == matador {
    color: red;
  }

  @else if $type == monster {
    color: green;
  }

  @else {
    color: black;
  }
}
`);
  });

  it('formats for loop with variables', () => {
    const formattedCode = formatSCSS('@for $i from 1 through 3 { .item-#{$i} { width: 2em * $i; } }');
    assert.strictEqual(formattedCode, `@for $i from 1 through 3 {
  .item-# {
    $i}

  {
    width: 2em * $i;
  }
}
`);
  });

  it('formats nested mixin', () => {
    const formattedCode = formatSCSS(`@mixin adjust-location($x, $y) {
@if unitless($x) {
@warn "Assuming #{$x} to be in pixels";
$x: 1px * $x;
}
position: relative; left: $x; top: $y;
}`);
    assert.strictEqual(formattedCode, `@mixin adjust-location($x, $y) {
  @if unitless($x) {
    @warn "Assuming #{$x} to be in pixels"; $x: 1px * $x;
  }

  position: relative;
  left: $x;
  top: $y;
}
`);
  });

  it('formats for loop with variables', () => {
    const formattedCode = formatSCSS(`#navbar {
$navbar-width: 800px;
$items: 5;
$navbar-color: #ce4dd6;
width: $navbar-width;
border-bottom: 2px solid $navbar-color;
li {
@extend .notice !optional;
float: left;
width: $navbar-width/$items - 10px;
background-color: lighten($navbar-color, 20%);
&:hover {
background-color: lighten($navbar-color, 10%);
}
}
}`);
    assert.strictEqual(formattedCode, `#navbar {
  $navbar-width: 800px;
  $items: 5;
  $navbar-color: #ce4dd6;
  width: $navbar-width;
  border-bottom: 2px solid $navbar-color;
  li {
    @extend .notice !optional; float: left;
    width: $navbar-width/$items - 10px;
    background-color: lighten($navbar-color, 20%);
    &:hover {
      background-color: lighten($navbar-color, 10%);
    }
  }
}
`);
  });
});


text:
/*
 * Table
 */
table.dataTable {
	margin: 0 auto;
	clear: both;
	width: 100%;
}

table.dataTable thead th {
	padding: 3px 18px 3px 10px;
	border-bottom: 1px solid black;
	font-weight: bold;
	cursor: pointer;
	*cursor: hand;
}

table.dataTable tfoot th {
	padding: 3px 18px 3px 10px;
	border-top: 1px solid black;
	font-weight: bold;
}

table.dataTable td {
	padding: 3px 10px;
}

table.dataTable td.center,
table.dataTable td.dataTables_empty {
	text-align: center;
}

table.dataTable tr.odd { background-color: #E2E4FF; }
table.dataTable tr.even { background-color: white; }

table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }

/*
 * Table wrapper
 */
.dataTables_wrapper {
	position: relative;
	clear: both;
	*zoom: 1;
}

/*
 * Page length menu
 */
.dataTables_length {
	float: left;
}

/*
 * Filter
 */
.dataTables_filter {
	float: right;
	text-align: right;
}

/*
 * Table information
 */
.dataTables_info {
	clear: both;
	float: left;
}

/*
 * Pagination
 */
.dataTables_paginate {
	float: right;
	text-align: right;
}

/* Two button pagination - previous / next */
.paginate_disabled_previous,
.paginate_enabled_previous,
.paginate_disabled_next,
.paginate_enabled_next {
	height: 19px;
	float: left;
	cursor: pointer;
	*cursor: hand;
	color: #111 !important;
}
.paginate_disabled_previous:hover,
.paginate_enabled_previous:hover,
.paginate_disabled_next:hover,
.paginate_enabled_next:hover {
	text-decoration: none !important;
}
.paginate_disabled_previous:active,
.paginate_enabled_previous:active,
.paginate_disabled_next:active,
.paginate_enabled_next:active {
	outline: none;
}

.paginate_disabled_previous,
.paginate_disabled_next {
	color: #666 !important;
}
.paginate_disabled_previous,
.paginate_enabled_previous {
	padding-left: 23px;
}
.paginate_disabled_next,
.paginate_enabled_next {
	padding-right: 23px;
	margin-left: 10px;
}

.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }

.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }

/* Full number pagination */
.paging_full_numbers {
	height: 22px;
	line-height: 22px;
}
.paging_full_numbers a:active {
	outline: none
}
.paging_full_numbers a:hover {
	text-decoration: none;
}

.paging_full_numbers a.paginate_button,
.paging_full_numbers a.paginate_active {
	border: 1px solid #aaa;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	padding: 2px 5px;
	margin: 0 3px;
	cursor: pointer;
	*cursor: hand;
	color: #333 !important;
}

.paging_full_numbers a.paginate_button {
	background-color: #ddd;
}

.paging_full_numbers a.paginate_button:hover {
	background-color: #ccc;
	text-decoration: none !important;
}

.paging_full_numbers a.paginate_active {
	background-color: #99B3FF;
}

/*
 * Processing indicator
 */
.dataTables_processing {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 250px;
	height: 30px;
	margin-left: -125px;
	margin-top: -15px;
	padding: 14px 0 2px 0;
	border: 1px solid #ddd;
	text-align: center;
	color: #999;
	font-size: 14px;
	background-color: white;
}

/*
 * Sorting
 */
.sorting { background: url('../images/sort_both.png') no-repeat center right; }
.sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
.sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }

.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }

table.dataTable thead th:active,
table.dataTable thead td:active {
	outline: none;
}

/*
 * Scrolling
 */
.dataTables_scroll {
	clear: both;
}

.dataTables_scrollBody {
	*margin-top: -1px;
	-webkit-overflow-scrolling: touch;
}

/*
 * Picker Plugin [Formstone Library]
 * @author Ben Plum
 * @version 0.4.0
 *
 * Copyright © 2013 Ben Plum <mr@benplum.com>
 * Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
 */

 	.picker-element { left: -999999px; position: absolute; }
	.picker { cursor: pointer; margin: 0 0 10px 0; overflow: hidden; }
	.picker .picker-label { color: #888; display: block; float: left; font-size: 14px; float: left; line-height: 16px;
		-webkit-user-select: none;
		   -moz-user-select: none;
		    -ms-user-select: none;
		     -o-user-select: none;
		        user-select: none;
	}
	.picker .picker-handle { border: 1px solid #ccc; display: block; float: left; height: 16px; margin: 0 5px 0 0; width: 16px; }

	@media screen and (min-width: 740px) {
		.picker:hover .picker-label { color: #555; }
		.picker:hover .picker-handle { border-color: #aaa; }

		.picker.picker-radio:hover .picker-flag { background: #ddd; }
	}

	.picker.focus .picker-label { color: #555; }
	.picker.focus .picker-handle { border-color: #aaa; }

	/* Radio Input */
	.picker.picker-radio .picker-handle { border-radius: 8px; }
	.picker.picker-radio .picker-flag { background: #fff; display: block; border-radius: 4px; height: 8px; margin: 3px; width: 8px; }

	.picker.picker-radio.focus .picker-flag { background: #ddd; }
	.picker.picker-radio.checked .picker-flag { background: #999; }

	/* Checkbox Input */
	.picker.picker-checkbox .picker-handle { border-radius: 3px; }
	.picker.picker-checkbox .picker-flag { background: #fff; border-radius: 2px; display: block; height: 100%; margin: 0; width: 100%; }
	/* 'Checked' */
	.picker.picker-checkbox.checked .picker-flag { background: #fff url(fs-picker-icon.png) no-repeat center; }

	/* Toggle Input */
	.picker.picker-toggle { padding: 20px 0 0; position: relative; }
	.picker.picker-toggle .picker-toggle-label { color: #999; font-size: 12px; position: absolute; text-transform: uppercase; top: 0; }
	.picker.picker-toggle .picker-toggle-label.on { left: 0; }
	.picker.picker-toggle .picker-toggle-label.off { color: #333; right: 0; }
	.picker.picker-toggle .picker-label { display: none; }
	.picker.picker-toggle .picker-handle { border-radius: 3px; position: relative; width: 100%; }
	.picker.picker-toggle .picker-flag { background: #666; border-radius: 2px; display: block; height: 100%; left: 50%; margin: 0; position: absolute; top: 0; width: 50%;
		-webkit-transition: left 0.1s linear;
		   -moz-transition: left 0.1s linear;
		    -ms-transition: left 0.1s linear;
		     -o-transition: left 0.1s linear;
		        transition: left 0.1s linear;
	}
	.picker.picker-toggle.checked .picker-toggle-label.on { color: #333; }
	.picker.picker-toggle.checked .picker-toggle-label.off { color: #999; }
	.picker.picker-toggle.checked .picker-flag { background: #666; left: 0; }

	/* 'Disabled' State */
	.picker.disabled .picker-label { color: #ccc; cursor: default; }
	.picker.disabled .picker-handle { border-color: #eee; cursor: default; }
	.picker.picker-radio.disabled .picker-flag { background: #fff; }
	.picker.picker-radio.disabled.checked .picker-flag { background: #eee; }
	.picker.picker-checkbox.disabled .picker-flag::after { color: #eee; content: ''; }
	.picker.picker-checkbox.disabled.checked .picker-flag::after { color: #eee; content: '\2714'; }
/* Ion.CheckRadio
// Version 1.0.0
// by Denis Ineshin | ionden.com
// CheckRadio */

.icr {
    position: relative;
    display: inline-block; vertical-align: top;
    cursor: pointer;
}
.icr.disabled {
    cursor: default;
    opacity: 0.5;
}
.icr__text {
    position: relative; display: block;
}
.icr__radio, .icr__checkbox {
    position: absolute; display: block;
    top: 0; left: 0;
}
/*
 * jquery.selectBoxIt.css 2.4.0
 * Author: @gregfranko
 */

/* Div container holding the dropdown list */
.selectboxit-container {
  position: relative;
  display: inline-block;
  /* Prevents text selection */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: -moz-none;
  ms-user-select: none;
  -o-user-select: none;
  user-select: none;
}

/* Dropdown List Box */
.selectboxit-container .selectboxit {
  width: 220px; /* Width of the dropdown list box */
  height: 30px; /* Height of the select box */
  cursor: pointer;
  padding: 0;
  display: block;
  border-radius: 6px;
  margin: 0;
}

.selectboxit-container .selectboxit.selectboxit-disabled {
  cursor: default;
}

/* Dropdown list Default Icon Positioning */
.selectboxit-default-icon {
  float: left;
}

/* Dropdown List Box Text */
.selectboxit-text {
  font: 14px Helvetica, Arial;
  text-indent: 5px;
  line-height: 30px;
  overflow: hidden;
  float: left;
  white-space: nowrap;
}

/* Dropdown List Options List*/
.selectboxit-container .selectboxit-options {
  min-width: 220px; /* Minimum Width of the dropdown list box options */
  font: 14px Helvetica, Arial;
  margin: 0;
  padding: 0;
  list-style: none;
  position: absolute;
  overflow: auto;
  cursor: pointer;
  display: none;
  z-index: 9999999999999;
  outline: none;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  -moz-box-shadow: none; /* Firefox */
  -webkit-box-shadow: none; /* Safari, Chrome */
  box-shadow: none; /* CSS3 */
  border-radius: 6px;
  text-align: left;
}

/* Overrides Bootstrap drop down option style */
.selectboxit-options .selectboxit-option.active .selectboxit-option-anchor {
  color: #fff;
}

.selectboxit-option .selectboxit-option-anchor {
  padding: 0px 3px;
  line-height: 30px;
}

.selectboxit-option .selectboxit-option-anchor:hover {
  text-decoration: none;
}

/* Dropdown List Individual Options */
.selectboxit-option, .selectboxit-optgroup-header {
  line-height: 30px; /* Height of Individual Select Box Options */
  text-indent: 5px; /* Horizontal Positioning of the select box option text */
  overflow: hidden;
  white-space: nowrap;
  list-style: none;
  margin: 0;
}

/* The first drop down option */
.selectboxit-option-first {
  border-top-right-radius: 6px;
  border-top-left-radius: 6px;
}

/* The last drop down option */
.selectboxit-option-last {
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 6px;
}

/* Dropdown List Optgroup Headers */
.selectboxit-optgroup-header {
  font-weight: bold;
}

/* Dropdown List Optgroup Options */
.selectboxit-optgroup-option {
  text-indent: 20px;
}

/* Dropdown List Optgroup Header hover psuedo class */
.selectboxit-optgroup-header[data-disabled='true']:hover {
  cursor: default;
}

/* Dropdown List Down Arrow Container (if an image is not used) */
.selectboxit-arrow-container {
  /* Positions the down arrow */
  width: 30px;
  float: right;
  position: relative;
}

/* Dropdown List Down Arrow */
.selectboxit .selectboxit-arrow-container .selectboxit-arrow {
  /* Horizontally centers the down arrow */
  margin: 0 auto;
  display: block;
  position: absolute;
  top: 50%;
  right: 40%;
}

/* Dropdown List Down Arrow For jQueryUI and jQuery Mobile */
.selectboxit .selectboxit-arrow-container .selectboxit-arrow.ui-icon {
  top: 30%;
}

/* Dropdown List Individual Option Icon Positioning */
.selectboxit-option-icon {
  float: left;
}

/* Dropdown List Individual Option Image Positioning */
.selectboxit-option-icon-url {
  width: 18px;
  height: 18px;
  background-size: 18px 18px;
  background-repeat: no-repeat;
}

.selectboxit-default-icon.selectboxit-option-icon-url {
  margin-left: 5px;
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>ConverterRegistryPlugin</title>
<meta name="date" content="2016-03-27">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.exlibris.dps.sdk.registry

Interface ConverterRegistryPlugin

public interface ConverterRegistryPlugin

Interface for a ConverterRegistry plug-in type.
 The plugin converts a mets XMl to a different representation, in preparation for publishing.
 See PublisherRegistryPlugin for more information on the publishing process.

This plugin interface only supports java implementation.

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

java.lang.String
convert(java.lang.String ieXml)

converts a given mets XML to a new representation.

void
initParam(java.util.Map<java.lang.String,java.lang.String> params)

initializes parameters needed for the plugin

java.lang.String
unPublish(java.lang.String ieXml)

Modifies a given mets XML prior to the unPublish action.

Method Detail

convert

java.lang.String convert(java.lang.String ieXml)

converts a given mets XML to a new representation.

Parameters:

ieXml - a mets XML

Returns:

the converted representation

initParam

void initParam(java.util.Map<java.lang.String,java.lang.String> params)

initializes parameters needed for the plugin

Parameters:

params - initialization parameters for the plugin.

unPublish

java.lang.String unPublish(java.lang.String ieXml)

Modifies a given mets XML prior to the unPublish action.

The unPublish action may be done by using a PublisherRegistryPlugin

Parameters:

ieXml - a mets XML

Returns:

the modified XML

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DIGITALIO___INIT___H
#define MICROPY_INCLUDED_SHARED_BINDINGS_DIGITALIO___INIT___H

#include "py/obj.h"

// Nothing now.

#endif  // MICROPY_INCLUDED_SHARED_BINDINGS_DIGITALIO___INIT___H