text:
Ext.namespace("GeoExt.plugins");

/** api: (define)
 *  module = GeoExt.plugins
 *  class = TreeNodeComponent
 */

/** api: constructor
 *  A plugin to create tree node UIs that can have an Ext.Component below the
 *  node's title. Can be plugged into any ``Ext.tree.TreePanel`` and will be
 *  applied to nodes that are extended with the
 *  :class:`GeoExt.Tree.TreeNodeUIEventMixin`.
 *
 *  If a node is configured with a ``component`` attribute, it will be rendered
 *  with the component in addition to icon and title.
 */

/** api: example
 *  Sample code to create a tree with a node that has a component:
 *
 *  .. code-block:: javascript
 *
 *      var uiClass = Ext.extend(
 *          Ext.tree.TreeNodeUI,
 *          GeoExt.tree.TreeNodeUIEventMixin
 *      );
 *      var tree = new Ext.tree.TreePanel({
 *          plugins: [
 *              new GeoExt.plugins.TreeNodeRadioButton({
 *                  listeners: {
 *                      "radiochange": function(node) {
 *                          alert(node.text + "'s radio button was clicked.");
 *                      }
 *                  }
 *              })
 *          ],
 *          root: {
 *              nodeType: "node",
 *              uiProvider: uiClass,
 *              text: "My Node",
 *              component: {
 *                  xtype: "box",
 *                  autoEl: {
 *                      tag: "img",
 *                      src: "/images/my-image.jpg"
 *                  }
 *              }
 *          }
 *      }
 *
 *  Sample code to create a layer node UI with a radio button:
 *
 *  .. code-block:: javascript
 *
 *      var uiClass = Ext.extend(
 *          GeoExt.tree.LayerNodeUI,
 *          new GeoExt.tree.TreeNodeUIEventMixin
 *      );
 */

GeoExt.plugins.TreeNodeComponent = Ext.extend(Ext.util.Observable, {

    /** private: method[constructor]
     *  :param config: ``Object``
     */
    constructor: function(config) {
        Ext.apply(this.initialConfig, Ext.apply({}, config));
        Ext.apply(this, config);

        GeoExt.plugins.TreeNodeComponent.superclass.constructor.apply(this, arguments);
    },

    /** private: method[init]
     *  :param tree: ``Ext.tree.TreePanel`` The tree.
     */
    init: function(tree) {
        tree.on({
            "rendernode": this.onRenderNode,
            "beforedestroy": this.onBeforeDestroy,
            scope: this
        });
    },

    /** private: method[onRenderNode]
     *  :param node: ``Ext.tree.TreeNode``
     */
    onRenderNode: function(node) {
        var rendered = node.rendered;
        var attr = node.attributes;
        var component = attr.component || this.component;
        if(!rendered && component) {
            var elt = Ext.DomHelper.append(node.ui.elNode, [
                {"tag": "div"}
            ]);
            if(typeof component == "function") {
                component = component(node, elt);
            } else if (typeof component == "object" &&
                       typeof component.fn == "function") {
                component = component.fn.apply(
                    component.scope, [node, elt]
                );
            }
            if(typeof component == "object" &&
               typeof component.xtype == "string") {
                component = Ext.ComponentMgr.create(component);
            }
            if(component instanceof Ext.Component) {
                component.render(elt);
                node.component = component;
            }
        }
    },

    /** private: method[onBeforeDestroy]
     */
    onBeforeDestroy: function(tree) {
        tree.un("rendernode", this.onRenderNode, this);
        tree.un("beforedestroy", this.onBeforeDestroy, this);
    }

});

/** api: ptype = gx_treenodecomponent */
Ext.preg("gx_treenodecomponent", GeoExt.plugins.TreeNodeComponent);


text:
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _

from horizon import exceptions
from horizon import forms
from horizon import tables
from horizon import tabs
from horizon.utils import memoized

from openstack_dashboard import api
from openstack_dashboard.dashboards.project.backups \
    import forms as backup_forms
from openstack_dashboard.dashboards.project.backups \
    import tables as backup_tables
from openstack_dashboard.dashboards.project.backups \
    import tabs as backup_tabs
from openstack_dashboard.dashboards.project.volumes \
    import views as volume_views

class BackupsView(tables.DataTableView, tables.PagedTableMixin,
                  volume_views.VolumeTableMixIn):
    table_class = backup_tables.BackupsTable
    page_title = _("Volume Backups")

    def allowed(self, request):
        return api.cinder.volume_backup_supported(self.request)

    def get_data(self):
        try:
            marker, sort_dir = self._get_marker()
            backups, self._has_more_data, self._has_prev_data = \
                api.cinder.volume_backup_list_paged(
                    self.request, marker=marker, sort_dir=sort_dir,
                    paginate=True)
            volumes = api.cinder.volume_list(self.request)
            volumes = dict((v.id, v) for v in volumes)
            for backup in backups:
                backup.volume = volumes.get(backup.volume_id)
        except Exception:
            backups = []
            exceptions.handle(self.request, _("Unable to retrieve "
                                              "volume backups."))
        return backups

class CreateBackupView(forms.ModalFormView):
    form_class = backup_forms.CreateBackupForm
    template_name = 'project/backups/create_backup.html'
    submit_label = _("Create Volume Backup")
    submit_url = "horizon:project:volumes:create_backup"
    success_url = reverse_lazy("horizon:project:backups:index")
    page_title = _("Create Volume Backup")

    def get_context_data(self, **kwargs):
        context = super(CreateBackupView, self).get_context_data(**kwargs)
        context['volume_id'] = self.kwargs['volume_id']
        args = (self.kwargs['volume_id'],)
        context['submit_url'] = reverse(self.submit_url, args=args)
        return context

    def get_initial(self):
        return {"volume_id": self.kwargs["volume_id"]}

class BackupDetailView(tabs.TabView):
    tab_group_class = backup_tabs.BackupDetailTabs
    template_name = 'horizon/common/_detail.html'
    page_title = "{{ backup.name|default:backup.id }}"

    def get_context_data(self, **kwargs):
        context = super(BackupDetailView, self).get_context_data(**kwargs)
        backup = self.get_data()
        table = backup_tables.BackupsTable(self.request)
        context["backup"] = backup
        context["url"] = self.get_redirect_url()
        context["actions"] = table.render_row_actions(backup)
        return context

    @memoized.memoized_method
    def get_data(self):
        try:
            backup_id = self.kwargs['backup_id']
            backup = api.cinder.volume_backup_get(self.request,
                                                  backup_id)
        except Exception:
            exceptions.handle(self.request,
                              _('Unable to retrieve backup details.'),
                              redirect=self.get_redirect_url())
        return backup

    def get_tabs(self, request, *args, **kwargs):
        backup = self.get_data()
        return self.tab_group_class(request, backup=backup, **kwargs)

    @staticmethod
    def get_redirect_url():
        return reverse('horizon:project:backups:index')

class RestoreBackupView(forms.ModalFormView):
    form_class = backup_forms.RestoreBackupForm
    template_name = 'project/backups/restore_backup.html'
    submit_label = _("Restore Backup to Volume")
    submit_url = "horizon:project:backups:restore"
    success_url = reverse_lazy('horizon:project:volumes:index')
    page_title = _("Restore Volume Backup")

    def get_context_data(self, **kwargs):
        context = super(RestoreBackupView, self).get_context_data(**kwargs)
        context['backup_id'] = self.kwargs['backup_id']
        args = (self.kwargs['backup_id'],)
        context['submit_url'] = reverse(self.submit_url, args=args)
        return context

    def get_initial(self):
        backup_id = self.kwargs['backup_id']
        backup_name = self.request.GET.get('backup_name')
        volume_id = self.request.GET.get('volume_id')
        return {
            'backup_id': backup_id,
            'backup_name': backup_name,
            'volume_id': volume_id,
        }

redpajama_set_name: RedPajamaGithub


text:
'use strict';

const AWS = require('aws-sdk');
const Router = require('express').Router;
const jsonParser = require('body-parser').json();
const createError = require('http-errors');
const debug = require('debug')('equiGalleryVR:galleryRouter');

const Photo = require('../model/photo-model');
const Gallery = require('../model/gallery-model');
const bearerAuth = require('../lib/bearer-auth-middleware');

const s3 = new AWS.S3();
const galleryRouter = module.exports = Router();

galleryRouter.post('/api/gallery', bearerAuth, jsonParser, function(req, res, next) {
  debug('POST /api/gallery');
  req.body.userID = req.user._id;
  req.body.username = req.user.username;
  new Gallery(req.body).save()
  .then(gallery => res.json(gallery))
  .catch(next);
});

galleryRouter.put('/api/gallery/:id', bearerAuth, jsonParser, function(req, res, next) {
  debug('PUT /api/gallery/:id');
  Gallery.findById(req.params.id)
  .catch(err => Promise.reject(createError(404, err.message)))
  .then(gallery => {
    if (gallery.userID.toString() !== req.user._id.toString())
      return Promise.reject(createError(401, 'not this user\'s gallery'));
    let options = {runValidators: true, new: true};
    return Gallery.findByIdAndUpdate(req.params.id, req.body, options);
  })
  .then(gallery => res.json(gallery))
  .catch(next);
});

galleryRouter.get('/api/gallery', function(req, res, next) {
  debug('GET /api/gallery');
  Gallery.find({})
  .populate('photos')
  .then(galleries => res.json(galleries))
  .catch(next);
});

galleryRouter.get('/api/gallery/:id', function(req, res, next) {
  debug('GET /api/gallery');
  Gallery.findById(req.params.id)
  .populate('photos')
  .then(gallery => res.json(gallery))
  .catch(next);
});

