text:
/* This is stub file for gapi.client.{{=it.name}} definition tests */
/* IMPORTANT.
* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually.
* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator
**/
gapi.load('client', () => {
    /** now we can use gapi.client */
    gapi.client.load('androidpublisher', 'v2', () => {
        /** now we can use gapi.client.androidpublisher */

        /** don't forget to authenticate your client before sending any request to resources: */
        /** declare client_id registered in Google Developers Console */
        const client_id = '<<PUT YOUR CLIENT ID HERE>>';
        const scope = [
            /** View and manage your Google Play Developer account */
            'https://www.googleapis.com/auth/androidpublisher',
        ];
        const immediate = true;
        gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
            if (authResult && !authResult.error) {
                /** handle succesfull authorization */
                run();
            } else {
                /** handle authorization error */
            }
        });
        run();
    });

    async function run() {
        /** Commits/applies the changes made in this edit back to the app. */
        await gapi.client.edits.commit({
            editId: "editId",
            packageName: "packageName",
        });
        /**
         * Deletes an edit for an app. Creating a new edit will automatically delete any of your previous edits so this method need only be called if you want to
         * preemptively abandon an edit.
         */
        await gapi.client.edits.delete({
            editId: "editId",
            packageName: "packageName",
        });
        /** Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired). */
        await gapi.client.edits.get({
            editId: "editId",
            packageName: "packageName",
        });
        /** Creates a new edit for an app, populated with the app's current state. */
        await gapi.client.edits.insert({
            packageName: "packageName",
        });
        /** Checks that the edit can be successfully committed. The edit's changes are not applied to the live app. */
        await gapi.client.edits.validate({
            editId: "editId",
            packageName: "packageName",
        });
        /** Lists the user's current inapp item or subscription entitlements */
        await gapi.client.entitlements.list({
            maxResults: 1,
            packageName: "packageName",
            productId: "productId",
            startIndex: 4,
            token: "token",
        });
        await gapi.client.inappproducts.batch({
        });
        /** Delete an in-app product for an app. */
        await gapi.client.inappproducts.delete({
            packageName: "packageName",
            sku: "sku",
        });
        /** Returns information about the in-app product specified. */
        await gapi.client.inappproducts.get({
            packageName: "packageName",
            sku: "sku",
        });
        /** Creates a new in-app product for an app. */
        await gapi.client.inappproducts.insert({
            autoConvertMissingPrices: true,
            packageName: "packageName",
        });
        /** List all the in-app products for an Android app, both subscriptions and managed in-app products.. */
        await gapi.client.inappproducts.list({
            maxResults: 1,
            packageName: "packageName",
            startIndex: 3,
            token: "token",
        });
        /** Updates the details of an in-app product. This method supports patch semantics. */
        await gapi.client.inappproducts.patch({
            autoConvertMissingPrices: true,
            packageName: "packageName",
            sku: "sku",
        });
        /** Updates the details of an in-app product. */
        await gapi.client.inappproducts.update({
            autoConvertMissingPrices: true,
            packageName: "packageName",
            sku: "sku",
        });
        /** Returns a single review. */
        await gapi.client.reviews.get({
            packageName: "packageName",
            reviewId: "reviewId",
            translationLanguage: "translationLanguage",
        });
        /** Returns a list of reviews. Only reviews from last week will be returned. */
        await gapi.client.reviews.list({
            maxResults: 1,
            packageName: "packageName",
            startIndex: 3,
            token: "token",
            translationLanguage: "translationLanguage",
        });
        /** Reply to a single review, or update an existing reply. */
        await gapi.client.reviews.reply({
            packageName: "packageName",
            reviewId: "reviewId",
        });
    }
});


text:
<PackageItem xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.sdltridion.com/ContentManager/ImportExport/Package/2013">
  <Dependencies>
    <Dependency dependencyType="Publication" itemUrl="/webdav/401%20Automated%20Test%20Parent" linkName="LocationInfo/ContextRepository" />
    <Dependency dependencyType="BluePrintParent" itemUrl="/webdav/100%20Master/Building%20Blocks/Modules/Search/Editor/Templates/Search%20Results.tctcmp" linkName="" />
  </Dependencies>
</PackageItem>

redpajama_set_name: RedPajamaGithub


text:
var post_attr = require('./db_constants/db_blog_post').db_blog_post_attr;
var comm_attr = require('./db_constants/db_comments').db_comments_attr;
var ui_msg = require('./ui_constants').ui_msg;
var ui_err_msg = require('./ui_constants').ui_err_msg;
var vasync = require('vasync');

function add_blog_post(req, res){
    var post_data = req.body;
    var post_title = post_data.title;
    var post_id = post_data.id;
    var post_content = post_data.content;
    var doc = {};
    console.log("Request Coming into add Post: %s", post_id);
    doc[post_attr.ID] = post_id;
    doc[post_attr.TITLE] = post_title;
    doc[post_attr.CONTENT] = post_content;
    doc[post_attr.CREATED_AT] = new Date().getTime();
    doc[post_attr.VERSION] = 1;

    // Insert the document to the collection
    var col = blogdb.collection('blog_post');
    col.insertOne(doc, {}, function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: ui_err_msg.MSG_ADD_ERR}));
            res.end();
            console.log(err);
            return;
        }
        res.write(JSON.stringify({success:true, data:ui_msg.MSG_ADD}, null, " "));
        console.log(result);
        res.end();
    });
}

function edit_blog_post(req, res){
    var post_data = req.body
    var post_title = post_data.title;
    var post_id = post_data.id;
    var post_content = post_data.content;
    var pgraph_ids = [];
    var doc = {};
    var selector = {};
    var opts = {};
    var updates = {};
    var col;
    console.log("Request Coming into edit Post: %s", post_id);
    for(var i=0; i<post_content.length; i++)
        pgraph_ids.push(post_content[i]["p_id"]);

    doc[post_attr.TITLE] = post_title;
    doc[post_attr.CONTENT] = post_content;
    doc[post_attr.MODIFIED_AT] = new Date().getTime();
    updates["$set"] = doc;
    updates["$inc"] = {"ver" :1 };
    opts.w = 1;

    // Function to update the blog post
    vasync.waterfall([function f1(callback) {
        selector[post_attr.ID] = post_id;
        updates["$set"] = doc;
        updates["$inc"] = {"ver" :1 };
        opts.w = 1;
        col = blogdb.collection('blog_post');
        col.updateOne(selector, updates, opts, function(err, result) {
            if (err)
                callback(err);
            else
                callback();
        });
    }, function f2(callback) {
    // Function to delete the comments, If some of the paragraphs are removed
    // as part of editing the Post
        console.log("Deleting invalid Comments for the post %s", post_id);
        selector = {};
        selector[comm_attr.POST_ID] = post_id;
        selector[comm_attr.PGRAPH_ID] = { $nin : pgraph_ids };
        col = blogdb.collection('comments');
        var options = {};
        col.deleteMany(selector, options, function(err, result) {
            if (err)
                callback(err);
            else
                callback();
        });
    }], function(err, result) {
        if (err) {
            console.log(err);
            res.write(JSON.stringify({success: false, error: ui_err_msg.MSG_EDIT_ERR}));
            res.end();
        } else {
            res.write(JSON.stringify({success:true, data:ui_msg.MSG_EDIT}, null, " "));
            res.end();
        }
    });
}

function list_blog_posts(req, res){
    console.log("Request coming in to list Blog posts");
    var limit = req.query.lim;
    var page = req.query.page;
    var selector = {};
    var opts = {};
    var projector = {};
    projector[post_attr.TITLE] = 1;

    opts["sort"] = {"created_at": -1};
    opts["skip"] = ((page-1) * limit);
    opts["limit"] = limit;
    opts["fields"] = projector;
    var col = blogdb.collection('blog_post');
    col.find(selector, opts).toArray(function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: err}));
            res.end();
            console.log(err);
            return;
        }
        res.write(JSON.stringify({success:true, data:result}, null, " "));
        console.log(result);
        res.end();
    });
}

function view_blog_post(req, res){
    var post_id = req.query.id;
    console.log("Request coming in to view the Blog post %s", post_id);
    var selector = {};
    var opts = {};
    var projector = {};

    selector[post_attr.ID] = post_id;
    var col = blogdb.collection('blog_post');
    col.findOne(selector, opts, function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: err}));
            res.end();
            console.log(err);
            return;
        }
        res.write(JSON.stringify({success:true, data:result}, null, " "));
        console.log(result);
        res.end();
    });
}

function del_blog_post(req, res){
    var post_id = req.query.id;
    var selector = {};
    var options = {};
    var col;
    console.log("Request coming in to delete the Blog post %s", post_id);
    vasync.waterfall([function f1(callback) {
        selector[post_attr.ID] = post_id;
        col = blogdb.collection('blog_post');
        col.deleteOne(selector, options, function(err, result) {
            if (err)
                callback(err);
            else
                callback();
        });
    }, function f2(callback) {
    // Delete all the comments associated with the post_id
        console.log("Deleting comments releated to post %s", post_id);
        selector = {};
        selector[comm_attr.POST_ID] = post_id;
        col = blogdb.collection('comments');
        col.deleteMany(selector, options, function(err, result) {
            if (err)
                callback(err);
            else
                callback();
        });
    }], function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: ui_err_msg.MSG_DEL_ERR}));
            res.end();
            console.log(err);
            return;
        } else {
            res.write(JSON.stringify({success:true, data: ui_msg.MSG_DELETE}, null, " "));
            console.log(result);
            res.end();
        }
    });
}