galleryRouter.delete('/api/gallery/:id', function(req, res, next) {
  debug('POST /api/gallery');
  let tempGallery = null;
  Gallery.findById(req.params.id)
  .populate('photos')
  .catch(err => Promise.reject(createError(404, err.message)))
  .then(gallery => {
    tempGallery = gallery;
    if (gallery.userID.toString() !== req.user._id)
      return Promise.reject(createError(404, 'not this user\'s gallery!'));
    let deletePhotos = [];
    gallery.photos.forEach(photo => {
      let params = {
        Bucket: process.env.AWS_BUCKET,
        Key: photo.objectKey,
      };
      deletePhotos.push(Photo.findByIdAndRemove(photo._id));
      deletePhotos.push(s3.deleteObject(params).promise());
    });
    return Promise.all(deletePhotos);
  })
  .then(() => tempGallery.remove())
  .then(() => res.sendStatus(204))
  .catch(next);
});


text:
using namespace chrono;
using namespace chrono::vehicle;
using namespace chrono::vehicle::m113;

// =============================================================================
// USER SETTINGS
// =============================================================================

// Initial vehicle position
ChVector<> initLoc(-5, 0, 1.1);

// Initial vehicle orientation
ChQuaternion<> initRot(1, 0, 0, 0);
// ChQuaternion<> initRot(0.866025, 0, 0, 0.5);
// ChQuaternion<> initRot(0.7071068, 0, 0, 0.7071068);
// ChQuaternion<> initRot(0.25882, 0, 0, 0.965926);
// ChQuaternion<> initRot(0, 0, 0, 1);

// Terrain dimensions
double terrainLength = 20.0;  // size in X direction
double terrainWidth = 4.0;    // size in Y direction
double delta = 0.05;          // SCM grid spacing

// Simulation step size
double step_size = 5e-4;

// Use PardisoMKL
bool use_mkl = false;

// Time interval between two render frames
double render_step_size = 1.0 / 120;  // FPS = 50

// Point on chassis tracked by the camera
ChVector<> trackPoint(-2.0, 0.0, 0.0);

// Output directories
const std::string out_dir = GetChronoOutputPath() + "M113_DEF_SOIL";
const std::string img_dir = out_dir + "/IMG";

// Visualization output
bool img_output = false;

// =============================================================================

// Simple powertrain model
std::string simplepowertrain_file("generic/powertrain/SimplePowertrain.json");

// =============================================================================

// Forward declarations
void AddFixedObstacles(ChSystem* system);
void AddMovingObstacles(ChSystem* system);

// =============================================================================
int main(int argc, char* argv[]) {
    GetLog() << "Copyright (c) 2017 projectchrono.org\nChrono version: " << CHRONO_VERSION << "\n\n";

    // --------------------------
    // Construct the M113 vehicle
    // --------------------------

    M113 m113;
    m113.SetContactMethod(ChContactMethod::SMC);
    m113.SetTrackShoeType(TrackShoeType::SINGLE_PIN);
    m113.SetBrakeType(BrakeType::SIMPLE);
    m113.SetDrivelineType(DrivelineTypeTV::BDS);
    m113.SetPowertrainType(PowertrainModelType::SHAFTS);
    m113.SetChassisCollisionType(CollisionType::NONE);

    // Control steering type (enable crossdrive capability)
    ////vehicle.GetDriveline()->SetGyrationMode(true);

    // Initialize the vehicle at the specified position
    m113.SetInitPosition(ChCoordsys<>(initLoc, initRot));
    m113.Initialize();

    // Set visualization type for vehicle components.
    m113.SetChassisVisualizationType(VisualizationType::PRIMITIVES);
    m113.SetSprocketVisualizationType(VisualizationType::PRIMITIVES);
    m113.SetIdlerVisualizationType(VisualizationType::PRIMITIVES);
    m113.SetSuspensionVisualizationType(VisualizationType::PRIMITIVES);
    m113.SetIdlerWheelVisualizationType(VisualizationType::PRIMITIVES);
    m113.SetRoadWheelVisualizationType(VisualizationType::PRIMITIVES);
    m113.SetTrackShoeVisualizationType(VisualizationType::PRIMITIVES);

    // Control internal collisions and contact monitoring.

    // Disable contact for all tracked vehicle parts
    ////m113.GetVehicle().SetCollide(TrackedCollisionFlag::NONE);

    // Monitor internal contacts for the left sprocket, left idler, and first shoe on the left track.
    ////m113.GetVehicle().MonitorContacts(TrackedCollisionFlag::SPROCKET_LEFT | TrackedCollisionFlag::SHOES_LEFT |
    ///TrackedCollisionFlag::IDLER_LEFT);

    // Collect contact information
    ////m113.GetVehicle().SetContactCollection(true);

    ChSystem* system = m113.GetSystem();

    // ----------------------
    // Create the SCM terrain
    // ----------------------

    SCMDeformableTerrain terrain(system);
    terrain.SetSoilParameters(2e7,   // Bekker Kphi
                              0,     // Bekker Kc
                              1.1,   // Bekker n exponent
                              0,     // Mohr cohesive limit (Pa)
                              20,    // Mohr friction limit (degrees)
                              0.01,  // Janosi shear coefficient (m)
                              2e8,   // Elastic stiffness (Pa/m), before plastic yield
                              3e4    // Damping (Pa s/m), proportional to negative vertical speed (optional)
    );

    terrain.SetPlotType(vehicle::SCMDeformableTerrain::PLOT_PRESSURE_YELD, 0, 30000.2);
    ////terrain.SetPlotType(vehicle::SCMDeformableTerrain::PLOT_SINKAGE, 0, 0.15);

    terrain.Initialize(terrainLength, terrainWidth, delta);

    // Add obstacles
    AddFixedObstacles(system);
    ////AddMovingObstacles(system);

    // ---------------------------------
    // Create the run-time visualization
    // ---------------------------------

    auto vis = chrono_types::make_shared<ChTrackedVehicleVisualSystemIrrlicht>();
    vis->SetWindowTitle("M113 SCM Demo");
    vis->SetChaseCamera(trackPoint, 4.0, 1.0);
    vis->SetChaseCameraPosition(ChVector<>(-3, 4, 1.5));
    vis->SetChaseCameraMultipliers(1e-4, 10);
    vis->Initialize();
    vis->AddLightDirectional();
    vis->AddSkyBox();
    vis->AddLogo();
    vis->AttachVehicle(&m113.GetVehicle());

    // ------------------------
    // Create the driver system
    // ------------------------

    ChIrrGuiDriver driver(*vis);

    // Set the time response for keyboard inputs.
    double steering_time = 0.5;  // time to go from 0 to +1 (or from 0 to -1)
    double throttle_time = 1.0;  // time to go from 0 to +1
    double braking_time = 0.3;   // time to go from 0 to +1
    driver.SetSteeringDelta(render_step_size / steering_time);
    driver.SetThrottleDelta(render_step_size / throttle_time);
    driver.SetBrakingDelta(render_step_size / braking_time);

    // Set file with driver input time series
    driver.SetInputDataFile(vehicle::GetDataFile("M113/driver/Acceleration.txt"));
    driver.SetInputMode(ChIrrGuiDriver::InputMode::DATAFILE);

    driver.Initialize();

    // -----------------
    // Initialize output
    // -----------------

    if (!filesystem::create_directory(filesystem::path(out_dir))) {
        std::cout << "Error creating directory " << out_dir << std::endl;
        return 1;
    }

    if (img_output) {
        if (!filesystem::create_directory(filesystem::path(img_dir))) {
            std::cout << "Error creating directory " << img_dir << std::endl;
            return 1;
        }
    }

    // -------------------
    // Simulation settings
    // -------------------

    system->SetNumThreads(std::min(8, ChOMP::GetNumProcs()));

#ifndef CHRONO_PARDISO_MKL
    // Do not use PardisoMKL if not available
    use_mkl = false;
#endif

    // Solver and integrator settings
    if (use_mkl) {
#ifdef CHRONO_PARDISO_MKL
        GetLog() << "Using PardisoMKL solver\n";
        auto mkl_solver = chrono_types::make_shared<ChSolverPardisoMKL>();
        mkl_solver->LockSparsityPattern(true);
        system->SetSolver(mkl_solver);

        system->SetTimestepperType(ChTimestepper::Type::HHT);
        auto integrator = std::static_pointer_cast<ChTimestepperHHT>(system->GetTimestepper());
        integrator->SetAlpha(-0.2);
        integrator->SetMaxiters(50);
        integrator->SetAbsTolerances(5e-05, 1.8e00);
        integrator->SetMode(ChTimestepperHHT::POSITION);
        integrator->SetModifiedNewton(false);
        integrator->SetScaling(true);
        integrator->SetVerbose(true);
#endif
    } else {
        auto solver = chrono_types::make_shared<ChSolverBB>();
        solver->SetMaxIterations(120);
        solver->SetOmega(0.8);
        solver->SetSharpnessLambda(1.0);
        m113.GetSystem()->SetSolver(solver);

        m113.GetSystem()->SetMaxPenetrationRecoverySpeed(1.5);
        m113.GetSystem()->SetMinBounceSpeed(2.0);
    }

    // ---------------
    // Simulation loop
    // ---------------

    // Inter-module communication data
    BodyStates shoe_states_left(m113.GetVehicle().GetNumTrackShoes(LEFT));
    BodyStates shoe_states_right(m113.GetVehicle().GetNumTrackShoes(RIGHT));
    TerrainForces shoe_forces_left(m113.GetVehicle().GetNumTrackShoes(LEFT));
    TerrainForces shoe_forces_right(m113.GetVehicle().GetNumTrackShoes(RIGHT));

    // Number of simulation steps between two 3D view render frames
    int render_steps = (int)std::ceil(render_step_size / step_size);

    // Initialize simulation frame counter
    int step_number = 0;
    int render_frame = 0;

    // Execution time
    double total_timing = 0;

    while (vis->Run()) {
        if (step_number % render_steps == 0) {
            vis->BeginScene();
            vis->Render();
            vis->EndScene();

            if (img_output) {
                char filename[100];
                sprintf(filename, "%s/img_%03d.jpg", img_dir.c_str(), render_frame + 1);
                vis->WriteImageToFile(filename);
                render_frame++;
            }
        }

        // Collect output data from modules
        DriverInputs driver_inputs = driver.GetInputs();
        m113.GetVehicle().GetTrackShoeStates(LEFT, shoe_states_left);
        m113.GetVehicle().GetTrackShoeStates(RIGHT, shoe_states_right);

        // Update modules (process inputs from other modules)
        double time = m113.GetVehicle().GetChTime();
        driver.Synchronize(time);
        terrain.Synchronize(time);
        m113.Synchronize(time, driver_inputs, shoe_forces_left, shoe_forces_right);
        vis->Synchronize("", driver_inputs);

        // Advance simulation for one timestep for all modules
        driver.Advance(step_size);
        terrain.Advance(step_size);
        m113.Advance(step_size);
        vis->Advance(step_size);

        // Increment frame number
        step_number++;

        // Execution time
        double step_timing = system->GetTimerStep();
        total_timing += step_timing;
        ////std::cout << step_number << " " << step_timing << " " << total_timing << std::endl;
    }

    m113.GetVehicle().WriteContacts("M113_contacts.out");

    return 0;
}