function add_comments(req, res){
    var comm_data = req.body;
    var doc = {};
    console.log("Request coming in to add the comment %s", comm_data);
    doc[comm_attr.ID] = comm_data.id;
    doc[comm_attr.POST_ID] = comm_data.post_id;
    doc[comm_attr.PGRAPH_ID] = comm_data.p_id;
    doc[comm_attr.DATA] = comm_data.data;
    doc[comm_attr.CREATED_AT] = new Date().getTime();
    doc[comm_attr.VERSION] = 1;
    //Insert the comments
    var col = blogdb.collection('comments');
    col.insertOne(doc, {}, function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: ui_err_msg.MSG_ADD_ERR}));
            res.end();
            console.log(err);
            return;
        }
        res.write(JSON.stringify({success:true, data: ui_msg.MSG_ADD}, null, " "));
        console.log(result);
        res.end();
    });
}

function edit_comments(req, res){
    var comm_data = req.body;
    var selector = {};
    var opts = {};
    var updates = {};
    console.log("Request coming in to edit the comment %s", comm_data);
    selector[comm_attr.ID] = comm_data.id;
    var doc = {};
    doc[comm_attr.DATA] = comm_data.data;
    doc[comm_attr.MODIFIED_AT] = new Date().getTime();
    updates["$set"] = doc;
    updates["$inc"] = {"ver": 1};
    // Update the document
    var col = blogdb.collection('comments');
    col.updateOne(selector, updates, opts, function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: ui_err_msg.MSG_EDIT_ERR}));
            res.end();
            console.log(err);
            return;
        }
        res.write(JSON.stringify({success:true, data: ui_msg.MSG_EDIT}, null, " "));
        console.log(result);
        res.end();
    });
}

function view_comments(req, res){
    var post_id = req.query.po_id;
    var selector = {};
    var opts = {};
    var projector = {};
    console.log("Request coming in to view the comments of post %s", post_id);
    selector[comm_attr.POST_ID] = post_id;

    col = blogdb.collection('comments');
    col.find(selector, opts).toArray(function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: err}));
            res.end();
            console.log(err);
            return;
        }
        res.write(JSON.stringify({success:true, data:result}, null, " "));
        console.log(result);
        res.end();
    });
}

function delete_comments(req, res){
    var com_id = req.query.id;
    var selector = {};
    var options = {};
    console.log("Request coming in to delete the comment %s", com_id);
    selector[comm_attr.ID] = com_id;
    col = blogdb.collection('comments');
    col.deleteOne(selector, options, function(err, result) {
        if (err) {
            res.write(JSON.stringify({success: false, error: ui_err_msg.MSG_DEL_ERR}));
            res.end();
            console.log(err);
            return;
        }
        res.write(JSON.stringify({success:true, data: ui_msg.MSG_DELETE}, null, " "));
        console.log(result);
        res.end();
    });
}

module.exports.add_blog_post = add_blog_post;
module.exports.edit_blog_post = edit_blog_post;
module.exports.del_blog_post = del_blog_post;
module.exports.list_blog_posts = list_blog_posts;
module.exports.view_blog_post = view_blog_post;
module.exports.add_comments = add_comments;
module.exports.edit_comments = edit_comments;
module.exports.delete_comments = delete_comments;
module.exports.view_comments = view_comments;


text:
module Fog
  module Compute
    class Cloudstack
      class Real

        # Deletes a specified user.
        #
        # {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/deleteVolume.html]
        def delete_volume(options={})
          options.merge!(
            'command' => 'deleteVolume'
          )

          request(options)
        end

      end # Real
      class Mock
        def delete_volume(options={})
          volume_id = options['id']
          if self.data[:volumes][volume_id]
            self.data[:volumes].delete(volume_id)
            {
              "deletevolumeresponse" => {
                "success" => "true"
              }
            }
          else # FIXME: mayhaps
            self.data[:volumes].delete(volume_id)
            {
              "deletevolumeresponse" => {
                "success" => "false"
              }
            }
          end
        end
      end # Mock
    end # Cloudstack
  end # Compute
end # Fog


text:
import { WindowMock } from "../src/xrm-mock/window.mock";
import { XrmStaticMock } from "../src/xrm-mock/xrmstatic.mock";

describe("Window Mock", () => {
    let windowMock;
    beforeEach(() => {
        windowMock = new WindowMock(new XrmStaticMock({}));
    });
    it("should exist", () => {
        expect(windowMock).toBeDefined();
    });
});


text:
<?php

class Comment extends Eloquent
{
	public function users()
	{
		return $this->belongs_to('User');
	}
}


text:
require 'redis_cluster_cache_benchmark'

require 'optparse'

options = {
  name: nil,
  process: 10,
  repeat: 1,
  scenario: nil,
  classname: nil,
  log_dir: File.expand_path("./log"),
}

OptionParser.new{|opt|
  opt.version = RedisClusterCacheBenchmark::VERSION
  opt.on("-N", "--name=#{options[:name]}"          , "name of test pattern" ){|v| options[:name] = v }
  opt.on("-p", "--process=#{options[:process]}"    , "number of process"    ){|v| options[:process] = v.to_i }
  opt.on("-r", "--repeat=#{options[:repeat]}"      , "number of repeat"     ){|v| options[:repeat] = v.to_i }
  opt.on("-s", "--scenario=#{options[:scenario]}"  , "path to scenario file"){|v| options[:scenario] = v }
  opt.on("-C", "--classname=#{options[:classname]}", "client class name"    ){|v| options[:classname] = v }
  opt.on("-c", "--config=#{options[:config_path]}" , "path to config file"  ){|v| options[:config_path] = v }
  opt.on("-l", "--log-dir=#{options[:log_dir]}"    , "path to log file directory"){|v| options[:log_dir] = v }
}.parse!

raise "--name must be given." unless options[:name]

RedisClusterCacheBenchmark::Spawner.new(options).run


text:
namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void generateOptions();
    void generateInfoList();
    void generateCleanList();
    QList<CharInfo*> getCharInfo(ushort ch);
    QList<CharInfo*> getCharInfo(ushort ch, CharInfo::Composed composed);

private slots:
    void changeFont();
    void generateImage();
    void viewCharMap();
    void on_lineArabic_editingFinished();
    void saveImage();
    void generateText();
    void selectFgColor();
    void selectBgColor();
    QImage cleanImage();
    void generateCode();
    void selectOutFile();
    void charInfoChanged(int index);
    void nextCharInfo();
    void prevCharInfo();

    void on_checkAntiAlaise_toggled(bool checked);

private:
    QFont m_font;
    QImage m_pixMap;
    QColor m_fgColor;
    QColor m_bgColor;
    CharInfoWidget *m_charWidget;
    QList<ushort> m_twoCases;
    QList<ushort> m_fourCases;
    QList<ushort> m_ignoreChars;
    QList<CharInfo*> m_fullList;
    QList<CharInfo*> m_cleanList;
    bool m_fontChanged;
    bool m_antiAliase;
    int m_currentCharInfo;
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H


text:
"use strict";
var Tinkerforge = require('tinkerforge');
var devices = require('../lib/devices');

module.exports = function(RED) {
    function tinkerForgeTemperatureIR(n) {
        RED.nodes.createNode(this, n);
        this.device = n.device;
        this.sensor = n.sensor;
        this.name = n.name;
        this.topic = n.topic;
        this.pollTime = n.pollTime;
        var node = this;

        node.ipcon = new Tinkerforge.IPConnection(); //devices[this.device].ipcon;
        node.ipcon.setAutoReconnect(true);
        var devs = devices.getDevices();
        node.ipcon.connect(devs[node.device].host, devs[node.device].port, function(error) {
            if (error) {
                node.warn("couldn't connect");
            }
        });

        node.ipcon.on(Tinkerforge.IPConnection.CALLBACK_CONNECTED, function(connectReason) {

            node.t = new Tinkerforge.BrickletTemperatureIR(node.sensor, node.ipcon);

            node.interval = setInterval(function() {
                    if (node.t) {

                        node.t.getObjectTemperature(function(temp) {
                                var ot = {
                                    topic: node.topic || 'objecTemperature',
                                    payload: temp / 10.0
                                };

                                node.t.getAmbientTemperature(function(temp2) {
                                    var at = {
                                        topic: node.topic || 'ambientTemperature',
                                        payload: temp2 / 10.0
                                    };

                                    var temperature = [
                                        [ot, at]
                                    ];
                                    node.send(temperature);

                                });

                            },

                            function(err) {
                                //error
                                node.error("PTC - " + err);
                            });
                    }
                },
                (node.pollTime * 1000));
        });

        node.on('close', function() {
            clearInterval(node.interval);
            node.ipcon.disconnect();
        });

    }

    RED.nodes.registerType('TinkerForge TemperatureIR', tinkerForgeTemperatureIR);
};