// =============================================================================
void AddFixedObstacles(ChSystem* system) {
    double radius = 2;
    double length = 10;

    auto obstacle = std::shared_ptr<ChBody>(system->NewBody());
    obstacle->SetPos(ChVector<>(0, 0, -1.8));
    obstacle->SetBodyFixed(true);
    obstacle->SetCollide(true);

    // Visualization
    auto shape = chrono_types::make_shared<ChCylinderShape>();
    shape->GetCylinderGeometry().p1 = ChVector<>(0, -length * 0.5, 0);
    shape->GetCylinderGeometry().p2 = ChVector<>(0, length * 0.5, 0);
    shape->GetCylinderGeometry().rad = radius;
    shape->SetTexture(vehicle::GetDataFile("terrain/textures/tile4.jpg"));
    obstacle->AddVisualShape(shape);

    // Contact
    ChContactMaterialData minfo;
    minfo.mu = 0.9f;
    minfo.cr = 0.01f;
    minfo.Y = 2e7f;
    auto obst_mat = minfo.CreateMaterial(system->GetContactMethod());

    obstacle->GetCollisionModel()->ClearModel();
    obstacle->GetCollisionModel()->AddCylinder(obst_mat, radius, radius, length * 0.5);
    obstacle->GetCollisionModel()->BuildModel();

    system->AddBody(obstacle);
}

void AddMovingObstacles(ChSystem* system) {
    double radius = 0.2;
    double mass = 100;
    ChVector<> pos(-4, 0, 0.6);
    ChQuaternion<> rot(1, 0, 0, 0);
    ChVector<> init_vel(0, 0, 0);
    ChVector<> init_ang_vel(0, 30, 0);

    // Create a material
    auto material = chrono_types::make_shared<ChMaterialSurfaceSMC>();
    material->SetRestitution(0.1f);
    material->SetFriction(0.4f);

    // Create a ball
    auto ball = std::shared_ptr<ChBody>(system->NewBody());

    ball->SetMass(mass);
    ball->SetPos(pos);
    ball->SetRot(rot);
    ball->SetPos_dt(init_vel);
    ball->SetWvel_loc(init_ang_vel);
    ball->SetBodyFixed(false);
    ball->SetCollide(true);

    ball->GetCollisionModel()->ClearModel();
    ball->GetCollisionModel()->AddSphere(material, radius);
    ball->GetCollisionModel()->BuildModel();

    ball->SetInertiaXX(0.4 * mass * radius * radius * ChVector<>(1, 1, 1));

    auto sphere = chrono_types::make_shared<ChSphereShape>();
    sphere->GetSphereGeometry().rad = radius;
    sphere->SetTexture(GetChronoDataFile("textures/bluewhite.png"));
    ball->AddVisualShape(sphere);

    system->AddBody(ball);
}


text:
/* Magic Mirror
 * Server
 *
 * By Michael Teeuw http://michaelteeuw.nl
 * MIT Licensed.
 */

var express = require("express");
var app = require("express")();
var server = require("http").Server(app);
var io = require("socket.io")(server);
var path = require("path");
var ipfilter = require("express-ipfilter").IpFilter;
var fs = require("fs");
var helmet = require("helmet");

var Server = function(config, callback) {
	console.log("Starting server op port " + config.port + " ... ");

	server.listen(config.port, config.address ? config.address : null);

	app.use(function(req, res, next) {
		var result = ipfilter(config.ipWhitelist, {mode: "allow", log: false})(req, res, function(err) {
			if (err === undefined) {
				return next();
			}
			console.log(err.message);
			res.status(403).send("This device is not allowed to access your mirror. <br> Please check your config.js or config.js.sample to change this.");
		});
	});
	app.use(helmet());

	app.use("/js", express.static(__dirname));
	app.use("/config", express.static(path.resolve(global.root_path + "/config")));
	app.use("/css", express.static(path.resolve(global.root_path + "/css")));
	app.use("/fonts", express.static(path.resolve(global.root_path + "/fonts")));
	app.use("/modules", express.static(path.resolve(global.root_path + "/modules")));
	app.use("/vendor", express.static(path.resolve(global.root_path + "/vendor")));
	app.use("/translations", express.static(path.resolve(global.root_path + "/translations")));

	app.get("/version", function(req,res) {
		res.send(global.version);
	});

	app.get("/", function(req, res) {
		var html = fs.readFileSync(path.resolve(global.root_path + "/index.html"), {encoding: "utf8"});
		html = html.replace("#VERSION#", global.version);

		res.send(html);
	});

	if (typeof callback === "function") {
		callback(app, io);
	}
};

module.exports = Server;


text:
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Manatee.Trello
{
	/// <summary>
	/// Represents a list.
	/// </summary>
	public interface IList : ICanWebhook, IRefreshable
	{
		/// <summary>
		/// Gets the collection of actions performed on the list.
		/// </summary>
		IReadOnlyActionCollection Actions { get; }

		/// <summary>
		/// Gets or sets the board on which the list belongs.
		/// </summary>
		IBoard Board { get; set; }

		/// <summary>
		/// Gets the collection of cards contained in the list.
		/// </summary>
		ICardCollection Cards { get; }

		/// <summary>
		/// Gets the creation date of the list.
		/// </summary>
		DateTime CreationDate { get; }

		/// <summary>
		/// Gets or sets whether the list is archived.
		/// </summary>
		bool? IsArchived { get; set; }

		/// <summary>
		/// Gets or sets whether the current member is subscribed to the list.
		/// </summary>
		bool? IsSubscribed { get; set; }

		/// <summary>
		/// Gets the list's name.
		/// </summary>
		string Name { get; set; }

		/// <summary>
		/// Gets the list's position.
		/// </summary>
		Position Position { get; set; }

		/// <summary>
		/// Retrieves a card which matches the supplied key.
		/// </summary>
		/// <param name="key">The key to match.</param>
		/// <returns>The matching card, or null if none found.</returns>
		/// <remarks>
		/// Matches on Card.Id and Card.Name.  Comparison is case-sensitive.
		/// </remarks>
		ICard this[string key] { get; }

		/// <summary>
		/// Retrieves the card at the specified index.
		/// </summary>
		/// <param name="index">The index.</param>
		/// <returns>The card.</returns>
		/// <exception cref="ArgumentOutOfRangeException">
		/// <paramref name="index"/> is less than 0 or greater than or equal to the number of elements in the collection.
		/// </exception>
		ICard this[int index] { get; }

		/// <summary>
		/// Raised when data on the list is updated.
		/// </summary>
		event Action<IList, IEnumerable<string>> Updated;
	}
}


text:
<?php

namespace Cake\Mailer;

use Cake\Datasource\ModelAwareTrait;
use Cake\Event\EventListenerInterface;
use Cake\Mailer\Exception\MissingActionException;

/**
 * Mailer base class.
 *
 * Mailer classes let you encapsulate related Email logic into a reusable
 * and testable class.
 *
 * ## Defining Messages
 *
 * Mailers make it easy for you to define methods that handle email formatting
 * logic. For example:
 *
 * ```
 * class UserMailer extends Mailer
 * {
 *     public function resetPassword($user)
 *     {
 *         $this
 *             ->subject('Reset Password')
 *             ->to($user->email)
 *             ->set(['token' => $user->token]);
 *     }
 * }
 * ```
 *
 * Is a trivial example but shows how a mailer could be declared.
 *
 * ## Sending Messages
 *
 * After you have defined some messages you will want to send them:
 *
 * ```
 * $mailer = new UserMailer();
 * $mailer->send('resetPassword', $user);
 * ```
 *
 * ## Event Listener
 *
 * Mailers can also subscribe to application event allowing you to
 * decouple email delivery from your application code. By re-declaring the
 * `implementedEvents()` method you can define event handlers that can
 * convert events into email. For example, if your application had a user
 * registration event:
 *
 * ```
 * public function implementedEvents()
 * {
 *     return [
 *         'Model.afterSave' => 'onRegistration',
 *     ];
 * }
 *
 * public function onRegistration(Event $event, Entity $entity, ArrayObject $options)
 * {
 *     if ($entity->isNew()) {
 *          $this->send('welcome', [$entity]);
 *     }
 * }
 * ```
 *
 * The onRegistration method converts the application event into a mailer method.
 * Our mailer could either be registered in the application bootstrap, or
 * in the Table class' initialize() hook.
 *
 * @method Email to($email = null, $name = null)
 * @method Email from($email = null, $name = null)
 * @method Email sender($email = null, $name = null)
 * @method Email replyTo($email = null, $name = null)
 * @method Email readReceipt($email = null, $name = null)
 * @method Email returnPath($email = null, $name = null)
 * @method Email addTo($email, $name = null)
 * @method Email cc($email = null, $name = null)
 * @method Email addCc($email, $name = null)
 * @method Email bcc($email = null, $name = null)
 * @method Email addBcc($email, $name = null)
 * @method Email charset($charset = null)
 * @method Email headerCharset($charset = null)
 * @method Email subject($subject = null)
 * @method Email setHeaders(array $headers)
 * @method Email addHeaders(array $headers)
 * @method Email getHeaders(array $include = [])
 * @method Email template($template = false, $layout = false)
 * @method Email viewRender($viewClass = null)
 * @method Email viewVars($viewVars = null)
 * @method Email theme($theme = null)
 * @method Email helpers($helpers = null)
 * @method Email emailFormat($format = null)
 * @method Email transport($name = null)
 * @method Email messageId($message = null)
 * @method Email domain($domain = null)
 * @method Email attachments($attachments = null)
 * @method Email addAttachments($attachments)
 * @method Email message($type = null)
 * @method Email profile($config = null)
 */
abstract class Mailer implements EventListenerInterface
{

    use ModelAwareTrait;

    /**
     * Mailer's name.
     *
     * @var string
     */
    static public $name;

    /**
     * Email instance.
     *
     * @var \Cake\Mailer\Email
     */
    protected $_email;

    /**
     * Cloned Email instance for restoring instance after email is sent by
     * mailer action.
     *
     * @var string
     */
    protected $_clonedEmail;

    /**
     * Constructor.
     *
     * @param \Cake\Mailer\Email|null $email Email instance.
     */
    public function __construct(Email $email = null)
    {
        if ($email === null) {
            $email = new Email();
        }

        $this->_email = $email;
        $this->_clonedEmail = clone $email;
    }

    /**
     * Returns the mailer's name.
     *
     * @return string
     */
    public function getName()
    {
        if (!static::$name) {
            static::$name = str_replace(
                'Mailer',
                '',
                join('', array_slice(explode('\\', get_class($this)), -1))
            );
        }
        return static::$name;
    }

    /**
     * Sets layout to use.
     *
     * @param string $layout Name of the layout to use.
     * @return $this object.
     */
    public function layout($layout)
    {
        $this->_email->viewBuilder()->layout($layout);
        return $this;
    }

    /**
     * Get Email instance's view builder.
     *
     * @return \Cake\View\ViewBuilder
     */
    public function viewBuilder()
    {
        return $this->_email->viewBuilder();
    }

    /**
     * Magic method to forward method class to Email instance.
     *
     * @param string $method Method name.
     * @param array $args Method arguments
     * @return $this
     */
    public function __call($method, $args)
    {
        call_user_func_array([$this->_email, $method], $args);
        return $this;
    }

    /**
     * Sets email view vars.
     *
     * @param string|array $key Variable name or hash of view variables.
     * @param mixed $value View variable value.
     * @return $this object.
     */
    public function set($key, $value = null)
    {
        $this->_email->viewVars(is_string($key) ? [$key => $value] : $key);
        return $this;
    }

    /**
     * Sends email.
     *
     * @param string $action The name of the mailer action to trigger.
     * @param array $args Arguments to pass to the triggered mailer action.
     * @param array $headers Headers to set.
     * @return array
     * @throws \Cake\Mailer\Exception\MissingActionException
     * @throws \BadMethodCallException
     */
    public function send($action, $args = [], $headers = [])
    {
        if (!method_exists($this, $action)) {
            throw new MissingActionException([
                'mailer' => $this->getName() . 'Mailer',
                'action' => $action,
            ]);
        }

        $this->_email->setHeaders($headers);
        if (!$this->_email->viewBuilder()->template()) {
            $this->_email->viewBuilder()->template($action);
        }

        call_user_func_array([$this, $action], $args);

        $result = $this->_email->send();
        $this->reset();

        return $result;
    }

    /**
     * Reset email instance.
     *
     * @return $this
     */
    protected function reset()
    {
        $this->_email = clone $this->_clonedEmail;
        return $this;
    }

    /**
     * Implemented events.
     *
     * @return array
     */
    public function implementedEvents()
    {
        return [];
    }
}


text:
@interface FourthTableViewController ()

@end

@implementation FourthTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
        self.view.backgroundColor = [UIColor grayColor];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];
    label.text = @"第4个控制器的视图";
    label.textAlignment = NSTextAlignmentCenter;
    label.center = self.view.center;
    [self.view addSubview:label];

    self.tableView.tableFooterView = [UIView new];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 0;
}

@end


text:
package i5.las2peer.services.mobsos.queryVisualization.encoding;

import java.util.ListIterator;

import i5.las2peer.api.Context;
import i5.las2peer.api.logging.MonitoringEvent;

/**
 * VisualizationCSV.java

 * Transforms/Converts a methodResult into a CSV String as used in the US (Separators: "," and "\n")

 * - Values of the same column are separated by a ","

 * - Rows are separated by a "\n"

 * - The first row contains the column names

 * - The second row contains the column data type (as number) as defined in Types (sql)
 *
 */
public class VisualizationCSV extends Visualization {

	public VisualizationCSV() {
		super(VisualizationType.CSV);
	}

	@Override
	public String generate(MethodResult methodResult, String[] visualizationParameters) {
		try {
			if (methodResult == null) {
				throw new Exception("Tried to transform an invalid (method) result set into CSV-Format!");
			}

			String[] columnNames = methodResult.getColumnNames();
			Integer[] columnTypes = methodResult.getColumnDatatypes();
			ListIterator<Object[]> iterator = methodResult.getRowIterator();
			int columnCount = columnTypes.length;

			StringBuilder result = new StringBuilder();

			// add the column names
			for (int i = 0; i < (columnCount - 1); i++) {
				result.append(columnNames[i]).append(",");
			}
			result.append(columnNames[columnCount - 1].toString()).append("\n");

			// add the column datatypes
			for (int i = 0; i < (columnCount - 1); i++) {
				result.append(columnTypes[i].toString()).append(",");
			}
			result.append(columnTypes[columnCount - 1].toString()).append("\n");

			while (iterator.hasNext()) {
				StringBuilder row = new StringBuilder();
				Object[] currentRow = iterator.next();
				for (int i = 0; i < (columnCount - 1); i++) {
					row.append(currentRow[i].toString()).append(",");
				}
				row.append(currentRow[columnCount - 1].toString());

				result.append(row).append("\n");
			}

			return result.toString();
		} catch (Exception e) {
			Context.get().monitorEvent(this, MonitoringEvent.SERVICE_ERROR, e.getMessage().toString());
			try {
				return super.visualizationException.generate(e, "Encoding into CSV format failed.");
			} catch (Exception ex) {
				Context.get().monitorEvent(this, MonitoringEvent.SERVICE_ERROR, ex.getMessage().toString());
				return "Unknown/handled error occurred!";
			}
		}
	}

	// Always true
	@Override
	public boolean check(MethodResult methodResult, String[] visualizationParameters) {
		return true;
	}

	@Override
	public byte[] generatePNG(MethodResult methodResult, String[] visualizationParamters) {
		// TODO Auto-generated method stub
		return null;
	}

}


text:
package com.example.fiver.smart_butler.application;

import android.app.Application;

import com.example.fiver.smart_butler.utils.StaticClass;
import com.iflytek.cloud.SpeechConstant;
import com.iflytek.cloud.SpeechUtility;
import com.tencent.bugly.crashreport.CrashReport;

import cn.bmob.v3.Bmob;

/**
 * Created by yang on 17/6/27.
 */

public class BaseApplication extends Application{
    @Override
    public void onCreate() {
        super.onCreate();
        //初始化Bugly
        CrashReport.initCrashReport(getApplicationContext(), StaticClass.BUGLY_APP_ID, true);
        //初始化Bomb
        Bmob.initialize(this, StaticClass.BOMB_APP_ID);
        // 将"12345678"替换成您申请的APPID,申请地址:http://www.xfyun.cn
        // 请勿在"="与appid之间添加任何空字符或者转义符
        SpeechUtility.createUtility(getApplicationContext(), SpeechConstant.APPID +"="+StaticClass.VOICE_KEY);
    }
}


text: require File.join(File.dirname(__FILE__), "rake/awake_task.rb")


text:
package it.francescosantagati.jam;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * Interface definition for a remote message box object.
 *
 * @author Francesco Santagati
 */
public interface RemoteMessageBox extends Remote {

    /**
     * Insert a message into message box
     *
     * @param message it.francescosantagati.jam.Message
     * @throws RemoteException when fail to connect
     * @throws InterruptedException when thread is interrupted
     */
    void writeMessage(Message message) throws RemoteException, InterruptedException;

    /**
     * Retrieve agent id that is the message box owner
     *
     * @return it.francescosantagati.jam.AgentID
     * @throws RemoteException when fail to connect
     */
    AgentID getOwner() throws RemoteException;
}


text:
import Promise from 'somewhere';

async function foo() {
  await Promise.resolve();
}


text:
package org.apache.jackrabbit.core.security;

import org.apache.jackrabbit.api.security.JackrabbitAccessControlManager;
import org.apache.jackrabbit.api.security.JackrabbitAccessControlPolicy;
import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
import org.apache.jackrabbit.commons.iterator.AccessControlPolicyIteratorAdapter;
import org.apache.jackrabbit.core.security.authorization.Permission;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jcr.AccessDeniedException;
import javax.jcr.PathNotFoundException;
import javax.jcr.RepositoryException;
import javax.jcr.UnsupportedRepositoryOperationException;
import javax.jcr.security.AccessControlException;
import javax.jcr.security.AccessControlPolicy;
import javax.jcr.security.AccessControlPolicyIterator;
import javax.jcr.security.Privilege;
import java.security.Principal;

/**
 * AbstractAccessControlManager...
 */
public abstract class AbstractAccessControlManager implements JackrabbitAccessControlManager {

    private static Logger log = LoggerFactory.getLogger(AbstractAccessControlManager.class);