text:
@font-face {
  font-family: 'PopulaireLight';
  src: url("PopulaireLight-webfont.eot");
  src: url("PopulaireLight-webfont.eot?#iefix") format('embedded-opentype'),
       url("PopulaireLight-webfont.woff") format('woff'),
       url("PopulaireLight-webfont.ttf") format('truetype'),
       url("PopulaireLight-webfont.svg#PopulaireLightLight") format('svg');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'PopulaireRegular';
  src: url("/assets/fonts/vanilla/Populaire-webfont.eot");
  src: url("/assets/fonts/vanilla/Populaire-webfont.eot?#iefix") format('embedded-opentype'),
       url("/assets/fonts/vanilla/Populaire-webfont.woff") format('woff'),
       url("/assets/fonts/vanilla/Populaire-webfont.ttf") format('truetype'),
       url("/assets/fonts/vanilla/Populaire-webfont.svg#PopulaireRegular") format('svg');
  font-weight: normal;
  font-style: normal;
}


text:
void test01()
{
  // Check for required base class.
  typedef std::moneypunct<char, true> test_type;
  typedef std::locale::facet base_type;
  const test_type& obj = std::use_facet<test_type>(std::locale());
  const base_type* base __attribute__((unused)) = &obj;

  // Check for required typedefs
  typedef test_type::char_type char_type;
  typedef test_type::string_type string_type;
}

int main()
{
  test01();
  return 0;
}


text:
package sqs

import ()

/******************************************************************************
 * Constants
 */

/*	The action the client wants to allow for the specified principal.
	ALL = "*"
	CHANGE_MESSAGE_VISIBILITY = "ChangeMessageVisibility"
	DELETE_MESSAGE = "DeleteMessage"
	GET_QUEUE_ATTRIBUTES = "GetQueueAttributes"
	GET_QUEUE_URL = "GetQueueUrl"
	RECEIVE_MESSAGE = "ReceiveMessage"
	SEND_MESSAGE = "SendMessage" */
type Action string

const (
	ALL_ACTIONS               Action = "*"
	CHANGE_MESSAGE_VISIBILITY Action = "ChangeMessageVisibility"
	DELETE_MESSAGE            Action = "DeleteMessage"
	GET_QUEUE_ATTRIBUTES      Action = "GetQueueAttributes"
	GET_QUEUE_URL             Action = "GetQueueUrl"
	RECEIVE_MESSAGE           Action = "ReceiveMessage"
	SEND_MESSAGE              Action = "SendMessage"
)

/*	A map of attributes to the respective values.
	APPROXIMATE_NUMBER_OF_MESSAGES = "ApproximateNumberOfMessages"
	APPROXIMATE_NUMBER_OF_MESSAGES_DELAYED = "ApproximateNumberOfMessagesDelayed"
	APPROXIMATE_NUMBER_OF_MESSAGES_NOT_VISIBILE = "ApproximateNumberOfMessagesNotVisible"
	CREATED_TIMESTAMP = "CreatedTimestamp"
	DELAY_SECONDS = "DelaySeconds"
	LAST_MODIFIED_TIMESTAMP = "LastModifiedTimestamp"
	MAXIMUM_MESSAGE_SIZE = "MaximumMessageSize"
	MESSAGE_RETENTION_PERIOD = "MessageRetentionPeriod"
	POLICY = "Policy"
	QUEUE_ARN = "QueueArn"
	RECEIVE_MESSAGE_WAIT_TIME_SECONDS = "ReceiveMessageWaitTimeSeconds"
	REDRIVE_POLICY Attrite = "RedrivePolicy"
	VISIBILITY_TIMEOUT = "VisibilityTimeout" */
type Attribute string

const (
	ALL_ATTRIBUTES                              Attribute = "All"
	APPROXIMATE_NUMBER_OF_MESSAGES              Attribute = "ApproximateNumberOfMessages"
	APPROXIMATE_NUMBER_OF_MESSAGES_DELAYED      Attribute = "ApproximateNumberOfMessagesDelayed"
	APPROXIMATE_NUMBER_OF_MESSAGES_NOT_VISIBILE Attribute = "ApproximateNumberOfMessagesNotVisible"
	CREATED_TIMESTAMP                           Attribute = "CreatedTimestamp"
	DELAY_SECONDS                               Attribute = "DelaySeconds"
	LAST_MODIFIED_TIMESTAMP                     Attribute = "LastModifiedTimestamp"
	MAXIMUM_MESSAGE_SIZE                        Attribute = "MaximumMessageSize"
	MESSAGE_RETENTION_PERIOD                    Attribute = "MessageRetentionPeriod"
	POLICY                                      Attribute = "Policy"
	QUEUE_ARN                                   Attribute = "QueueArn"
	RECEIVE_MESSAGE_WAIT_TIME_SECONDS           Attribute = "ReceiveMessageWaitTimeSeconds"
	REDRIVE_POLICY                              Attribute = "RedrivePolicy"
	VISIBILITY_TIMEOUT                          Attribute = "VisibilityTimeout"
)

/******************************************************************************
 * Data Types
 */

// This is used in the responses of batch API to give a detailed description
// of the result of an action on each entry in the request.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_BatchResultErrorEntry.html]
type BatchResultErrorEntry struct {
	Code        string `xml:"Code"`
	Id          string `xml:"Id"`
	Message     string `xml:"Message,omitempty"`
	SenderFault bool   `xml:"SenderFault"`
}

// Encloses a receipt handle and an entry id for each message in ChangeMessageVisibilityBatch.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibilityBatchRequestEntry.html]
type ChangeMessageVisibilityBatchRequestEntry struct {
	Id                string `name:"Id"`
	ReceiptHandle     string `name:"ReceiptHandle"`
	VisibilityTimeout int    `name:"VisibilityTimeout, omitempty"`
}

// For each message in the batch, the response contains a ChangeMessageVisibilityBatchResultEntry
// tag if the message succeeds or a BatchResultErrorEntry tag if the message fails.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibilityBatchResult.html]
type ChangeMessageVisibilityBatchResult struct {
	Failed     []BatchResultErrorEntry                   `name:"BatchResultErrorEntry.#."`
	Successful []ChangeMessageVisibilityBatchResultEntry `name:"ChangeMessageVisibilityBatchResultEntry.#."`
}

// Encloses the id of an entry in ChangeMessageVisibilityBatch.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibilityBatchResultEntry.html]
type ChangeMessageVisibilityBatchResultEntry struct {
	Id string `name:"ChangeMessageVisibilityBatchResultEntry"`
}

// Returns the QueueUrl element of the created queue.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueueResult.html]
type CreateQueueResult struct {
	QueueUrl string `name:QueueUrl,omitempty`
}

// Encloses a receipt handle and an identifier for it.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessageBatchRequestEntry.html]
type DeleteMessageBatchRequestEntry struct {
	Id            string `name:"Id"`
	ReceiptHandle string `name:"ReceiptHandle"`
}

// For each message in the batch, the response contains a DeleteMessageBatchResultEntry tag
// if the message is deleted or a BatchResultErrorEntry tag if the message cannot be deleted.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessageBatchResult.html]
type DeleteMessageBatchResult struct {
	Failed     []BatchResultErrorEntry                   `name:"BatchResultErrorEntry.#."`
	Successful []ChangeMessageVisibilityBatchResultEntry `name:"ChangeMessageVisibilityBatchResultEntry.#."`
}

// Encloses the id an entry in DeleteMessageBatch.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessageBatchResultEntry.html]
type DeleteMessageBatchResultEntry struct {
	Id string `xml:"Id"`
}

// A list of returned queue attributes.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributesResult.html]
type GetQueueAttributesResult struct {
	Attributes map[Attribute]string `xml:"Attributes"`
}

// For more information, see Responses in the Amazon SQS Developer Guide.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/UnderstandingResponses.html]
type GetQueueUrlResult struct {
	QueueUrl string `xml:"QueueUrl,omitempty"`
}

// A list of your dead letter source queues.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListDeadLetterSourceQueuesResult.html]
type ListDeadLetterSourceQueuesResult struct {
	QueueUrls []string `xml:"QueueUrls"`
}

// A list of your queues.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListQueuesResult.html]
type ListQueuesResult struct {
	QueueUrls []string `xml:"QueueUrls"`
}

// An Amazon SQS message.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_Message.html]
type Message struct {
	Attributes             map[Attribute]string    `xml:"Attributes,omitempty"`
	Body                   string                  `xml:"Body,omitempty"`
	MD5OfBody              string                  `xml:"MD5OfBody,omitempty"`
	MD5OfMessageAttributes string                  `xml:"MD5OfMessageAttributes,omitempty"`
	MessageAttributes      []MessageAttributeValue `xml:"MessageAttributes,omitempty"`
	MessageId              string                  `xml:"MessageId,omitempty"`
	ReceiptHandle          string                  `xml:"ReceiptHandle,omitempty"`
}

// The user-specified message attribute value. For string data types, the value attribute has
// the same restrictions on the content as the message body.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_MessageAttributeValue.html]
// Message attribute data types:
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSMessageAttributes.html#SQSMessageAttributes.DataTypes]
type MessageAttributeValue struct {
	BinaryListValues [][]byte `xml:"BinaryListValues,omitempty"`
	BinaryValue      []byte   `xml:"BinaryValue,omitempty"`
	DataType         string   `xml:"DataType"`
	StringListValues []string `xml:"StringListValues,omitempty"`
	StringValue      string   `xml:"StringValue,omitempty"`
}