    /**
     * Always returns all registered Privileges.
     *
     * @param absPath Path to an existing node.
     * @return Always returns all registered Privileges.
     * @see javax.jcr.security.AccessControlManager#getSupportedPrivileges(String)
     */
    public Privilege[] getSupportedPrivileges(String absPath) throws PathNotFoundException, RepositoryException {
        checkInitialized();
        checkValidNodePath(absPath);

        // return all known privileges everywhere.
        return getPrivilegeManager().getRegisteredPrivileges();
    }

    /**
     * @see javax.jcr.security.AccessControlManager#privilegeFromName(String)
     */
    public Privilege privilegeFromName(String privilegeName)
            throws AccessControlException, RepositoryException {
        checkInitialized();

        return getPrivilegeManager().getPrivilege(privilegeName);
    }

    /**
     * Returns null.
     *
     * @param absPath Path to an existing node.
     * @return always returns null.
     * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String)
     */
    public AccessControlPolicy[] getPolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException {
        checkInitialized();
        checkPermission(absPath, Permission.READ_AC);

        log.debug("Implementation does not provide applicable policies -> getPolicy() always returns an empty array.");
        return new AccessControlPolicy[0];
    }

    /**
     * Returns an empty iterator.
     *
     * @param absPath Path to an existing node.
     * @return always returns an empty iterator.
     * @see javax.jcr.security.AccessControlManager#getApplicablePolicies(String)
     */
    public AccessControlPolicyIterator getApplicablePolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException {
        checkInitialized();
        checkPermission(absPath, Permission.READ_AC);

        log.debug("Implementation does not provide applicable policies -> returning empty iterator.");
        return AccessControlPolicyIteratorAdapter.EMPTY;
    }

    /**
     * Always throws AccessControlException
     *
     * @see javax.jcr.security.AccessControlManager#setPolicy(String, AccessControlPolicy)
     */
    public void setPolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException {
        checkInitialized();
        checkPermission(absPath, Permission.MODIFY_AC);

        throw new AccessControlException("AccessControlPolicy " + policy + " cannot be applied.");
    }

    /**
     * Always throws AccessControlException
     *
     * @see javax.jcr.security.AccessControlManager#removePolicy(String, AccessControlPolicy)
     */
    public void removePolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException {
        checkInitialized();
        checkPermission(absPath, Permission.MODIFY_AC);

        throw new AccessControlException("No AccessControlPolicy has been set through this API -> Cannot be removed.");
    }

    //-------------------------------------< JackrabbitAccessControlManager >---
    /**
     * @see org.apache.jackrabbit.api.security.JackrabbitAccessControlManager#getApplicablePolicies(java.security.Principal)
     */
    public JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal) throws AccessDeniedException, AccessControlException, UnsupportedRepositoryOperationException, RepositoryException {
        checkInitialized();

        log.debug("Implementation does not provide applicable policies -> returning empty array.");
        return new JackrabbitAccessControlPolicy[0];
    }

    /**
     * @see org.apache.jackrabbit.api.security.JackrabbitAccessControlManager#getPolicies(java.security.Principal)
     */
    public JackrabbitAccessControlPolicy[] getPolicies(Principal principal) throws AccessDeniedException, AccessControlException, UnsupportedRepositoryOperationException, RepositoryException {
        checkInitialized();

        log.debug("Implementation does not provide applicable policies -> returning empty array.");
        return new JackrabbitAccessControlPolicy[0];
    }

    //--------------------------------------------------------------------------
    /**
     * Check if this manager has been properly initialized.
     *
     * @throws IllegalStateException If this manager has not been properly initialized.
     */
    protected abstract void checkInitialized() throws IllegalStateException;

    /**
     * Check if the specified privileges are granted at absPath.
     *
     * @param absPath Path to an existing node.
     * @param permission Permissions to be checked.
     * @throws AccessDeniedException if the session does not have the
     * specified privileges.
     * @throws PathNotFoundException if no node exists at absPath
     * of if the session does not have the permission to READ it.
     * @throws RepositoryException If another error occurs.
     */
    protected abstract void checkPermission(String absPath, int permission) throws AccessDeniedException, PathNotFoundException, RepositoryException;

    /**
     * @return the privilege manager
     * @throws RepositoryException If another error occurs.
     */
    protected abstract PrivilegeManager getPrivilegeManager() throws RepositoryException;

    /**
     * Tests if the given absPath is absolute and points to an existing node.
     *
     * @param absPath Path to an existing node.
     * @throws PathNotFoundException if no node at absPath exists
     * or the session does not have privilege to retrieve the node.
     * @throws RepositoryException If the given absPath is not
     * absolute or if some other error occurs.
     */
    protected abstract void checkValidNodePath(String absPath) throws PathNotFoundException, RepositoryException;

}


text:
package org.hisp.dhis.android.core.arch.d2.internal;

import org.hisp.dhis.android.core.analytics.AnalyticsModule;
import org.hisp.dhis.android.core.category.CategoryModule;
import org.hisp.dhis.android.core.constant.ConstantModule;
import org.hisp.dhis.android.core.dataelement.DataElementModule;
import org.hisp.dhis.android.core.dataset.DataSetModule;
import org.hisp.dhis.android.core.datastore.DataStoreModule;
import org.hisp.dhis.android.core.datavalue.DataValueModule;
import org.hisp.dhis.android.core.enrollment.EnrollmentModule;
import org.hisp.dhis.android.core.event.EventModule;
import org.hisp.dhis.android.core.fileresource.FileResourceModule;
import org.hisp.dhis.android.core.imports.internal.ImportModule;
import org.hisp.dhis.android.core.indicator.IndicatorModule;
import org.hisp.dhis.android.core.legendset.LegendSetModule;
import org.hisp.dhis.android.core.maintenance.MaintenanceModule;
import org.hisp.dhis.android.core.note.NoteModule;
import org.hisp.dhis.android.core.option.OptionModule;
import org.hisp.dhis.android.core.organisationunit.OrganisationUnitModule;
import org.hisp.dhis.android.core.period.PeriodModule;
import org.hisp.dhis.android.core.program.ProgramModule;
import org.hisp.dhis.android.core.relationship.RelationshipModule;
import org.hisp.dhis.android.core.settings.SettingModule;
import org.hisp.dhis.android.core.sms.SmsModule;
import org.hisp.dhis.android.core.systeminfo.SystemInfoModule;
import org.hisp.dhis.android.core.trackedentity.TrackedEntityModule;
import org.hisp.dhis.android.core.user.UserModule;
import org.hisp.dhis.android.core.validation.ValidationModule;
import org.hisp.dhis.android.core.visualization.VisualizationModule;

import javax.inject.Inject;

import dagger.Reusable;

@SuppressWarnings({"PMD.TooManyFields"})
@Reusable
public final class D2Modules {

    public final AnalyticsModule analytics;
    public final CategoryModule category;
    public final ConstantModule constant;
    public final DataElementModule dataElement;
    public final DataSetModule dataSet;
    public final OptionModule option;
    public final DataValueModule dataValue;
    public final EnrollmentModule enrollment;
    public final EventModule event;
    public final FileResourceModule fileResource;
    public final ImportModule importModule;
    public final IndicatorModule indicator;
    public final LegendSetModule legendSet;
    public final DataStoreModule dataStore;
    public final MaintenanceModule maintenance;
    public final NoteModule note;
    public final ProgramModule program;
    public final OrganisationUnitModule organisationUnit;
    public final SystemInfoModule systemInfo;
    public final SettingModule settingModule;
    public final PeriodModule periodModule;
    public final RelationshipModule relationship;
    public final TrackedEntityModule trackedEntity;
    public final UserModule user;
    public final ValidationModule validation;
    public final VisualizationModule visualization;
    public final SmsModule sms;

    @Inject
    public D2Modules(AnalyticsModule analytics,
                     CategoryModule category,
                     ConstantModule constant,
                     DataElementModule dataElement,
                     DataSetModule dataSet,
                     OptionModule option,
                     DataValueModule dataValue,
                     EnrollmentModule enrollment,
                     EventModule event,
                     FileResourceModule fileResource,
                     ImportModule importModule,
                     IndicatorModule indicator,
                     LegendSetModule legendSet,
                     DataStoreModule dataStore,
                     MaintenanceModule maintenance,
                     NoteModule note,
                     ProgramModule program,
                     OrganisationUnitModule organisationUnit,
                     SystemInfoModule systemInfo,
                     SettingModule settingModule,
                     PeriodModule periodModule,
                     RelationshipModule relationship,
                     TrackedEntityModule trackedEntity,
                     UserModule user,
                     ValidationModule validation,
                     VisualizationModule visualization,
                     SmsModule sms) {
        this.analytics = analytics;
        this.category = category;
        this.constant = constant;
        this.dataElement = dataElement;
        this.option = option;
        this.dataSet = dataSet;
        this.dataValue = dataValue;
        this.enrollment = enrollment;
        this.event = event;
        this.fileResource = fileResource;
        this.importModule = importModule;
        this.indicator = indicator;
        this.legendSet = legendSet;
        this.dataStore = dataStore;
        this.maintenance = maintenance;
        this.note = note;
        this.program = program;
        this.organisationUnit = organisationUnit;
        this.systemInfo = systemInfo;
        this.settingModule = settingModule;
        this.periodModule = periodModule;
        this.relationship = relationship;
        this.trackedEntity = trackedEntity;
        this.user = user;
        this.validation = validation;
        this.visualization = visualization;
        this.sms = sms;
    }
}


text:
package com.fourmob.datetimepicker.date;

abstract interface DatePickerController {
	public abstract int getFirstDayOfWeek();

	public abstract int getMaxYear();

	public abstract int getMinYear();

	public abstract SimpleMonthAdapter.CalendarDay getSelectedDay();

	public abstract void onDayOfMonthSelected(int year, int month, int day);

	public abstract void onYearSelected(int year);

	public abstract void registerOnDateChangedListener(DatePickerDialog.OnDateChangedListener onDateChangedListener);