// A list of received messages.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessageResult.html]
type ReceiveMessageResult struct {
	Messages []Message `xml:"Messages"`
}

// Contains the details of a single Amazon SQS message along with a Id.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatchRequestEntry.html]
// Message Attribute Items and Validation
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSMessageAttributes.html#SQSMessageAttributesNTV]
type SendMessageBatchRequestEntry struct {
	DelaySeconds      int                              `name:"DelaySeconds,omitempty"`
	Id                string                           `name:"Id"`
	MessageAttributes map[string]MessageAttributeValue `name:"MessageAttributes,omitempty"`
	MessageBody       string                           `name:"MessageBody"`
}

// For each message in the batch, the response contains a SendMessageBatchResultEntry tag
// if the message succeeds or a BatchResultErrorEntry tag if the message fails.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatchResult.html]
type SendMessageBatchResult struct {
	Failed     []BatchResultErrorEntry       `xml:"BatchResultErrorEntry"`
	Successful []SendMessageBatchResultEntry `xml:"SendMessageBatchResultEntry"`
}

// Encloses a message ID for successfully enqueued message of a SendMessageBatch.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatchResultEntry.html]
type SendMessageBatchResultEntry struct {
	Id                     string `xml:"Id"`
	MD5OfMessageAttributes string `xml:"MD5OfMessageAttributes,omitempty"`
	MD5OfMessageBody       string `xml:"MD5OfMessageBody"`
	MessageId              string `xml:"MessageId,omitempty"`
}

// The MD5OfMessageBody and MessageId elements.
// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageResult.html]
type SendMessageResult struct {
	MD5OfMessageAttributes string `xml:"MD5OfMessageAttributes,omitempty"`
	MD5OfMessageBody       string `xml:"MD5OfMessageBody,omitempty"`
	MessageId              string `xml:"MessageId,omitempty,omitempty"`
}

/******************************************************************************
 * Responses
 */

type ResponseMetadata struct {
	RequestId string `xml:"RequestId"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_AddPermission.html]
type AddPermissionResponse struct {
	ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibility.html]
type ChangeMessageVisibilityResponse struct {
	ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibilityBatch.html]
type ChangeMessageVisibilityBatchResponse struct {
	ChangeMessageVisibilityBatchResult ChangeMessageVisibilityBatchResult `xml:"ChangeMessageVisibilityBatchResult"`
	ResponseMetadata                   ResponseMetadata                   `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html]
type CreateQueueResponse struct {
	CreateQueueResult CreateQueueResult `xml:"CreateQueueResult"`
	ResponseMetadata  ResponseMetadata  `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessage.html]
type DeleteMessageResponse struct {
	ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessageBatch.html]
type DeleteMessageBatchResponse struct {
	DeleteMessageBatchResult DeleteMessageBatchResult `xml:"DeleteMessageBatchResult"`
	ResponseMetadata         ResponseMetadata         `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteQueue.html]
type DeleteQueueResponse struct {
	ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html]
type GetQueueAttributesResponse struct {
	GetQueueAttributesResult GetQueueAttributesResult `xml:"GetQueueAttributesResult"`
	ResponseMetadata         ResponseMetadata         `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueUrl.html]
type GetQueueUrlResponse struct {
	GetQueueUrlResult GetQueueUrlResult `xml:"GetQueueUrlResult"`
	ResponseMetadata  ResponseMetadata  `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListDeadLetterSourceQueues.html]
type ListDeadLetterSourceQueuesResponse struct {
	ListDeadLetterSourceQueuesResult ListDeadLetterSourceQueuesResult `xml:"ListDeadLetterSourceQueuesResult"`
	ResponseMetadata                 ResponseMetadata                 `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListQueues.html]
type ListQueuesResponse struct {
	ListQueuesResult ListQueuesResult `xml:"ListQueuesResult"`
	ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html]
type ReceiveMessageResponse struct {
	ReceiveMessageResult ReceiveMessageResult `xml:"ReceiveMessageResult"`
	ResponseMetadata     ResponseMetadata     `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_RemovePermission.html]
type RemovePermissionResponse struct {
	ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html]
type SendMessageResponse struct {
	SendMessageResult SendMessageResult `xml:"SendMessageResult"`
	ResponseMetadata  ResponseMetadata  `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatch.html]
type SendMessageBatchResponse struct {
	SendMessageBatchResult SendMessageBatchResult `xml:"SendMessageBatchResult"`
	ResponseMetadata       ResponseMetadata       `xml:"ResponseMetadata"`
}

// [http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html]
type SetQueueAttributesResponse struct {
	ResponseMetadata ResponseMetadata `xml:"ResponseMetadata"`
}


text: module.exports = view;


text:
<?php

namespace Illuminate\Foundation\Console;

use Closure;
use Illuminate\Console\Command;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Contracts\Queue\ShouldQueue;
use ReflectionFunction;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'event:list')]
class EventListCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'event:list {--event= : Filter the events by name}';

    /**
     * The name of the console command.
     *
     * This name is used to identify the command during lazy loading.
     *
     * @var string|null
     *
     * @deprecated
     */
    protected static $defaultName = 'event:list';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = "List the application's events and listeners";

    /**
     * The events dispatcher resolver callback.
     *
     * @var \Closure|null
     */
    protected static $eventsResolver;

    /**
     * Execute the console command.
     *
     * @return void
     */
    public function handle()
    {
        $events = $this->getEvents()->sortKeys();

        if ($events->isEmpty()) {
            $this->components->info("Your application doesn't have any events matching the given criteria.");

            return;
        }

        $this->newLine();

        $events->each(function ($listeners, $event) {
            $this->components->twoColumnDetail($this->appendEventInterfaces($event));
            $this->components->bulletList($listeners);
        });

        $this->newLine();
    }

    /**
     * Get all of the events and listeners configured for the application.
     *
     * @return \Illuminate\Support\Collection
     */
    protected function getEvents()
    {
        $events = collect($this->getListenersOnDispatcher());

        if ($this->filteringByEvent()) {
            $events = $this->filterEvents($events);
        }

        return $events;
    }

    /**
     * Get the event / listeners from the dispatcher object.
     *
     * @return array
     */
    protected function getListenersOnDispatcher()
    {
        $events = [];

        foreach ($this->getRawListeners() as $event => $rawListeners) {
            foreach ($rawListeners as $rawListener) {
                if (is_string($rawListener)) {
                    $events[$event][] = $this->appendListenerInterfaces($rawListener);
                } elseif ($rawListener instanceof Closure) {
                    $events[$event][] = $this->stringifyClosure($rawListener);
                } elseif (is_array($rawListener) && count($rawListener) === 2) {
                    if (is_object($rawListener[0])) {
                        $rawListener[0] = get_class($rawListener[0]);
                    }

                    $events[$event][] = $this->appendListenerInterfaces(implode('@', $rawListener));
                }
            }
        }

        return $events;
    }

    /**
     * Add the event implemented interfaces to the output.
     *
     * @param  string  $event
     * @return string
     */
    protected function appendEventInterfaces($event)
    {
        if (! class_exists($event)) {
            return $event;
        }

        $interfaces = class_implements($event);

        if (in_array(ShouldBroadcast::class, $interfaces)) {
            $event .= ' <fg=bright-blue>(ShouldBroadcast)</>';
        }

        return $event;
    }

    /**
     * Add the listener implemented interfaces to the output.
     *
     * @param  string  $listener
     * @return string
     */
    protected function appendListenerInterfaces($listener)
    {
        $listener = explode('@', $listener);

        $interfaces = class_implements($listener[0]);

        $listener = implode('@', $listener);

        if (in_array(ShouldQueue::class, $interfaces)) {
            $listener .= ' <fg=bright-blue>(ShouldQueue)</>';
        }

        return $listener;
    }

    /**
     * Get a displayable string representation of a Closure listener.
     *
     * @param  \Closure  $rawListener
     * @return string
     */
    protected function stringifyClosure(Closure $rawListener)
    {
        $reflection = new ReflectionFunction($rawListener);

        $path = str_replace([base_path(), DIRECTORY_SEPARATOR], ['', '/'], $reflection->getFileName() ?: '');

        return 'Closure at: '.$path.':'.$reflection->getStartLine();
    }

    /**
     * Filter the given events using the provided event name filter.
     *
     * @param  \Illuminate\Support\Collection  $events
     * @return \Illuminate\Support\Collection
     */
    protected function filterEvents($events)
    {
        if (! $eventName = $this->option('event')) {
            return $events;
        }

        return $events->filter(
            fn ($listeners, $event) => str_contains($event, $eventName)
        );
    }

    /**
     * Determine whether the user is filtering by an event name.
     *
     * @return bool
     */
    protected function filteringByEvent()
    {
        return ! empty($this->option('event'));
    }

    /**
     * Gets the raw version of event listeners from the event dispatcher.
     *
     * @return array
     */
    protected function getRawListeners()
    {
        return $this->getEventsDispatcher()->getRawListeners();
    }

    /**
     * Get the event dispatcher.
     *
     * @return Illuminate\Events\Dispatcher
     */
    public function getEventsDispatcher()
    {
        return is_null(self::$eventsResolver)
            ? $this->getLaravel()->make('events')
            : call_user_func(self::$eventsResolver);
    }

    /**
     * Set a callback that should be used when resolving the events dispatcher.
     *
     * @param  \Closure|null  $resolver
     * @return void
     */
    public static function resolveEventsUsing($resolver)
    {
        static::$eventsResolver = $resolver;
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class EmailProviderBase
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class EmailProviderBase
   ">
    <meta name="generator" content="docfx 2.7.3.0">

    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">

              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                Toggle navigation

              </button>

              <form class="navbar-form navbar-right" role="search" id="search">

                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">

              </form>

          Show / Hide Table of Contents

Class EmailProviderBase

Base class for email provider.

Inheritance

System.Object

EmailProviderBase

Inherited Members

                  System.Object.Equals(System.Object)

                  System.Object.Equals(System.Object, System.Object)

                  System.Object.GetHashCode()

                  System.Object.GetType()

                  System.Object.MemberwiseClone()

                  System.Object.ReferenceEquals(System.Object, System.Object)

                  System.Object.ToString()

Namespace:Auth0.Core

Assembly:Auth0.Core.dll

Syntax

public abstract class EmailProviderBase

Properties

                |
                Improve this Doc

                View Source

Credentials

Gets or sets the name of the email provider.

Declaration

[JsonProperty("credentials")]
public EmailProviderCredentials Credentials { get; set; }

Property Value

                    Type
                    Description

                    EmailProviderCredentials

                |
                Improve this Doc

                View Source

DefaultFromAddress

Gets or sets the default from address

Declaration

[JsonProperty("default_from_address")]
public string DefaultFromAddress { get; set; }

Property Value

                    Type
                    Description

                    System.String

                |
                Improve this Doc

                View Source

IsEnabled

Gets or sets whether using your own email provider is enabled.

Declaration

[JsonProperty("enabled")]
public bool ? IsEnabled { get; set; }

Property Value

                    Type
                    Description

                    System.Nullable<T><System.Boolean>

                |
                Improve this Doc

                View Source

Name

Gets or sets the name of the provider.

Declaration

[JsonProperty("name")]
public string Name { get; set; }

Property Value

                    Type
                    Description

                    System.String

                |
                Improve this Doc

                View Source

Settings

Gets or sets the settings of the email provider.

Declaration

[JsonProperty("settings")]
public dynamic Settings { get; set; }

Property Value

                    Type
                    Description

                    System.Object

                    Improve this Doc

                    View Source

              Back to top

            Copyright © 2015-2016 Microsoft
Generated by DocFX


text:
// @flow weak

import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';

export const styles = (theme: Object) => ({
  root: {
    position: 'absolute',
    left: 0,
    right: 0,
    height: 48,
    background: 'rgba(0, 0, 0, 0.4)',
    display: 'flex',
    alignItems: 'center',
    fontFamily: theme.typography.fontFamily,
  },
  rootBottom: {
    bottom: 0,
  },
  rootTop: {
    top: 0,
  },
  rootWithSubtitle: {
    height: 68,
  },
  titleWrap: {
    flexGrow: 1,
    marginLeft: theme.mixins.gutters({}).paddingLeft,
    marginRight: theme.mixins.gutters({}).paddingRight,
    color: 'white',
    overflow: 'hidden',
  },
  titleWrapActionLeft: {
    marginLeft: 0,
  },
  titleWrapActionRight: {
    marginRight: 0,
  },
  title: {
    fontSize: 16,
    lineHeight: '24px',
    textOverflow: 'ellipsis',
    overflow: 'hidden',
    whiteSpace: 'nowrap',
  },
  subtitle: {
    fontSize: 12,
    lineHeight: 1,
    textOverflow: 'ellipsis',
    overflow: 'hidden',
    whiteSpace: 'nowrap',
  },
  actionIconPositionLeft: {
    order: -1,
  },
  childImg: {
    height: '100%',
    transform: 'translateX(-50%)',
    position: 'relative',
    left: '50%',
  },
});

function GridListTileBar(props) {
  const {
    actionIcon,
    actionPosition,
    classes,
    className: classNameProp,
    subtitle,
    title,
    titlePosition,
    ...other
  } = props;

  const actionPos = actionIcon && actionPosition;
  const className = classNames(
    classes.root,
    {
      [classes.rootBottom]: titlePosition === 'bottom',
      [classes.rootTop]: titlePosition === 'top',
      [classes.rootWithSubtitle]: subtitle,
    },
    classNameProp,
  );

  // Remove the margin between the title / subtitle wrapper, and the Action Icon
  const titleWrapClassName = classNames(classes.titleWrap, {
    [classes.titleWrapActionLeft]: actionPos === 'left',
    [classes.titleWrapActionRight]: actionPos === 'right',
  });

  return (

{title}

        {subtitle ?
{subtitle}
 : null}

      {actionIcon ? (

          {actionIcon}

      ) : null}

  );
}

GridListTileBar.propTypes = {
  /**
   * An IconButton element to be used as secondary action target
   * (primary action target is the tile itself).
   */
  actionIcon: PropTypes.element,
  /**
   * Position of secondary action IconButton.
   */
  actionPosition: PropTypes.oneOf(['left', 'right']),
  /**
   * Useful to extend the style applied to components.
   */
  classes: PropTypes.object.isRequired,
  /**
   * @ignore
   */
  className: PropTypes.string,
  /**
   * String or element serving as subtitle (support text).
   */
  subtitle: PropTypes.node,
  /**
   * Title to be displayed on tile.
   */
  title: PropTypes.node.isRequired,
  /**
   * Position of the title bar.
   */
  titlePosition: PropTypes.oneOf(['top', 'bottom']),
};

GridListTileBar.defaultProps = {
  titlePosition: 'bottom',
  actionPosition: 'right',
};

export default withStyles(styles, { name: 'MuiGridListTileBar' })(GridListTileBar);


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

<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
  <primitive>true</primitive>  <annotatorImplementationName>net.hitsujiwool.uima.TypeConverter</annotatorImplementationName>
  <analysisEngineMetaData>
    <name>StringConverter</name>
    <description/>
    <version>1.0</version>
    <vendor/>
    <configurationParameters searchStrategy="language_fallback">
      <configurationParameter>
        <name>sourceType</name>
        <type>String</type>
        <multiValued>false</multiValued>
        <mandatory>true</mandatory>
      </configurationParameter>
      <configurationParameter>
        <name>targetType</name>
        <type>String</type>
        <multiValued>false</multiValued>
        <mandatory>true</mandatory>
      </configurationParameter>
      <configurationGroup names="conversionMap">
        <configurationParameter>
          <name>sstring</name>
          <type>String</type>
          <multiValued>false</multiValued>
          <mandatory>false</mandatory>
        </configurationParameter>
      </configurationGroup>
    </configurationParameters>
    <configurationParameterSettings>
      <nameValuePair>
        <name>targetType</name>
        <value>
          <string>net.hitsujiwool.uima.Target</string>
        </value>
      </nameValuePair>
      <nameValuePair>
        <name>sourceType</name>
        <value>
          <string>net.hitsujiwool.uima.Source</string>
        </value>
      </nameValuePair>
      <settingsForGroup name="conversionMap">
        <nameValuePair>
          <name>sstring</name>
          <value>
            <string>tstring</string>
          </value>
        </nameValuePair>
      </settingsForGroup>
    </configurationParameterSettings>
    <typeSystemDescription>
      <imports>
        <import location="types/SourceTypeSystem.xml"/>
        <import location="types/TargetTypeSystem.xml"/>
      </imports>
    </typeSystemDescription>
    <typePriorities/>
    <fsIndexCollection/>
    <capabilities>
      <capability>
        <inputs/>
        <outputs/>
        <languagesSupported/>
      </capability>
    </capabilities>
  <operationalProperties>
      <modifiesCas>true</modifiesCas>
      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
      <outputsNewCASes>false</outputsNewCASes>
    </operationalProperties>
  </analysisEngineMetaData>
  <resourceManagerConfiguration/>
</analysisEngineDescription>


text:
// @COPYRIGHT@
// Licensed under MIT license (LICENSE.txt)

// clxx/cl/kernel_fwd.hpp

/** // doc: clxx/cl/kernel_fwd.hpp {{{
 * \file clxx/cl/kernel_fwd.hpp
 * \brief Forward declaration of the \ref clxx::kernel "kernel" class
 */ // }}}
#ifndef CLXX_CL_KERNEL_FWD_HPP_INCLUDED
#define CLXX_CL_KERNEL_FWD_HPP_INCLUDED

#include <clxx/common/opencl.h>

namespace clxx {
class alignas(cl_kernel) kernel;
} // end namespace clxx

#endif /* CLXX_CL_KERNEL_FWD_HPP_INCLUDED */
// vim: set expandtab tabstop=2 shiftwidth=2:
// vim: set foldmethod=marker foldcolumn=4:


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

-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/acct_act_scrollview"
	android:layout_height="fill_parent"
	android:layout_width="fill_parent"
	android:fillViewport="true">

	<LinearLayout
	    android:layout_width="fill_parent"
	    android:layout_height="wrap_content"
	    android:orientation="vertical"
	    android:padding="10dp" android:layout_gravity="fill_vertical">

	    <EditText android:id="@+id/edtName"
	        android:selectAllOnFocus="true"
	        android:layout_width="fill_parent"
	        android:layout_height="wrap_content"
 	        android:hint="@string/account_setup_example_email_address"
	        android:autoLink="none"
	        android:autoText="false"
	        android:capitalize="none"
	        android:cursorVisible="true"
	        android:inputType="textEmailAddress"/>

	    <Spinner android:id="@+id/spinnerDomains"
		    android:layout_width="fill_parent"
		    android:layout_height="wrap_content"
		    android:drawSelectorOnTop="true"
		    android:visibility="gone"
		    android:entries="@array/account_domains"
		    android:prompt="@string/select_domain_new_account"
		/>

	    <EditText android:id="@+id/edtPass"
	        android:layout_width="fill_parent"
	        android:layout_height="wrap_content"
	        android:hint="@string/account_setup_password"
	        android:autoText="false"
	        android:selectAllOnFocus="true" android:inputType="textPassword"/>

	      <EditText android:id="@+id/edtPassConfirm"
	        android:layout_width="fill_parent"
	        android:layout_height="wrap_content"
	        android:hint="@string/account_setup_password_confirm"
	        android:autoText="false"
	        android:visibility="gone"
	        android:selectAllOnFocus="true" android:inputType="textPassword"/>

	    <LinearLayout 	    android:orientation="vertical"
	       android:layout_width="fill_parent" android:id="@+id/linearLayout2" android:layout_height="20dip"></LinearLayout>

	    <CheckBox android:id="@+id/rememberPassword"
	android:layout_height="wrap_content"
	android:layout_width="fill_parent"
	android:text="@string/remember_password"
	android:checked="true"
	android:paddingTop="3sp"
	android:paddingBottom="3sp"
	android:textAppearance="?android:attr/textAppearanceSmall"

	 />

	  <CheckBox android:id="@+id/useTor"
	        android:layout_width="fill_parent"
	        android:layout_height="wrap_content"
	        android:text="@string/use_tor"

	android:paddingTop="3sp"
	android:paddingBottom="3sp"

	   android:textAppearance="?android:attr/textAppearanceSmall"

	         />

	  <LinearLayout 	    android:orientation="vertical"
	       android:layout_width="fill_parent" android:id="@+id/linearLayout2" android:layout_height="20dip"></LinearLayout>

	  <Button android:id="@+id/btnAdvanced"
	                android:layout_height="wrap_content"
	                android:layout_marginTop="3dip"
	                android:text="@string/account_setup_advanced_button" android:layout_width="fill_parent"/>

	                <!--
	    <TextView android:id="@+id/signUp"
	        android:layout_width="wrap_content"
	        android:layout_height="wrap_content"
	        android:paddingLeft="4dip"
	        android:focusable="true"
	        android:focusableInTouchMode="true"
	        android:textAppearance="?android:attr/textAppearanceSmall" />
	         -->
	<LinearLayout android:id="@+id/linearLayout1"
		android:layout_width="fill_parent"
		android:layout_height="fill_parent"
		android:orientation="vertical"
		>
		<Button android:id="@+id/btnSignIn"
			android:text="@string/sign_in"
			android:background="@drawable/btn_green"
			android:layout_height="wrap_content"
			android:layout_marginTop="3dip"
			android:layout_width="fill_parent"
			android:layout_gravity="bottom"
			style="@style/btn_white"
			/>

		<Button android:id="@+id/btnDelete"
			android:text="@string/menu_remove_account"
			android:background="@drawable/btn_red"
			android:layout_height="wrap_content"
			android:layout_marginTop="3dip"
			android:layout_width="fill_parent"
			android:layout_gravity="bottom"
			style="@style/btn_white"
			android:visibility="gone"
			/>
	</LinearLayout>
	</LinearLayout>
</ScrollView>


text:
<?php

namespace OpenTok\Exception;

/**
* The interface used by all exceptions resulting from calls to the signal API.
*/
interface ForceDisconnectException
{
}


text:
package blade.configurationaction.action;

import aQute.bnd.annotation.metatype.Configurable;

import blade.configurationaction.config.MessageDisplayConfiguration;

import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.portlet.ConfigurationAction;
import com.liferay.portal.kernel.portlet.DefaultConfigurationAction;
import com.liferay.portal.kernel.util.ParamUtil;

import java.util.Map;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.ConfigurationPolicy;
import org.osgi.service.component.annotations.Modified;

@Component(
	configurationPid = "blade.configurationaction.config.MessageDisplayConfiguration",
	configurationPolicy = ConfigurationPolicy.OPTIONAL, immediate = true,
	property = {
		"javax.portlet.name=blade_configurationaction_portlet_BladeMessagePortlet"
	},
	service = ConfigurationAction.class
)
public class MessageDisplayConfigurationAction
	extends DefaultConfigurationAction {

	@Override
	public void processAction(
			PortletConfig portletConfig, ActionRequest actionRequest,
			ActionResponse actionResponse)
		throws Exception {

		_log.debug("Blade Message Portlet configuration action");

		String fontColor = ParamUtil.getString(actionRequest, "fontColor");
		String fontFamily = ParamUtil.getString(actionRequest, "fontFamily");
		String fontSize = ParamUtil.getString(actionRequest, "fontSize");

		_log.debug("Message Display Configuration: Font Family:" + fontFamily);
		_log.debug("Message Display Configuration: Font Size:" + fontSize);
		_log.debug("Message Display Configuration: Font Color:" + fontColor);

		setPreference(actionRequest, "fontColor", fontColor);
		setPreference(actionRequest, "fontFamily", fontFamily);
		setPreference(actionRequest, "fontSize", fontSize);

		super.processAction(portletConfig, actionRequest, actionResponse);
	}

	@Override
	public void include(
		PortletConfig portletConfig, HttpServletRequest httpServletRequest,
		HttpServletResponse httpServletResponse) throws Exception {

		_log.debug("Blade Message Portlet configuration include");

		httpServletRequest.setAttribute(
			MessageDisplayConfiguration.class.getName(),
			_messageDisplayConfiguration);

		super.include(portletConfig, httpServletRequest, httpServletResponse);
	}

	@Activate
	@Modified
	protected void activate(Map<Object, Object> properties) {
		_messageDisplayConfiguration = Configurable.createConfigurable(
			MessageDisplayConfiguration.class, properties);
	}

	private static final Log _log = LogFactoryUtil.getLog(
		MessageDisplayConfigurationAction.class);

	private volatile MessageDisplayConfiguration _messageDisplayConfiguration;

}


text:
import textwrap
from io import StringIO
from itertools import chain
from typing import List, TextIO, Union

import isort.literal
from isort.settings import DEFAULT_CONFIG, Config

from . import output, parse
from .exceptions import FileSkipComment
from .format import format_natural, remove_whitespace
from .settings import FILE_SKIP_COMMENTS

CIMPORT_IDENTIFIERS = ("cimport ", "cimport*", "from.cimport")
IMPORT_START_IDENTIFIERS = ("from ", "from.import", "import ", "import*") + CIMPORT_IDENTIFIERS
COMMENT_INDICATORS = ('"""', "'''", "'", '"', "#")
CODE_SORT_COMMENTS = (
    "# isort: list",
    "# isort: dict",
    "# isort: set",
    "# isort: unique-list",
    "# isort: tuple",
    "# isort: unique-tuple",
    "# isort: assignments",
)

def process(
    input_stream: TextIO,
    output_stream: TextIO,
    extension: str = "py",
    config: Config = DEFAULT_CONFIG,
) -> bool:
    """Parses stream identifying sections of contiguous imports and sorting them

    Code with unsorted imports is read from the provided `input_stream`, sorted and then
    outputted to the specified `output_stream`.

    - `input_stream`: Text stream with unsorted import sections.
    - `output_stream`: Text stream to output sorted inputs into.
    - `config`: Config settings to use when sorting imports. Defaults settings.
        - *Default*: `isort.settings.DEFAULT_CONFIG`.
    - `extension`: The file extension or file extension rules that should be used.
        - *Default*: `"py"`.
        - *Choices*: `["py", "pyi", "pyx"]`.

    Returns `True` if there were changes that needed to be made (errors present) from what
    was provided in the input_stream, otherwise `False`.
    """
    line_separator: str = config.line_ending
    add_imports: List[str] = [format_natural(addition) for addition in config.add_imports]
    import_section: str = ""
    next_import_section: str = ""
    next_cimports: bool = False
    in_quote: str = ""
    first_comment_index_start: int = -1
    first_comment_index_end: int = -1
    contains_imports: bool = False
    in_top_comment: bool = False
    first_import_section: bool = True
    indent: str = ""
    isort_off: bool = False
    code_sorting: Union[bool, str] = False
    code_sorting_section: str = ""
    code_sorting_indent: str = ""
    cimports: bool = False
    made_changes: bool = False
    stripped_line: str = ""
    end_of_file: bool = False
    verbose_output: List[str] = []

    if config.float_to_top:
        new_input = ""
        current = ""
        isort_off = False
        for line in chain(input_stream, (None,)):
            if isort_off and line is not None:
                if line == "# isort: on\n":
                    isort_off = False
                new_input += line
            elif line in ("# isort: split\n", "# isort: off\n", None) or str(line).endswith(
                "# isort: split\n"
            ):
                if line == "# isort: off\n":
                    isort_off = True
                if current:
                    if add_imports:
                        add_line_separator = line_separator or "\n"
                        current += add_line_separator + add_line_separator.join(add_imports)
                        add_imports = []
                    parsed = parse.file_contents(current, config=config)
                    verbose_output += parsed.verbose_output
                    extra_space = ""
                    while current and current[-1] == "\n":
                        extra_space += "\n"
                        current = current[:-1]
                    extra_space = extra_space.replace("\n", "", 1)
                    sorted_output = output.sorted_imports(
                        parsed, config, extension, import_type="import"
                    )
                    made_changes = made_changes or _has_changed(
                        before=current,
                        after=sorted_output,
                        line_separator=parsed.line_separator,
                        ignore_whitespace=config.ignore_whitespace,
                    )
                    new_input += sorted_output
                    new_input += extra_space
                    current = ""
                new_input += line or ""
            else:
                current += line or ""

        input_stream = StringIO(new_input)

    for index, line in enumerate(chain(input_stream, (None,))):
        if line is None:
            if index == 0 and not config.force_adds:
                return False

            not_imports = True
            end_of_file = True
            line = ""
            if not line_separator:
                line_separator = "\n"

            if code_sorting and code_sorting_section:
                output_stream.write(
                    textwrap.indent(
                        isort.literal.assignment(
                            code_sorting_section,
                            str(code_sorting),
                            extension,
                            config=_indented_config(config, indent),
                        ),
                        code_sorting_indent,
                    )
                )
        else:
            stripped_line = line.strip()
            if stripped_line and not line_separator:
                line_separator = line[len(line.rstrip()) :].replace(" ", "").replace("\t", "")

            for file_skip_comment in FILE_SKIP_COMMENTS:
                if file_skip_comment in line:
                    raise FileSkipComment("Passed in content")

            if not in_quote and stripped_line == "# isort: off":
                isort_off = True

            if (
                (index == 0 or (index in (1, 2) and not contains_imports))
                and stripped_line.startswith("#")
                and stripped_line not in config.section_comments
            ):
                in_top_comment = True
            elif in_top_comment:
                if not line.startswith("#") or stripped_line in config.section_comments:
                    in_top_comment = False
                    first_comment_index_end = index - 1

            was_in_quote = bool(in_quote)
            if (not stripped_line.startswith("#") or in_quote) and '"' in line or "'" in line:
                char_index = 0
                if first_comment_index_start == -1 and (
                    line.startswith('"') or line.startswith("'")
                ):
                    first_comment_index_start = index
                while char_index < len(line):
                    if line[char_index] == "\\":
                        char_index += 1
                    elif in_quote:
                        if line[char_index : char_index + len(in_quote)] == in_quote:
                            in_quote = ""
                            if first_comment_index_end < first_comment_index_start:
                                first_comment_index_end = index
                    elif line[char_index] in ("'", '"'):
                        long_quote = line[char_index : char_index + 3]
                        if long_quote in ('"""', "'''"):
                            in_quote = long_quote
                            char_index += 2
                        else:
                            in_quote = line[char_index]
                    elif line[char_index] == "#":
                        break
                    char_index += 1

            not_imports = bool(in_quote) or was_in_quote or in_top_comment or isort_off
            if not (in_quote or was_in_quote or in_top_comment):
                if isort_off:
                    if stripped_line == "# isort: on":
                        isort_off = False
                elif stripped_line.endswith("# isort: split"):
                    not_imports = True
                elif stripped_line in CODE_SORT_COMMENTS:
                    code_sorting = stripped_line.split("isort: ")[1].strip()
                    code_sorting_indent = line[: -len(line.lstrip())]
                    not_imports = True
                elif code_sorting:
                    if not stripped_line:
                        output_stream.write(
                            textwrap.indent(
                                isort.literal.assignment(
                                    code_sorting_section,
                                    str(code_sorting),
                                    extension,
                                    config=_indented_config(config, indent),
                                ),
                                code_sorting_indent,
                            )
                        )
                        not_imports = True
                        code_sorting = False
                        code_sorting_section = ""
                        code_sorting_indent = ""
                    else:
                        code_sorting_section += line
                        line = ""
                elif stripped_line in config.section_comments:
                    if import_section and not contains_imports:
                        output_stream.write(import_section)
                        import_section = line
                        not_imports = False
                    else:
                        import_section += line
                    indent = line[: -len(line.lstrip())]
                elif not (stripped_line or contains_imports):
                    not_imports = True
                elif (
                    not stripped_line
                    or stripped_line.startswith("#")
                    and (not indent or indent + line.lstrip() == line)
                    and not config.treat_all_comments_as_code
                    and stripped_line not in config.treat_comments_as_code
                ):
                    import_section += line
                elif stripped_line.startswith(IMPORT_START_IDENTIFIERS):
                    contains_imports = True

                    new_indent = line[: -len(line.lstrip())]
                    import_statement = line
                    stripped_line = line.strip().split("#")[0]
                    while stripped_line.endswith("\\") or (
                        "(" in stripped_line and ")" not in stripped_line
                    ):
                        if stripped_line.endswith("\\"):
                            while stripped_line and stripped_line.endswith("\\"):
                                line = input_stream.readline()
                                stripped_line = line.strip().split("#")[0]
                                import_statement += line
                        else:
                            while ")" not in stripped_line:
                                line = input_stream.readline()
                                stripped_line = line.strip().split("#")[0]
                                import_statement += line

                    cimport_statement: bool = False
                    if (
                        import_statement.lstrip().startswith(CIMPORT_IDENTIFIERS)
                        or " cimport " in import_statement
                        or " cimport*" in import_statement
                        or " cimport(" in import_statement
                        or ".cimport" in import_statement
                    ):
                        cimport_statement = True

                    if cimport_statement != cimports or (new_indent != indent and import_section):
                        if import_section:
                            next_cimports = cimport_statement
                            next_import_section = import_statement
                            import_statement = ""
                            not_imports = True
                            line = ""
                        else:
                            cimports = cimport_statement

                    indent = new_indent
                    import_section += import_statement
                else:
                    not_imports = True

        if not_imports:
            raw_import_section: str = import_section
            if (
                add_imports
                and (stripped_line or end_of_file)
                and not config.append_only
                and not in_top_comment
                and not in_quote
                and not import_section
                and not line.lstrip().startswith(COMMENT_INDICATORS)
            ):
                import_section = line_separator.join(add_imports) + line_separator
                if end_of_file and index != 0:
                    output_stream.write(line_separator)
                contains_imports = True
                add_imports = []

            if next_import_section and not import_section:  # pragma: no cover
                raw_import_section = import_section = next_import_section
                next_import_section = ""

            if import_section:
                if add_imports and not indent:
                    import_section = (
                        line_separator.join(add_imports) + line_separator + import_section
                    )
                    contains_imports = True
                    add_imports = []

                if not indent:
                    import_section += line
                    raw_import_section += line
                if not contains_imports:
                    output_stream.write(import_section)

                else:
                    leading_whitespace = import_section[: -len(import_section.lstrip())]
                    trailing_whitespace = import_section[len(import_section.rstrip()) :]
                    if first_import_section and not import_section.lstrip(
                        line_separator
                    ).startswith(COMMENT_INDICATORS):
                        import_section = import_section.lstrip(line_separator)
                        raw_import_section = raw_import_section.lstrip(line_separator)
                        first_import_section = False

                    if indent:
                        import_section = "".join(
                            line[len(indent) :] for line in import_section.splitlines(keepends=True)
                        )

                    parsed_content = parse.file_contents(import_section, config=config)
                    verbose_output += parsed_content.verbose_output

                    sorted_import_section = output.sorted_imports(
                        parsed_content,
                        _indented_config(config, indent),
                        extension,
                        import_type="cimport" if cimports else "import",
                    )
                    if not (import_section.strip() and not sorted_import_section):
                        if indent:
                            sorted_import_section = (
                                leading_whitespace
                                + textwrap.indent(sorted_import_section, indent).strip()
                                + trailing_whitespace
                            )

                        made_changes = made_changes or _has_changed(
                            before=raw_import_section,
                            after=sorted_import_section,
                            line_separator=line_separator,
                            ignore_whitespace=config.ignore_whitespace,
                        )
                        output_stream.write(sorted_import_section)
                        if not line and not indent and next_import_section:
                            output_stream.write(line_separator)

                if indent:
                    output_stream.write(line)
                    if not next_import_section:
                        indent = ""

                if next_import_section:
                    cimports = next_cimports
                    contains_imports = True
                else:
                    contains_imports = False
                import_section = next_import_section
                next_import_section = ""
            else:
                output_stream.write(line)
                not_imports = False

            if stripped_line and not in_quote and not import_section and not next_import_section:
                if stripped_line == "yield":
                    while not stripped_line or stripped_line == "yield":
                        new_line = input_stream.readline()
                        if not new_line:
                            break

                        output_stream.write(new_line)
                        stripped_line = new_line.strip().split("#")[0]

                if stripped_line.startswith("raise") or stripped_line.startswith("yield"):
                    while stripped_line.endswith("\\"):
                        new_line = input_stream.readline()
                        if not new_line:
                            break

                        output_stream.write(new_line)
                        stripped_line = new_line.strip().split("#")[0]

    if made_changes and config.only_modified:
        for output_str in verbose_output:
            print(output_str)

    return made_changes

def _indented_config(config: Config, indent: str):
    if not indent:
        return config

    return Config(
        config=config,
        line_length=max(config.line_length - len(indent), 0),
        wrap_length=max(config.wrap_length - len(indent), 0),
        lines_after_imports=1,
    )

def _has_changed(before: str, after: str, line_separator: str, ignore_whitespace: bool) -> bool:
    if ignore_whitespace:
        return (
            remove_whitespace(before, line_separator=line_separator).strip()
            != remove_whitespace(after, line_separator=line_separator).strip()
        )
    else:
        return before.strip() != after.strip()


text:
namespace engine {
namespace math {

	// Provide random number by the range
	int randomRange(int min, int max);

}
}

#endif


text:
require 'puppet/version'

# see the bottom of the file for further inclusions
# Also see the new Vendor support - towards the end
#
require 'facter'
require 'puppet/error'
require 'puppet/util'
require 'puppet/util/autoload'
require 'puppet/settings'
require 'puppet/util/feature'
require 'puppet/util/suidmanager'
require 'puppet/util/run_mode'
require 'puppet/external/pson/common'
require 'puppet/external/pson/version'
require 'puppet/external/pson/pure'

#------------------------------------------------------------
# the top-level module
#
# all this really does is dictate how the whole system behaves, through
# preferences for things like debugging
#
# it's also a place to find top-level commands like 'debug'

# The main Puppet class. Everything is contained here.
#
# @api public
module Puppet
  require 'puppet/file_system'
  require 'puppet/context'
  require 'puppet/environments'

  class << self
    include Puppet::Util
    attr_reader :features
    attr_writer :name
  end

  # the hash that determines how our system behaves
  @@settings = Puppet::Settings.new

  # Note: It's important that these accessors (`self.settings`, `self.[]`) are
  # defined before we try to load any "features" (which happens a few lines below),
  # because the implementation of the features loading may examine the values of
  # settings.
  def self.settings
    @@settings
  end

  # Get the value for a setting
  #
  # @param [Symbol] param the setting to retrieve
  #
  # @api public
  def self.[](param)
    if param == :debug
      return Puppet::Util::Log.level == :debug
    else
      return @@settings[param]
    end
  end

  # The services running in this process.
  @services ||= []

  require 'puppet/util/logging'

  extend Puppet::Util::Logging

  # The feature collection
  @features = Puppet::Util::Feature.new('puppet/feature')

  # Load the base features.
  require 'puppet/feature/base'

  # Store a new default value.
  def self.define_settings(section, hash)
    @@settings.define_settings(section, hash)
  end

  # setting access and stuff
  def self.[]=(param,value)
    @@settings[param] = value
  end

  def self.clear
    @@settings.clear
  end

  def self.debug=(value)
    if value
      Puppet::Util::Log.level=(:debug)
    else
      Puppet::Util::Log.level=(:notice)
    end
  end

  def self.run_mode
    # This sucks (the existence of this method); there are a lot of places in our code that branch based the value of
    # "run mode", but there used to be some really confusing code paths that made it almost impossible to determine
    # when during the lifecycle of a puppet application run the value would be set properly.  A lot of the lifecycle
    # stuff has been cleaned up now, but it still seems frightening that we rely so heavily on this value.
    #
    # I'd like to see about getting rid of the concept of "run_mode" entirely, but there are just too many places in
    # the code that call this method at the moment... so I've settled for isolating it inside of the Settings class
    # (rather than using a global variable, as we did previously...).  Would be good to revisit this at some point.
    #
    # --cprice 2012-03-16
    Puppet::Util::RunMode[@@settings.preferred_run_mode]
  end

  # Load all of the settings.
  require 'puppet/defaults'

  def self.genmanifest
    if Puppet[:genmanifest]
      puts Puppet.settings.to_manifest
      exit(0)
    end
  end

  # Parse the config file for this process.
  # @deprecated Use {initialize_settings}
  def self.parse_config()
    Puppet.deprecation_warning("Puppet.parse_config is deprecated; please use Faces API (which will handle settings and state management for you), or (less desirable) call Puppet.initialize_settings")
    Puppet.initialize_settings
  end

  # Initialize puppet's settings. This is intended only for use by external tools that are not
  #  built off of the Faces API or the Puppet::Util::Application class. It may also be used
  #  to initialize state so that a Face may be used programatically, rather than as a stand-alone
  #  command-line tool.
  #
  # @api public
  # @param args [Array<String>] the command line arguments to use for initialization
  # @return [void]
  def self.initialize_settings(args = [])
    do_initialize_settings_for_run_mode(:user, args)
  end

  # Initialize puppet's settings for a specified run_mode.
  #
  # @deprecated Use {initialize_settings}
  def self.initialize_settings_for_run_mode(run_mode)
    Puppet.deprecation_warning("initialize_settings_for_run_mode may be removed in a future release, as may run_mode itself")
    do_initialize_settings_for_run_mode(run_mode, [])
  end

  # private helper method to provide the implementation details of initializing for a run mode,
  #  but allowing us to control where the deprecation warning is issued
  def self.do_initialize_settings_for_run_mode(run_mode, args)
    Puppet.settings.initialize_global_settings(args)
    run_mode = Puppet::Util::RunMode[run_mode]
    Puppet.settings.initialize_app_defaults(Puppet::Settings.app_defaults_for_run_mode(run_mode))
    Puppet.push_context(Puppet.base_context(Puppet.settings), "Initial context after settings initialization")
    Puppet::Parser::Functions.reset
    Puppet::Util::Log.level = Puppet[:log_level]
  end
  private_class_method :do_initialize_settings_for_run_mode

  # Create a new type.  Just proxy to the Type class.  The mirroring query
  # code was deprecated in 2008, but this is still in heavy use.  I suppose
  # this can count as a soft deprecation for the next dev. --daniel 2011-04-12
  def self.newtype(name, options = {}, &block)
    Puppet::Type.newtype(name, options, &block)
  end

  # Load vendored (setup paths, and load what is needed upfront).
  # See the Vendor class for how to add additional vendored gems/code
  require "puppet/vendor"
  Puppet::Vendor.load_vendored

  # Set default for YAML.load to unsafe so we don't affect programs
  # requiring puppet -- in puppet we will call safe explicitly
  SafeYAML::OPTIONS[:default_mode] = :unsafe

  # The bindings used for initialization of puppet
  # @api private
  def self.base_context(settings)
    environments = settings[:environmentpath]
    modulepath = Puppet::Node::Environment.split_path(settings[:basemodulepath])

    if environments.empty?
      loaders = [Puppet::Environments::Legacy.new]
    else
      loaders = Puppet::Environments::Directories.from_path(environments, modulepath)
      # in case the configured environment (used for the default sometimes)
      # doesn't exist
      default_environment = Puppet[:environment].to_sym
      if default_environment == :production
        loaders << Puppet::Environments::StaticPrivate.new(
          Puppet::Node::Environment.create(Puppet[:environment].to_sym,
                                           [],
                                           Puppet::Node::Environment::NO_MANIFEST))
      end
    end

    {
      :environments => Puppet::Environments::Cached.new(*loaders),
      :http_pool => proc {
        require 'puppet/network/http'
        Puppet::Network::HTTP::NoCachePool.new
      }
    }
  end

  # A simple set of bindings that is just enough to limp along to
  # initialization where the {base_context} bindings are put in place
  # @api private
  def self.bootstrap_context
    root_environment = Puppet::Node::Environment.create(:'*root*', [], Puppet::Node::Environment::NO_MANIFEST)
    {
      :current_environment => root_environment,
      :root_environment => root_environment
    }
  end

  # @param overrides [Hash] A hash of bindings to be merged with the parent context.
  # @param description [String] A description of the context.
  # @api private
  def self.push_context(overrides, description = "")
    @context.push(overrides, description)
  end

  # Return to the previous context.
  # @raise [StackUnderflow] if the current context is the root
  # @api private
  def self.pop_context
    @context.pop
  end

  # Lookup a binding by name or return a default value provided by a passed block (if given).
  # @api private
  def self.lookup(name, &block)
    @context.lookup(name, &block)
  end

  # @param bindings [Hash] A hash of bindings to be merged with the parent context.
  # @param description [String] A description of the context.
  # @yield [] A block executed in the context of the temporarily pushed bindings.
  # @api private
  def self.override(bindings, description = "", &block)
    @context.override(bindings, description, &block)
  end

  # @api private
  def self.mark_context(name)
    @context.mark(name)
  end

  # @api private
  def self.rollback_context(name)
    @context.rollback(name)
  end

  require 'puppet/node'

  # The single instance used for normal operation
  @context = Puppet::Context.new(bootstrap_context)
end

# This feels weird to me; I would really like for us to get to a state where there is never a "require" statement
#  anywhere besides the very top of a file.  That would not be possible at the moment without a great deal of
#  effort, but I think we should strive for it and revisit this at some point.  --cprice 2012-03-16

require 'puppet/indirector'
require 'puppet/type'
require 'puppet/resource'
require 'puppet/parser'
require 'puppet/network'
require 'puppet/ssl'
require 'puppet/module'
require 'puppet/data_binding'
require 'puppet/util/storage'
require 'puppet/status'
require 'puppet/file_bucket/file'