	public abstract void tryVibrate();
}


text:
Self-hosted media sharing service.

**Nethloader makes automating screenshot and video sharing from your computer easy.**

- Lightweigh and fast
- Functional and pretty UI
- Drag n' drop web UI upload
- Dark mode
- Easy to install
- Multiple users
- ShareX compatibility
- Public upload endpoint

💁 [**Demo**](https://nethloader.nethruster.com) ( *username*: demo@demo.com, *password*: demo )

Screenshots

Public home

Media view

Upload on web UI

User control panel

User settings

Admin panel

Dark mode

## Browsers support made by godban

| [](http://godban.github.io/browsers-support-badges/)
IE / Edge | [](http://godban.github.io/browsers-support-badges/)
Safari | [](http://godban.github.io/browsers-support-badges/)
Firefox | [](http://godban.github.io/browsers-support-badges/)
Chrome |
| --------- | --------- | --------- | --------- |
| Edge 16+| 10.1+| 52+| 57+

# Installation and usage
[See the wiki.](https://github.com/nethruster/nethloader/wiki/Installation)
# License
Nethloader is licensed under the MIT license: https://github.com/nethruster/nethloader/blob/dev/LICENSE.


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

    <!-- Project Information -->

    <groupId>com.redfin</groupId>
    <artifactId>validity</artifactId>
    <version>5.1.0</version>
    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>

    <name>Validity</name>
    <description>A fluent, opinionated, and strongly-typed validation library for Java.</description>
    <inceptionYear>2016</inceptionYear>

    <url>https://github.com/redfin/validity</url>
    <scm>
        <connection>scm:git:git@github.com:redfin/validity.git</connection>
        <url>https://github.com/redfin/validity</url>
        <tag>HEAD</tag>
    </scm>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/redfin/validity/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Travis</system>
        <url>https://travis-ci.org/redfin/validity</url>
    </ciManagement>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>Redfin</name>
        <url>https://www.redfin.com</url>
    </organization>
    <developers>
        <developer>
            <id>aaron.davis</id>
            <name>Aaron Davis</name>
            <email>aaron.davis@redfin.com</email>
            <url>https://github.com/littleclay</url>
            <organization>Redfin</organization>
            <organizationUrl>https://www.redfin.com</organizationUrl>
            <roles>
                <role>creator</role>
                <role>developer</role>
            </roles>
            <timezone>America/Los_Angeles</timezone>
        </developer>
    </developers>

    <!-- POM Properties -->

    <properties>
        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
        <min.java.version>1.8</min.java.version>
    </properties>

    <!-- Code Dependencies - Version Management -->

    <dependencyManagement>

        <dependencies>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>5.0.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Code Dependencies - Declarations -->

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>

        <!-- Maven Plugin Version Management -->

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.5</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugin</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.junit.platform</groupId>
                            <artifactId>junit-platform-surefire-provider</artifactId>
                            <version>1.0.0</version>
                        </dependency>
                        <dependency>
                            <groupId>org.junit.jupiter</groupId>
                            <artifactId>junit-jupiter-engine</artifactId>
                            <version>5.0.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>

        <!-- Regular Build Settings -->

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.0,)</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[${min.java.version},)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${min.java.version}</source>
                    <target>${min.java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <!-- Report Settings -->

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <quiet>true</quiet>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <configuration>
                            <show>public</show>
                        </configuration>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <!-- Deployment Settings -->

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>


text:
package org.sparklinedata.druid.metadata

import org.apache.spark.sql.types.{DataType, DoubleType, LongType, StringType}
import org.joda.time.Interval
import org.sparklinedata.druid.client.{ColumnDetails, MetadataResponse}

object DruidDataType extends Enumeration {
  val String = Value("STRING")
  val Long = Value("LONG")
  val Float = Value("FLOAT")
  val HyperUnique = Value("HYPERUNIQUE")

  def sparkDataType(t : String) : DataType = sparkDataType(DruidDataType.withName(t))

  def sparkDataType(t : DruidDataType.Value) : DataType = t match {
    case String => StringType
    case Long => LongType
    case Float => DoubleType
    case HyperUnique => DoubleType
  }
}

sealed trait DruidColumn {
  val name : String
  val dataType : DruidDataType.Value
  val size : Long // in bytes

  def isDimension(excludeTime : Boolean = false) : Boolean
}

object DruidColumn {

  def apply(nm : String, c : ColumnDetails) : DruidColumn = {
    if (nm == DruidDataSource.TIME_COLUMN_NAME) {
      DruidTimeDimension(nm, DruidDataType.withName(c.typ), c.size)
    } else if ( c.cardinality.isDefined) {
      DruidDimension(nm, DruidDataType.withName(c.typ), c.size, c.cardinality.get)
    } else {
      DruidMetric(nm, DruidDataType.withName(c.typ.toUpperCase), c.size)
    }
  }
}

case class DruidDimension(name : String,
                       dataType : DruidDataType.Value,
                       size : Long,
                       cardinality : Long) extends DruidColumn {
  def isDimension(excludeTime : Boolean = false) = true
}

case class DruidMetric(name : String,
                          dataType : DruidDataType.Value,
                          size : Long) extends DruidColumn {
  def isDimension(excludeTime : Boolean = false) = false
}

case class DruidTimeDimension(name : String,
                       dataType : DruidDataType.Value,
                       size : Long) extends DruidColumn {
  def isDimension(excludeTime : Boolean = false) = !excludeTime
}

case class DruidDataSource(name : String,
                         intervals : List[Interval],
                         columns : Map[String, DruidColumn],
                         size : Long) {

  import DruidDataSource._

  lazy val timeDimension = columns.values.find {
    case c if c.name == TIME_COLUMN_NAME => true
    case _ => false
  }

  lazy val dimensions : IndexedSeq[DruidDimension] = columns.values.filter {
    case d : DruidDimension => true
    case _ => false
  }.map(_.asInstanceOf[DruidDimension]).toIndexedSeq

  lazy val metrics : Map[String, DruidMetric] = columns.values.filter {
    case m : DruidMetric => true
    case _ => false
  }.map(m => (m.name -> m.asInstanceOf[DruidMetric])).toMap

  def numDimensions = dimensions.size

  def indexOfDimension(d : String) : Int = {
    dimensions.indexWhere(_.name == d)
  }

  def metric(name : String) : Option[DruidMetric] = {
    metrics.get(name)
  }

}

object DruidDataSource {

  val TIME_COLUMN_NAME = "__time"

  def apply(dataSource : String, mr : MetadataResponse,
             is : List[Interval]) : DruidDataSource = {

    val columns = mr.columns.map {
      case (n, c) => (n -> DruidColumn(n,c))
    }

    new DruidDataSource(dataSource, is, columns, mr.size)
  }
}


text:
import React from 'react';

const JQXLite = window.JQXLite;

export default class JqxComboBox extends React.Component {
    componentDidMount() {
        let options = this.manageAttributes();
        this.createComponent(options);
    };
    manageAttributes() {
        let properties = ['animationType','autoComplete','autoOpen','autoItemsHeight','autoDropDownHeight','closeDelay','checkboxes','disabled','displayMember','dropDownHorizontalAlignment','dropDownVerticalAlignment','dropDownHeight','dropDownWidth','enableHover','enableSelection','enableBrowserBoundsDetection','height','itemHeight','multiSelect','minLength','openDelay','popupZIndex','placeHolder','remoteAutoComplete','remoteAutoCompleteDelay','renderer','renderSelectedItem','rtl','selectedIndex','showArrow','showCloseButtons','searchMode','search','source','scrollBarSize','template','theme','validateSelection','valueMember','width'];
        let options = {};
        for(let item in this.props) {
              if(item === 'settings') {
                  for(let itemTwo in this.props[item]) {
                      options[itemTwo] = this.props[item][itemTwo];
                      }
                } else {
                      if(properties.indexOf(item) !== -1) {
                        options[item] = this.props[item];
                      }
                }
          }
          return options;
      };
    createComponent(options) {
        if(!this.style) {
              for (let style in this.props.style) {
                  JQXLite(this.componentSelector).css(style, this.props.style[style]);
              }
        }
        if(this.props.className !== undefined) {
            let classes = this.props.className.split(' ');
            for (let i = 0; i < classes.length; i++ ) {
                JQXLite(this.componentSelector).addClass(classes[i]);
            }
        }
        if(!this.template) {
              JQXLite(this.componentSelector).html(this.props.template);
        }
        JQXLite(this.componentSelector).jqxComboBox(options);
    };
    setOptions(options) {
        JQXLite(this.componentSelector).jqxComboBox('setOptions', options);
    };
    getOptions() {
        if(arguments.length === 0) {
            throw Error('At least one argument expected in getOptions()!');
        }
        let resultToReturn = {};
        for(let i = 0; i < arguments.length; i++) {
            resultToReturn[arguments[i]] = JQXLite(this.componentSelector).jqxComboBox(arguments[i]);
        }
        return resultToReturn;
    };
    on(name,callbackFn) {
        JQXLite(this.componentSelector).on(name,callbackFn);
    };
    off(name) {
        JQXLite(this.componentSelector).off(name);
    };
    animationType(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('animationType', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('animationType');
        }
    };
    autoComplete(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('autoComplete', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('autoComplete');
        }
    };
    autoOpen(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('autoOpen', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('autoOpen');
        }
    };
    autoItemsHeight(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('autoItemsHeight', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('autoItemsHeight');
        }
    };
    autoDropDownHeight(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('autoDropDownHeight', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('autoDropDownHeight');
        }
    };
    closeDelay(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('closeDelay', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('closeDelay');
        }
    };
    checkboxes(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('checkboxes', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('checkboxes');
        }
    };
    disabled(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('disabled', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('disabled');
        }
    };
    displayMember(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('displayMember', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('displayMember');
        }
    };
    dropDownHorizontalAlignment(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('dropDownHorizontalAlignment', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('dropDownHorizontalAlignment');
        }
    };
    dropDownVerticalAlignment(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('dropDownVerticalAlignment', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('dropDownVerticalAlignment');
        }
    };
    dropDownHeight(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('dropDownHeight', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('dropDownHeight');
        }
    };
    dropDownWidth(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('dropDownWidth', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('dropDownWidth');
        }
    };
    enableHover(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('enableHover', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('enableHover');
        }
    };
    enableSelection(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('enableSelection', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('enableSelection');
        }
    };
    enableBrowserBoundsDetection(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('enableBrowserBoundsDetection', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('enableBrowserBoundsDetection');
        }
    };
    height(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('height', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('height');
        }
    };
    itemHeight(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('itemHeight', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('itemHeight');
        }
    };
    multiSelect(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('multiSelect', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('multiSelect');
        }
    };
    minLength(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('minLength', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('minLength');
        }
    };
    openDelay(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('openDelay', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('openDelay');
        }
    };
    popupZIndex(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('popupZIndex', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('popupZIndex');
        }
    };
    placeHolder(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('placeHolder', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('placeHolder');
        }
    };
    remoteAutoComplete(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('remoteAutoComplete', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('remoteAutoComplete');
        }
    };
    remoteAutoCompleteDelay(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('remoteAutoCompleteDelay', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('remoteAutoCompleteDelay');
        }
    };
    renderer(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('renderer', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('renderer');
        }
    };
    renderSelectedItem(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('renderSelectedItem', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('renderSelectedItem');
        }
    };
    rtl(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('rtl', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('rtl');
        }
    };
    selectedIndex(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('selectedIndex', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('selectedIndex');
        }
    };
    showArrow(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('showArrow', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('showArrow');
        }
    };
    showCloseButtons(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('showCloseButtons', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('showCloseButtons');
        }
    };
    searchMode(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('searchMode', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('searchMode');
        }
    };
    search(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('search', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('search');
        }
    };
    source(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('source', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('source');
        }
    };
    scrollBarSize(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('scrollBarSize', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('scrollBarSize');
        }
    };
    template(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('template', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('template');
        }
    };
    theme(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('theme', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('theme');
        }
    };
    validateSelection(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('validateSelection', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('validateSelection');
        }
    };
    valueMember(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('valueMember', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('valueMember');
        }
    };
    width(arg) {
        if (arg !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('width', arg)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('width');
        }
    };
    addItem(item) {
        return JQXLite(this.componentSelector).jqxComboBox('addItem', item);
    };
    clearSelection() {
        JQXLite(this.componentSelector).jqxComboBox('clearSelection');
    };
    clear() {
        JQXLite(this.componentSelector).jqxComboBox('clear');
    };
    close() {
        JQXLite(this.componentSelector).jqxComboBox('close');
    };
    checkIndex(index) {
        JQXLite(this.componentSelector).jqxComboBox('checkIndex', index);
    };
    checkItem(item) {
        JQXLite(this.componentSelector).jqxComboBox('checkItem', item);
    };
    checkAll() {
        JQXLite(this.componentSelector).jqxComboBox('checkAll');
    };
    destroy() {
        JQXLite(this.componentSelector).jqxComboBox('destroy');
    };
    disableItem(item) {
        JQXLite(this.componentSelector).jqxComboBox('disableItem', item);
    };
    disableAt(index) {
        JQXLite(this.componentSelector).jqxComboBox('disableAt', index);
    };
    enableItem(item) {
        JQXLite(this.componentSelector).jqxComboBox('enableItem', item);
    };
    enableAt(index) {
        JQXLite(this.componentSelector).jqxComboBox('enableAt', index);
    };
    ensureVisible(index) {
        JQXLite(this.componentSelector).jqxComboBox('ensureVisible', index);
    };
    focus() {
        JQXLite(this.componentSelector).jqxComboBox('focus');
    };
    getItem(index) {
        return JQXLite(this.componentSelector).jqxComboBox('getItem', index);
    };
    getItemByValue(value) {
        return JQXLite(this.componentSelector).jqxComboBox('getItemByValue', value);
    };
    getVisibleItems() {
        return JQXLite(this.componentSelector).jqxComboBox('getVisibleItems');
    };
    getItems() {
        return JQXLite(this.componentSelector).jqxComboBox('getItems');
    };
    getCheckedItems() {
        return JQXLite(this.componentSelector).jqxComboBox('getCheckedItems');
    };
    getSelectedItem() {
        return JQXLite(this.componentSelector).jqxComboBox('getSelectedItem');
    };
    getSelectedItems() {
        return JQXLite(this.componentSelector).jqxComboBox('getSelectedItems');
    };
    getSelectedIndex() {
        return JQXLite(this.componentSelector).jqxComboBox('getSelectedIndex');
    };
    insertAt(item, index) {
        return JQXLite(this.componentSelector).jqxComboBox('insertAt', item, index);
    };
    isOpened() {
        return JQXLite(this.componentSelector).jqxComboBox('isOpened');
    };
    indeterminateIndex(index) {
        JQXLite(this.componentSelector).jqxComboBox('indeterminateIndex', index);
    };
    indeterminateItem(item) {
        JQXLite(this.componentSelector).jqxComboBox('indeterminateItem', item);
    };
    loadFromSelect(selectTagId) {
        JQXLite(this.componentSelector).jqxComboBox('loadFromSelect', selectTagId);
    };
    open() {
        JQXLite(this.componentSelector).jqxComboBox('open');
    };
    removeItem(item) {
        return JQXLite(this.componentSelector).jqxComboBox('removeItem', item);
    };
    removeAt(index) {
        return JQXLite(this.componentSelector).jqxComboBox('removeAt', index);
    };
    selectIndex(index) {
        JQXLite(this.componentSelector).jqxComboBox('selectIndex', index);
    };
    selectItem(item) {
        JQXLite(this.componentSelector).jqxComboBox('selectItem', item);
    };
    searchString() {
        return JQXLite(this.componentSelector).jqxComboBox('searchString');
    };
    updateItem(item, itemValue) {
        JQXLite(this.componentSelector).jqxComboBox('updateItem', item, itemValue);
    };
    updateAt(item, index) {
        JQXLite(this.componentSelector).jqxComboBox('updateAt', item, index);
    };
    unselectIndex(index) {
        JQXLite(this.componentSelector).jqxComboBox('unselectIndex', index);
    };
    unselectItem(item) {
        JQXLite(this.componentSelector).jqxComboBox('unselectItem', item);
    };
    uncheckIndex(index) {
        JQXLite(this.componentSelector).jqxComboBox('uncheckIndex', index);
    };
    uncheckItem(item) {
        JQXLite(this.componentSelector).jqxComboBox('uncheckItem', item);
    };
    uncheckAll() {
        JQXLite(this.componentSelector).jqxComboBox('uncheckAll');
    };
    val(value) {
        if (value !== undefined) {
            JQXLite(this.componentSelector).jqxComboBox('val',  value)
        } else {
            return JQXLite(this.componentSelector).jqxComboBox('val');
        }
    };

    render() {
        let id = 'jqxComboBox' + JQXLite.generateID();
        this.componentSelector = '#' + id;
        return (

{this.props.value}{this.props.children}

        )
    };
};


text:
{- HLINT ignore "Monoid law, right identity" -}
{- HLINT ignore "Monoid law, left identity" -}

module Test.DecisionSpec
       ( decisionPropertySpec

         -- * Gen
       , genDecision
       ) where

import Hedgehog (MonadGen, forAll, (===))
import Test.Hspec (Spec, describe, it)
import Test.Hspec.Hedgehog (hedgehog)

import Summoner.Decision (Decision)

import qualified Hedgehog.Gen as Gen

decisionPropertySpec :: Spec
decisionPropertySpec = describe "Decision property tests" $ do
    it "Decision Semigroup:Assoc" $ hedgehog $ do
        x <- forAll genDecision
        y <- forAll genDecision
        z <- forAll genDecision
        (x <> y) <> z === x <> (y <> z)

    it "Decision Monoid:Mempty" $ hedgehog $ do
        x <- forAll genDecision
        x <> mempty === x
        mempty <> x === x

genDecision :: MonadGen m => m Decision
genDecision = Gen.enumBounded


text:
div.traffic-display {
  font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
  color: white;
}
ol.traffic-incidents {
  text-align: left;
}


text:
#import <Foundation/Foundation.h>

#import "ChumpHelp.h"

FOUNDATION_EXPORT int const HEADER_VERSION_BYTES;
FOUNDATION_EXPORT int const HEADER_MESSAGE_TYPE_BYTES;
FOUNDATION_EXPORT int const HEADER_TAG_BYTES;
FOUNDATION_EXPORT int const HEADER_TOTAL_BYTES;

@interface ChumpHeader : NSObject
{
@private
    short version;
    short messageType;
    short tag;
}

+ (id)headerWithVersion:(short)version messageType:(short)messageType tag:(short)tag;

// designated
- (id)initWithVersion:(short)version messageType:(short)messageType tag:(short)tag;

- (NSData *)toData;
- (NSUInteger)calcBytes;
- (short)version;
- (short)messageType;
- (short)tag;

+ (short)parseVersion:(NSData *)header;
+ (short)parseMessageType:(NSData *)header;
+ (short)parseTag:(NSData *)header;

@end


text:
'use strict';

const EventEmitter = require ('events');

/** Some type defintions for JSDoc */
/**
 * A factory used by {@link Scheduler#constructor} to create proxies.
 * @callback proxyFactory
 * @param {string} serverHost - The host of the server (ex: localhost)
 * @param {number} serverPort - The port on which the server run
 * @param {number} proxyPort - The port on which the proxy will be running (the proxy's host will be localhost)
 * @param {LazyTransformStream[]} metrics - The list of metrics used by the proxy to process dataframes
 * @param {TimeMetric|undefined} timeMetric - (optional) The time metric used to record elapsed time
 * @return {Proxy} A new proxy
 */

/**
 * An event containing a log from the Scheduler
 * @event Scheduler#log
 * @type {Object}
 * @property {string} level - The log's level (info, warning, error, etc)
 * @property {string} message - The log's message
 */

/**
 * Class representating a scheduler, which coordinates execution of several runners with specific parameters
 * and drives the execution of an application.
 * @extends EventEmitter
 * @author Thomas Minier
 */
class Scheduler extends EventEmitter {
	/**
	 * Constructor
	 * @param {Runner} runner - The runner used to execute commands
	 * @param {proxyFactory} proxyFactory - The factory used to create proxies
	 * @param {TimeMetric} timeMetric - The TimeMetric used to perform time measurements
	 */
	constructor (runner, proxyFactory, timeMetric) {
		super();
		this.runner = runner;
		this.proxyFactory = proxyFactory;
		this.timeMetric = timeMetric;
		this.proxies = [];
		this.tasks = [];
		this.proxyMetrics = [];
	}

	/**
	 * Log a message using an event
	 * @param {string} level - The log's level (info, warning, error, etc)
	 * @param {string} message - The log's message
	 * @return {void}
	 * @fires Scheduler#log
	 */
	_log (level, message) {
		const now = new Date();
		this.emit('log', {date: `${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`, level, message});
	}

	/**
	 * Schedule a task in the queue of execution
	 * @param {string} key - The key used to link the task to a specific query
	 * @param {string} input - The input parameter of the runner
	 * @param {string} output - (optional) The output parameter of the runner
	 * @return {void}
	 */
	schedule (key, input, output) {
		this.tasks.push({key, input, output});
	}

	/**
	 * Register a new metric for the proxies.
	 * Warning : this method should be called before any scheduling or proxy registration, as
	 * any new metric will not be added to tasks or proxies previously registrered.
	 * @param {LazyTransformStream} metric - The metric to register
	 * @return {void}
	 */
	registerProxyMetric (metric) {
		this.proxyMetrics.push(metric);
	}

	/**
	 * Registrer a new proxy
	 * @param {string} serverHost - The host of the server (ex: localhost)
	 * @param {number} serverPort - The port on which the server run
	 * @param {number} proxyPort - The port on which the proxy will be running (the proxy's host will be localhost)
	 * @return {void}
	 */
	registerProxy (serverHost, serverPort, proxyPort) {
		this.proxies.push(this.proxyFactory(serverHost, serverPort, proxyPort, this.proxyMetrics, this.timeMetric));
	}

	/**
	* Execute all tasks scheduled in sequence.
	* @private
	* @return {Promise} A Promise fulfilled when all tasks have been executed
	*/
	_runTasks () {
		// Sequential version : will execute all tasks in sequence
		// A concurrent version might not works with the current proxies
		return this.tasks.reduce((promise, value) => {
			return promise.then(() => {
				this._log('info', `Executing ${value.key}`);
				this._nextStep(value.key);
				return this.runner.execute(value.key, value.input, value.output);
			});
		}, Promise.resolve());
	}

	/**
	 * Progress to next step : Flush all metrics, then update all proxies with a new query key
	 * @private
	 * @param {string} key - The new query key used by the proxies
	 * @return {void}
	 */
	_nextStep (key) {
		this._log('info', `Gathering data from metrics for ${key}`);
		// flush all metrics
		this.runner.flushMetrics();
		this.proxyMetrics.forEach(metric => metric.flush());
		if (this.timeMetric) {
			this.timeMetric.flush();
		}
		// move proxies to next operation
		this.proxies.forEach(proxy => proxy.nextOperation(key));
	}

	/**
	 * Deploy all proxies
	 * @return {void}
	 */
	deploy () {
		this._log('info', 'Deploying proxies');
		this.proxies.forEach(proxy => proxy.init());
	}

	/**
	 * Shutdown all running proxies
	 * @return {void}
	 */
	shutdown () {
		this._log('info', 'Shutting down proxies');
		this.proxies.forEach(proxy => proxy.shutdown());
	}

	/**
	 * Execute all tasks scheduled.
	 * This method will not handle proxies' life-cycle, use {@link Scheduler#deploy} and {@link Scheduler#shutdown} for it.
	 * @return {Promise} A Promise fulfilled when the scheduler's execution has completed
	 */
	execute () {
		return this._runTasks().then(() => this._log('info', 'All queries have been executed!'));
	}
}

module.exports = Scheduler;


text:
package Google::Ads::GoogleAds::V10::Services::ExperimentArmService;

use strict;
use warnings;
use base qw(Google::Ads::GoogleAds::BaseService);

sub mutate {
  my $self         = shift;
  my $request_body = shift;
  my $http_method  = 'POST';
  my $request_path = 'v10/customers/{+customerId}/experimentArms:mutate';
  my $response_type =
'Google::Ads::GoogleAds::V10::Services::ExperimentArmService::MutateExperimentArmsResponse';

  return $self->SUPER::call($http_method, $request_path, $request_body,
    $response_type);
}

1;


text:
from database_manager.friend_manager import MinimumFriendParameterException
from database_manager.util import ChumMeDBManager
from .friend_form import FriendForm

class AddFriendForm(FriendForm):
    def add_friend(self):
        friend = self.build_friend(self.parent.add_friend_form)
        try:
            friend_id = ChumMeDBManager().friend_manager.add_friend(friend)
            self._add_social_networks(friend_id)
            self._add_friend_profile_photo(friend_id)
        except MinimumFriendParameterException:
            self.display_error_popup('adding')
        else:
            self.parent.show_friend_list()

    def _add_social_networks(self, friend_id):
        for i, field in enumerate(self.social_network_fields):
            if field.check_box.active:
                ChumMeDBManager().friend_social_network_manager.\
                    add_friend_social_network(
                    friend_id,
                    i + 1,
                    field.text_input.text
                )

    def _add_friend_profile_photo(self, friend_id):
        if self.blob_profile_image:
            ChumMeDBManager().profile_photo_manager.insert_profile_photo(
                friend_id,
                self.blob_profile_image['blob'],
                self.blob_profile_image['ext']
            )


text:
/**
 * @file
 * Raw Video Encoder
 */

#include "avcodec.h"
#include "raw.h"
#include "internal.h"
#include "libavutil/pixdesc.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/internal.h"

static av_cold int raw_encode_init(AVCodecContext *avctx)
{
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);

    avctx->coded_frame            = avctx->priv_data;
    avcodec_get_frame_defaults(avctx->coded_frame);
    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
    avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
    if(!avctx->codec_tag)
        avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
    return 0;
}

static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,
                      const AVFrame *frame, int *got_packet)
{
    int ret = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);

    if (ret < 0)
        return ret;

    if ((ret = ff_alloc_packet2(avctx, pkt, ret)) < 0)
        return ret;
    if ((ret = avpicture_layout((const AVPicture *)frame, avctx->pix_fmt, avctx->width,
                                avctx->height, pkt->data, pkt->size)) < 0)
        return ret;

    if(avctx->codec_tag == AV_RL32("yuv2") && ret > 0 &&
       avctx->pix_fmt   == AV_PIX_FMT_YUYV422) {
        int x;
        for(x = 1; x < avctx->height*avctx->width*2; x += 2)
            pkt->data[x] ^= 0x80;
    }
    pkt->flags |= AV_PKT_FLAG_KEY;
    *got_packet = 1;
    return 0;
}

AVCodec ff_rawvideo_encoder = {
    .name           = "rawvideo",
    .long_name      = NULL_IF_CONFIG_SMALL("raw video"),
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = AV_CODEC_ID_RAWVIDEO,
    .priv_data_size = sizeof(AVFrame),
    .init           = raw_encode_init,
    .encode2        = raw_encode,
};


text:
<?php

namespace PragmaRX\Tracker\Support\Exceptions;

use Exception;

class RecoverableError extends Exception {

}


text:
/**
 *
 */
package com.crsp.dao;

import java.util.List;

import com.crsp.entity.User;

/**
 * 用户管理DAO接口类
 *
 * @author Administrator
 *
 */
public interface UserDAO extends BaseDAO<User>{
	// 根据user_id查询用户
	public User findByUserId(String user_id);
	// 查询所有的用户
	public List<User> queryAllUsers();
}


text:
<!DOCTYPE html>

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.8.0" />
	<meta name="robots" content="noindex" />

	<title>Page not found | kshtml</title>

	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />

		Overview

Namespaces

KsHtml

Form

Element

Renderer

None

Classes

HtmlForm_CaptchaBlock

HtmlForm_CaptchaElement

HtmlForm_DatetimeElement

HtmlForm_DayElement

HtmlForm_FloatElement

HtmlForm_MonthElement

HtmlForm_YearElement

KsHtml\Form

KsHtml\Form\Element

KsHtml\Form\Element\AbstractList

KsHtml\Form\Element\Checkbox

KsHtml\Form\Element\Date

KsHtml\Form\Element\File

KsHtml\Form\Element\Hidden

KsHtml\Form\Element\Int

KsHtml\Form\Element\MultiList

KsHtml\Form\Element\MultiSelect

KsHtml\Form\Element\Password

KsHtml\Form\Element\Radio

KsHtml\Form\Element\Select

KsHtml\Form\Element\SelectAbstract

KsHtml\Form\Element\String

KsHtml\Form\Element\SubmitElement

KsHtml\Form\Element\Text

KsHtml\Form\Element\UploadedFile

KsHtml\Form\Handler

KsHtml\Form\Renderer\Twig

KsHtml\Tag

Interfaces

KsHtml\Form\RendererIf

	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

				Overview

Namespace

Class

				Tree

Page not found

The requested page could not be found.

You have probably clicked on a link that is outdated and points to a page that does not exist any more or you have made an typing error in the address.

To continue please try to find requested page in the menu, take a look at the tree view of the whole project or use search field on the top.

		kshtml API documentation generated by ApiGen 2.8.0