text:
using ASafaWeb.Library.DomainModels;
using ASafaWeb.Library.Raven;
using Asafaharbor.Web.Responses;
using Asafaharbor.Web.Utils;
using Nancy;
using Nancy.Authentication.Forms;
using Nancy.Cryptography;
using Nancy.Diagnostics;
using Raven.Client;

namespace Asafaharbor.Web
{
    public class Bootstrapper : DefaultNancyBootstrapper
    {
        protected override DiagnosticsConfiguration DiagnosticsConfiguration
        {
            get { return new DiagnosticsConfiguration { Password = @"?eUYoJ9J" }; }
        }

        protected override void ConfigureApplicationContainer(Nancy.TinyIoc.TinyIoCContainer container)
        {
            base.ConfigureApplicationContainer(container);

            var store = RavenSessionProvider.DocumentStore;

            container.Register<IDocumentStore>(store);
        }

        protected override void ConfigureRequestContainer(Nancy.TinyIoc.TinyIoCContainer container, NancyContext context)
        {
            base.ConfigureRequestContainer(container, context);

            container.Register<IUserMapper, UserMapper>();

            var store = container.Resolve<IDocumentStore>();
            var documentSesion = store.OpenSession();

            container.Register(documentSesion);
        }

        protected override void RequestStartup(Nancy.TinyIoc.TinyIoCContainer container,
                                               Nancy.Bootstrapper.IPipelines pipelines, NancyContext context)
        {
            pipelines.OnError.AddItemToEndOfPipeline((ctx, ex) =>
                {
                    new LogEvent("An unhandled exception occurred", ex).Raise();
                    return ErrorResponse.FromException(ex);
                });

            base.RequestStartup(container, pipelines, context);

            var cryptographyConfiguration = new CryptographyConfiguration(
                new RijndaelEncryptionProvider(new PassphraseKeyGenerator("SuperSecretPass",
                                                                          new byte[] { 100, 111, 110, 116, 32, 109, 97, 107, 101, 32, 109, 101, 32, 108, 111, 103, 32, 105, 110, 32, 101, 97, 99, 104, 32, 116, 105, 109, 101, 32, 105, 32, 98, 117, 105, 108, 100, 33 })),
                new DefaultHmacProvider(new PassphraseKeyGenerator("UberSuperSecure",
                                                                   new byte[] { 90, 71, 57, 117, 100, 67, 66, 116, 89, 87, 116, 108, 73, 71, 49, 108, 73, 71, 120, 118, 90, 121, 66, 112, 98, 105, 66, 108, 89, 87, 78, 111, 73, 72, 82, 112, 98, 87, 85, 103, 97, 83, 66, 105, 100, 87, 108, 115, 90, 67, 69, 61 })));

            var formsAuthConfiguration =
                new FormsAuthenticationConfiguration
                    {
                        CryptographyConfiguration = cryptographyConfiguration,
                        RedirectUrl = "~/account/log-in",
                        UserMapper = container.Resolve<IUserMapper>(),
                    };
            FormsAuthentication.Enable(pipelines, formsAuthConfiguration);

            pipelines.AfterRequest.AddItemToEndOfPipeline(
                ctx =>
                    {
                        var documentSession = container.Resolve<IDocumentSession>();

                        if (ctx.Response.StatusCode != HttpStatusCode.InternalServerError)
                        {
                            documentSession.SaveChanges();
                        }

                        documentSession.Dispose();
                    }
                );
        }

        protected override void ConfigureConventions(Nancy.Conventions.NancyConventions nancyConventions)
        {
            base.ConfigureConventions(nancyConventions);
            nancyConventions.StaticContentsConventions.Add(
                Nancy.Conventions.StaticContentConventionBuilder.AddDirectory("Scripts", "Scripts"));
            nancyConventions.StaticContentsConventions.Add(
                Nancy.Conventions.StaticContentConventionBuilder.AddDirectory("Styles", "Styles"));
        }
    }
}


text:
//Provides control sap.m.PlanningCalendarView.
sap.ui.define(['jquery.sap.global', 'sap/ui/core/Element', './StandardListItem', './StandardListItemRenderer', 'sap/ui/core/Renderer', './library', 'sap/ui/unified/library'],
		function(jQuery, Element, StandardListItem, StandardListItemRenderer, Renderer, library, unifiedLibrary) {
	"use strict";

	/**
	 * Constructor for a new PlanningCalendarView.
	 *
	 * @param {string} [sId] ID for the new control, generated automatically if no ID is given
	 * @param {object} [mSettings] Initial settings for the new control
	 *
	 * @class
	 * View of the PlanningCalendar.
	 *
	 * The PlanningCalendarView defines the granularity of the output. It defines what type of intervals (hours, days or months)
	 * and how many intervals are shown.
	 * @extends sap.ui.core.Element
	 * @version 1.38.4
	 *
	 * @constructor
	 * @public
	 * @since 1.34.0
	 * @alias sap.m.PlanningCalendarView
	 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
	 */
	var PlanningCalendarView = Element.extend("sap.m.PlanningCalendarView", /** @lends sap.m.PlanningCalendarView.prototype */ { metadata : {

		library : "sap.m",
		properties : {

			/**
			 * Key of the view. This must be set to identify the used view in the PlanningCalendar
			 */
			key : {type : "string", group : "Data", defaultValue : null},

			/**
			 * Type of the intervals of the row. Default is Hour.
			 */
			intervalType : {type : "sap.ui.unified.CalendarIntervalType", group : "Appearance", defaultValue : sap.ui.unified.CalendarIntervalType.Hour},

			/**
			 * Description of the PlanningCalendarView
			 */
			description : {type : "string", group : "Data"},

			/**
			 * Number of intervals (defined with intervalType) that are displayed on small size (phones).
			 *
			 * Note: It is not only the screen size which is used to determine the available space, the size of the PlanningCalendar is used as well.
			 */
			intervalsS : {type : "int", group : "Appearance", defaultValue : 6},

			/**
			 * Number of intervals (defined with intervalType) that are displayed on medium size (tablet)
			 *
			 * Note: It is not only the screen size which is used to determine the available space, the size of the PlanningCalendar is used as well.
			 */
			intervalsM : {type : "int", group : "Appearance", defaultValue : 8},

			/**
			 * Number of intervals (defined with intervalType) that are displayed on large size (desktop)
			 *
			 * Note: It is not only the screen size which is used to determine the available space, the size of the PlanningCalendar is used as well.
			 */
			intervalsL : {type : "int", group : "Appearance", defaultValue : 12},

			/**
			 * If set subintervals are shown.
			 *
			 * If the interval type is Hour, quarter hours are shown.
			 *
			 * If the interval type is Day, hours are shown.
			 *
			 * If the interval type is Month, days are shown.
			 */
			showSubIntervals : {type : "boolean", group : "Appearance", defaultValue : false}

		}
	}});

	return PlanningCalendarView;

}, /* bExport= */ true);

redpajama_set_name: RedPajamaGithub


text:
require 'mongoid/association/embedded/cyclic'
require 'mongoid/association/embedded/embedded_in'
require 'mongoid/association/embedded/embeds_many'
require 'mongoid/association/embedded/embeds_one'


text:
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { Injectable } from '@angular/core';
import { CoreLoggerProvider } from '@providers/logger';
import { CoreSitesProvider, CoreSiteSchema } from '@providers/sites';
import { CoreTextUtilsProvider } from '@providers/utils/text';
import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreFileProvider } from '@providers/file';
import { CoreFileUploaderProvider } from '@core/fileuploader/providers/fileuploader';
import { SQLiteDB } from '@classes/sqlitedb';
import { AddonModDataSubfieldData } from './data';

/**
 * Entry action stored offline.
 */
export interface AddonModDataOfflineAction {
    dataid: number;
    courseid: number;
    groupid: number;
    action: string;
    entryid: number; // Negative for offline entries.
    fields: AddonModDataSubfieldData[];
    timemodified: number;
}

/**
 * Service to handle Offline data.
 */
@Injectable()
export class AddonModDataOfflineProvider {

    protected logger;

    // Variables for database.
    static DATA_ENTRY_TABLE = 'addon_mod_data_entry_1';
    protected siteSchema: CoreSiteSchema = {
        name: 'AddonModDataOfflineProvider',
        version: 1,
        tables: [
            {
                name: AddonModDataOfflineProvider.DATA_ENTRY_TABLE,
                columns: [
                    {
                        name: 'dataid',
                        type: 'INTEGER'
                    },
                    {
                        name: 'courseid',
                        type: 'INTEGER'
                    },
                    {
                        name: 'groupid',
                        type: 'INTEGER'
                    },
                    {
                        name: 'action',
                        type: 'TEXT'
                    },
                    {
                        name: 'entryid',
                        type: 'INTEGER'
                    },
                    {
                        name: 'fields',
                        type: 'TEXT'
                    },
                    {
                        name: 'timemodified',
                        type: 'INTEGER'
                    }
                ],
                primaryKeys: ['dataid', 'entryid', 'action']
            }
        ],
        migrate(db: SQLiteDB, oldVersion: number, siteId: string): Promise<any> | void {
            if (oldVersion == 0) {
                // Move the records from the old table.
                const newTable = AddonModDataOfflineProvider.DATA_ENTRY_TABLE;
                const oldTable = 'addon_mod_data_entry';

                return db.tableExists(oldTable).then(() => {
                    return db.insertRecordsFrom(newTable, oldTable).then(() => {
                        return db.dropTable(oldTable);
                    });
                }).catch(() => {
                    // Old table does not exist, ignore.
                });
            }
        }
    };

    constructor(logger: CoreLoggerProvider, private sitesProvider: CoreSitesProvider, private textUtils: CoreTextUtilsProvider,
            private fileProvider: CoreFileProvider, private fileUploaderProvider: CoreFileUploaderProvider,
            private utils: CoreUtilsProvider) {
        this.logger = logger.getInstance('AddonModDataOfflineProvider');
        this.sitesProvider.registerSiteSchema(this.siteSchema);
    }

    /**
     * Delete all the actions of an entry.
     *
     * @param  {number} dataId   Database ID.
     * @param  {number} entryId  Database entry ID.
     * @param  {string} [siteId] Site ID. If not defined, current site.
     * @return {Promise<any>}         Promise resolved if deleted, rejected if failure.
     */
    deleteAllEntryActions(dataId: number, entryId: number, siteId?: string): Promise<any> {
        return this.getEntryActions(dataId, entryId, siteId).then((actions) => {
            const promises = [];

            actions.forEach((action) => {
                promises.push(this.deleteEntry(dataId, entryId, action.action, siteId));
            });

            return Promise.all(promises);
        });
    }

    /**
     * Delete an stored entry.
     *
     * @param  {number} dataId       Database ID.
     * @param  {number} entryId      Database entry Id.
     * @param  {string} action       Action to be done
     * @param  {string} [siteId]     Site ID. If not defined, current site.
     * @return {Promise<any>}             Promise resolved if deleted, rejected if failure.
     */
    deleteEntry(dataId: number, entryId: number, action: string, siteId?: string): Promise<any> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            return this.deleteEntryFiles(dataId, entryId, action, site.id).then(() => {
                return site.getDb().deleteRecords(AddonModDataOfflineProvider.DATA_ENTRY_TABLE, {dataid: dataId, entryid: entryId,
                    action: action});
            });
        });
    }

    /**
     * Delete entry offline files.
     *
     * @param  {number} dataId Database ID.
     * @param  {number} entryId Database entry ID.
     * @param  {string} action Action to be done.
     * @param  {string} [siteId] Site ID. If not defined, current site.
     * @return {Promise<any>} Promise resolved if deleted, rejected if failure.
     */
    protected deleteEntryFiles(dataId: number, entryId: number, action: string, siteId?: string): Promise<any> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            return this.getEntry(dataId, entryId, action, site.id).then((entry) => {
                if (!entry.fields) {
                    return;
                }

                const promises = [];

                entry.fields.forEach((field) => {
                    const value = this.textUtils.parseJSON(field.value);
                    if (!value.offline) {
                        return;
                    }

                    const promise = this.getEntryFieldFolder(dataId, entryId, field.fieldid, site.id).then((folderPath) => {
                        return this.fileUploaderProvider.getStoredFiles(folderPath);
                    }).then((files) => {
                        return this.fileUploaderProvider.clearTmpFiles(files);
                    }).catch(() => {
                        // Files not found, ignore.
                    });

                    promises.push(promise);
                });

                return Promise.all(promises);
            }).catch(() => {
                // Entry not found, ignore.
            });
        });
    }

    /**
     * Get all the stored entry data from all the databases.
     *
     * @param {string} [siteId] Site ID. If not defined, current site.
     * @return {Promise<AddonModDataOfflineAction[]>} Promise resolved with entries.
     */
    getAllEntries(siteId?: string): Promise<AddonModDataOfflineAction[]> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            return site.getDb().getAllRecords(AddonModDataOfflineProvider.DATA_ENTRY_TABLE);
        }).then((entries) => {
            return entries.map(this.parseRecord.bind(this));
        });
    }

    /**
     * Get all the stored entry actions from a certain database, sorted by modification time.
     *
     * @param  {number} dataId Database ID.
     * @param  {string} [siteId] Site ID. If not defined, current site.
     * @return {Promise<AddonModDataOfflineAction[]>} Promise resolved with entries.
     */
    getDatabaseEntries(dataId: number, siteId?: string): Promise<AddonModDataOfflineAction[]> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            return site.getDb().getRecords(AddonModDataOfflineProvider.DATA_ENTRY_TABLE, {dataid: dataId}, 'timemodified');
        }).then((entries) => {
            return entries.map(this.parseRecord.bind(this));
        });
    }

    /**
     * Get an stored entry data.
     *
     * @param  {number} dataId      Database ID.
     * @param  {number} entryId     Database entry Id.
     * @param  {string} action      Action to be done
     * @param  {string} [siteId]    Site ID. If not defined, current site.
     * @return {Promise<AddonModDataOfflineAction>} Promise resolved with entry.
     */
    getEntry(dataId: number, entryId: number, action: string, siteId?: string): Promise<AddonModDataOfflineAction> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            return site.getDb().getRecord(AddonModDataOfflineProvider.DATA_ENTRY_TABLE, {dataid: dataId, entryid: entryId,
                    action: action});
        }).then((entry) => {
            return this.parseRecord(entry);
        });
    }

    /**
     * Get an all stored entry actions data.
     *
     * @param  {number} dataId      Database ID.
     * @param  {number} entryId     Database entry Id.
     * @param  {string} [siteId]    Site ID. If not defined, current site.
     * @return {Promise<AddonModDataOfflineAction[]>} Promise resolved with entry actions.
     */
    getEntryActions(dataId: number, entryId: number, siteId?: string): Promise<AddonModDataOfflineAction[]> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            return site.getDb().getRecords(AddonModDataOfflineProvider.DATA_ENTRY_TABLE, {dataid: dataId, entryid: entryId});
        }).then((entries) => {
            return entries.map(this.parseRecord.bind(this));
        });
    }

    /**
     * Check if there are offline entries to send.
     *
     * @param  {number} dataId    Database ID.
     * @param  {string} [siteId]  Site ID. If not defined, current site.
     * @return {Promise<any>}          Promise resolved with boolean: true if has offline answers, false otherwise.
     */
    hasOfflineData(dataId: number, siteId?: string): Promise<any> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            return this.utils.promiseWorks(
                site.getDb().recordExists(AddonModDataOfflineProvider.DATA_ENTRY_TABLE, {dataid: dataId})
            );
        });
    }

    /**
     * Get the path to the folder where to store files for offline files in a database.
     *
     * @param  {number} dataId      Database ID.
     * @param  {string} [siteId]    Site ID. If not defined, current site.
     * @return {Promise<string>}    Promise resolved with the path.
     */
    protected getDatabaseFolder(dataId: number, siteId?: string): Promise<string> {
        return this.sitesProvider.getSite(siteId).then((site) => {

            const siteFolderPath = this.fileProvider.getSiteFolder(site.getId()),
                folderPath = 'offlinedatabase/' + dataId;

            return this.textUtils.concatenatePaths(siteFolderPath, folderPath);
        });
    }

    /**
     * Get the path to the folder where to store files for a new offline entry.
     *
     * @param  {number} dataId      Database ID.
     * @param  {number} entryId     The ID of the entry.
     * @param  {number} fieldId     Field ID.
     * @param  {string} [siteId]    Site ID. If not defined, current site.
     * @return {Promise<string>}    Promise resolved with the path.
     */
    getEntryFieldFolder(dataId: number, entryId: number, fieldId: number, siteId?: string): Promise<string> {
        return this.getDatabaseFolder(dataId, siteId).then((folderPath) => {
            return this.textUtils.concatenatePaths(folderPath, entryId + '_' + fieldId);
        });
    }

    /**
     * Parse "fields" of an offline record.
     *
     * @param {any} record Record object
     * @return {AddonModDataOfflineAction} Record object with columns parsed.
     */
    protected parseRecord(record: any): AddonModDataOfflineAction {
        record.fields = this.textUtils.parseJSON(record.fields);

        return record;
    }

    /**
     * Save an entry data to be sent later.
     *
     * @param  {number} dataId          Database ID.
     * @param  {number} entryId         Database entry Id. If action is add entryId should be 0 and -timemodified will be used.
     * @param  {string} action          Action to be done to the entry: [add, edit, delete, approve, disapprove]
     * @param  {number} courseId        Course ID of the database.
     * @param  {number} [groupId]       Group ID. Only provided when adding.
     * @param  {any[]}  [fields]        Array of field data of the entry if needed.
     * @param  {number} [timemodified]  The time the entry was modified. If not defined, current time.
     * @param  {string} [siteId]        Site ID. If not defined, current site.
     * @return {Promise<any>}           Promise resolved if stored, rejected if failure.
     */
    saveEntry(dataId: number, entryId: number, action: string, courseId: number, groupId?: number,
            fields?: AddonModDataSubfieldData[], timemodified?: number, siteId?: string): Promise<any> {

        return this.sitesProvider.getSite(siteId).then((site) => {
            timemodified = timemodified || new Date().getTime();
            entryId = typeof entryId == 'undefined' || entryId === null ? -timemodified : entryId;
            const entry = {
                    dataid: dataId,
                    courseid: courseId,
                    groupid: groupId,
                    action: action,
                    entryid: entryId,
                    fields: JSON.stringify(fields || []),
                    timemodified: timemodified
                };

            return site.getDb().insertRecord(AddonModDataOfflineProvider.DATA_ENTRY_TABLE, entry);
        });
    }

}


text:
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 */

/*
 * Copyright 2014 AT&T
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.att.api.rest;

/**
 * Holds any errors generated by the RESTClient.
 *
 * @author pk9069
 * @version 1.0
 * @since 1.0
 */
public class RESTException extends Exception {
    /** Serial version UDI. */
    private static final long serialVersionUID = -6874042744590915838L;

    /** Http status code. */
    private final int statusCode;

    /** Error message. */
    private final String errorMessage;

    /**
     * Creates a RESTException with the specified error message.
     *
     * @param errorMessage error message
     */
    public RESTException(final String errorMessage) {
        this(-1, errorMessage);
    }

    /**
     * Creates a RESTException that Wraps a Throwable object.
     *
     * @param cause Throwable object to wrap
     */
    public RESTException(final Throwable cause) {
        super(cause);
        this.statusCode = -1;
        this.errorMessage = cause.getMessage();
    }

    /**
     * Creates a RESTException object with the specified status code and error
     * message.
     *
     * @param statusCode http status code
     * @param errorMessage error message
     */
    public RESTException(final int statusCode, final String errorMessage) {
        super(errorMessage);
        this.statusCode = statusCode;
        this.errorMessage = errorMessage;
    }

    /**
     * Gets http status code or -1 if there wasn't any.
     *
     * @return status code
     */
    public int getStatusCode() {
        return this.statusCode;
    }

    /**
     * Gets error message.
     *
     * @return error message
     */
    public String getErrorMessage() {
        return this.errorMessage;
    }
}


text:
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.templates.subsystems.Attack3Joystick;

import edu.wpi.first.wpilibj.buttons.JoystickButton;

/**
 * This class is the glue that binds the controls on the physical operator
 * interface to the commands and command groups that allow control of the robot.
 */
public class OI {
    //// CREATING BUTTONS
    // One type of button is a joystick button which is any button on a joystick.
    // You create one by telling it which joystick it's on and which button
    // number it is.

	// Driver controls
    public Attack3Joystick driverLeftStick = new Attack3Joystick(0);    //2015 = 0
    public Attack3Joystick driverRightStick = new Attack3Joystick(1);   //
    public JoystickButton rightButton2 = new JoystickButton(driverRightStick, 2);
    public JoystickButton rightButton3 = new JoystickButton(driverRightStick, 3);
    public JoystickButton recordButton = new JoystickButton(driverRightStick, 4);
    public JoystickButton playbackButton = new JoystickButton(driverRightStick, 5);

    public JoystickButton intakeButton = new JoystickButton(driverLeftStick, 1);
    public JoystickButton outtakeButton = new JoystickButton(driverRightStick, 1); //Hope you like the outtake Yasmin
    //Public JoystickButton playbackButton = new JoysticckButton(driverRightStick, trigger)
    // Operator controls
    public static final int[] ELEVATOR_BUTTONS = {1,7,10,11};//6 = 1
    public static final int[] ELEVATOR_LEVEL = {0,1,2,3,4};
    public Attack3Joystick operatorStick = new Attack3Joystick(2);
    public JoystickButton[] elevatorLevel = new JoystickButton[5];

     public OI() {
    	for (int i = 0; i < elevatorLevel.length-1; i++) {//creates 4 new joystick buttons for operator elevator
			elevatorLevel[i] = new JoystickButton(operatorStick, ELEVATOR_BUTTONS[i]);
		}
    }

    // There are a few additional built in buttons you can use. Additionally,
    // by subclassing Button you can create custom triggers and bind those to
    // commands the same as any other Button.

    //// TRIGGERING COMMANDS WITH BUTTONS
    // Once you have a button, it's trivial to bind it to a button in one of
    // three ways:

    // Start the command when the button is pressed and let it run the command
    // until it is finished as determined by it's isFinished method.
    // button.whenPressed(new ExampleCommand());

    // Run the command while the button is being held down and interrupt it once
    // the button is released.
    // button.whileHeld(new ExampleCommand());

    // Start the command when the button is released  and let it run the command
    // until it is finished as determined by it's isFinished method.
    // button.whenReleased(new ExampleCommand());

}


text:
using Reconfig.Storage;

namespace Reconfig.Domain.Repositories
{
    public interface IDomainRepository<TEntity> : IReadWriteRepository<TEntity, string, string>
    {
    }
}


text:
                {{vm.nut.name}}

                                    {{permit.name}}

                                    功能类型,机构管理,所属角色,系统管理员


text:
package example;

import java.util.Properties;
import javax.cache.Cache;
import javax.cache.Caching;
import javax.cache.configuration.MutableConfiguration;
import javax.cache.spi.CachingProvider;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.common.serialization.Serde;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.KafkaStreams;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.kstream.KStream;
import org.apache.kafka.streams.kstream.KStreamBuilder;

public class Executor {

    private final String input_topic;
    private final String output_topic;

    private final Serde<String> stringSerde = Serdes.String();
    private final Serde<LogLine> logLineSerde = Serdes.serdeFrom(new LogLineSerde(), new LogLineSerde());

    private final Properties props;
    private final Properties cacheConfiguration;

    public Executor(String inputTopic, String outputTopic, Properties cacheConfiguration) {
        this.cacheConfiguration = cacheConfiguration;
        this.input_topic = inputTopic;
        this.output_topic = outputTopic;
        Properties props = new Properties();
        props.put(StreamsConfig.APPLICATION_ID_CONFIG, "streams-wordcount-" + System.currentTimeMillis());
        props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
        props.put(StreamsConfig.ZOOKEEPER_CONNECT_CONFIG, "localhost:2181");
        props.put(StreamsConfig.KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName());
        props.put(StreamsConfig.VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName());
        props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
        this.props = props;

    }

    public void run() throws Exception {
        CachingProvider cachingProvider = Caching.getCachingProvider();
        try (javax.cache.CacheManager cacheManager = cachingProvider.getCacheManager(
            cachingProvider.getDefaultURI(),
            cachingProvider.getDefaultClassLoader(),
            cacheConfiguration);) {
            try (Cache<String, String> cache
                = cacheManager.createCache("ip-location-cache", new MutableConfiguration<>());) {

                KStreamBuilder builder = new KStreamBuilder();
                KStream<String, String> startLines = builder.stream(stringSerde, stringSerde, input_topic);
                MockGeoLocationService geoLocationService = new MockGeoLocationService();

                KStream<String, LogLine> finalLines = startLines
                    .mapValues((value) -> {
                        return LogLine.parse(value);
                    })
                    .mapValues((LogLine logLine) -> {
                        String ip = logLine.getIp();
                        if (ip != null) {
                            String location = cache.get(ip);
                            if (location == null) {
                                location = geoLocationService.findLocation(ip);
                                cache.put(ip, location);
                            }
                            logLine.setLocation(location);
                        }
                        return logLine;
                    });

                finalLines.to(stringSerde, logLineSerde, output_topic);
                KafkaStreams streams = new KafkaStreams(builder, props);
                streams.start();
                Thread.sleep(5000L);
                streams.close();
            }
        }
    }

}


text:
<?php
	function spamcheck($field) {
	  // Sanitize e-mail address
	  $field=filter_var($field, FILTER_SANITIZE_EMAIL);
	  // Validate e-mail address
	  if(filter_var($field, FILTER_VALIDATE_EMAIL)) {
	    return TRUE;
	  } else {
	    return FALSE;
	  }
	}
	?>


text:
#include "sky/engine/config.h"

#include "sky/engine/platform/graphics/Canvas2DLayerManager.h"

#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/wtf/StdLibExtras.h"

namespace {

enum {
    DefaultMaxBytesAllocated = 64*1024*1024,
    DefaultTargetBytesAllocated = 16*1024*1024,
};

} // unnamed namespace

namespace blink {

Canvas2DLayerManager::Canvas2DLayerManager()
    : m_bytesAllocated(0)
    , m_maxBytesAllocated(DefaultMaxBytesAllocated)
    , m_targetBytesAllocated(DefaultTargetBytesAllocated)
    , m_limitPendingFramesTimer(this, &Canvas2DLayerManager::limitPendingFramesTimerFired)
{
}

Canvas2DLayerManager::~Canvas2DLayerManager()
{
    ASSERT(!m_bytesAllocated);
    ASSERT(!m_layerList.head());
}

void Canvas2DLayerManager::init(size_t maxBytesAllocated, size_t targetBytesAllocated)
{
    ASSERT(maxBytesAllocated >= targetBytesAllocated);
    m_maxBytesAllocated = maxBytesAllocated;
    m_targetBytesAllocated = targetBytesAllocated;
    if (m_limitPendingFramesTimer.isActive())
        m_limitPendingFramesTimer.stop();
}

Canvas2DLayerManager& Canvas2DLayerManager::get()
{
    DEFINE_STATIC_LOCAL(Canvas2DLayerManager, manager, ());
    return manager;
}

void Canvas2DLayerManager::limitPendingFramesTimerFired(Timer<Canvas2DLayerManager>*)
{
    Canvas2DLayerBridge* layer = m_layerList.head();
    while (layer) {
        Canvas2DLayerBridge* currentLayer = layer;
        // must increment iterator before calling limitPendingFrames, which
        // may result in the layer being removed from the list.
        layer = layer->next();
        currentLayer->limitPendingFrames();
    }
}

void Canvas2DLayerManager::layerDidDraw(Canvas2DLayerBridge* layer)
{
    if (isInList(layer)) {
        if (layer != m_layerList.head()) {
            m_layerList.remove(layer);
            m_layerList.push(layer); // Set as MRU
        }
    }

    if (!m_limitPendingFramesTimer.isActive())
        m_limitPendingFramesTimer.startOneShot(0, FROM_HERE);
}

void Canvas2DLayerManager::layerTransientResourceAllocationChanged(Canvas2DLayerBridge* layer, intptr_t deltaBytes)
{
    ASSERT((intptr_t)m_bytesAllocated + deltaBytes >= 0);
    m_bytesAllocated = (intptr_t)m_bytesAllocated + deltaBytes;
    if (!isInList(layer) && layer->hasTransientResources()) {
        m_layerList.push(layer);
    } else if (isInList(layer) && !layer->hasTransientResources()) {
        m_layerList.remove(layer);
        layer->setNext(0);
        layer->setPrev(0);
    }

    if (deltaBytes > 0)
        freeMemoryIfNecessary();
}

void Canvas2DLayerManager::freeMemoryIfNecessary()
{
    if (m_bytesAllocated >= m_maxBytesAllocated) {
        // Pass 1: Free memory from caches
        Canvas2DLayerBridge* layer = m_layerList.tail(); // LRU
        while (layer && m_bytesAllocated > m_targetBytesAllocated) {
            Canvas2DLayerBridge* currentLayer = layer;
            layer = layer->prev();
            currentLayer->freeMemoryIfPossible(m_bytesAllocated - m_targetBytesAllocated);
            ASSERT(isInList(currentLayer) == currentLayer->hasTransientResources());
        }

        // Pass 2: Flush canvases
        layer = m_layerList.tail();
        while (m_bytesAllocated > m_targetBytesAllocated && layer) {
            Canvas2DLayerBridge* currentLayer = layer;
            layer = layer->prev();
            currentLayer->flush();
            currentLayer->freeMemoryIfPossible(m_bytesAllocated - m_targetBytesAllocated);
            ASSERT(isInList(currentLayer) == currentLayer->hasTransientResources());
        }
    }
}

bool Canvas2DLayerManager::isInList(Canvas2DLayerBridge* layer) const
{
    return layer->prev() || m_layerList.head() == layer;
}

} // namespace blink


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="linchom.com.linchomspace.mine.HeadImage_activity">
    <RelativeLayout
        android:id="@+id/rl_gai"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:background="@color/main_style"
        >
        <!--<ImageView-->
            <!--android:id="@+id/iv_back"-->
            <!--android:layout_width="20dp"-->
            <!--android:layout_height="20dp"-->
            <!--android:layout_centerVertical="true"-->
            <!--android:layout_marginLeft="10dp"-->
            <!--android:src="@drawable/article_back"-->
            <!--/>-->
        <TextView
            android:id="@+id/tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="账号管理"
            android:textColor="#FFF"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:textSize="18sp"
            />
        <TextView
            android:id="@+id/tv_ed"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:text="编 辑"
            android:layout_marginRight="10dp"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:textColor="#FFF"
            android:textSize="18sp"
            />
    </RelativeLayout>

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:focusable="false"
            android:focusableInTouchMode="true"
            android:layout_below="@+id/rl_gai">

            <RelativeLayout
                android:id="@+id/rl_h"
                android:layout_marginTop="12dp"
                android:layout_width="match_parent"
                android:layout_height="70dp"
                android:layout_marginBottom="12dp"
                android:background="#fff"

                >
                <TextView
                    android:id="@+id/tv_h"
                    android:layout_width="wrap_content"
                    android:layout_height="30dp"
                    android:text="头像"
                    android:textSize="18dp"
                    android:textColor="#212121"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    />

                <ImageView
                    android:id="@+id/iv_user_photo"
                    android:layout_width="60dp"
                    android:layout_height="60dp"
                    android:src="@drawable/kid"
                   android:layout_centerVertical="true"
                    android:layout_alignParentEnd="true"
                    android:layout_marginRight="20dp"
                    />
            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#ccc"
                android:layout_below="@id/rl_h"/>

            <RelativeLayout
                android:id="@+id/rl_h1"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@id/rl_h"
                android:background="#fff"
                android:layout_marginBottom="0.5dp"

                >
                <TextView
                    android:id="@+id/tv_h1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="昵称"
                    android:textColor="#212121"
                    android:textSize="17dp"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    />
                <TextView
                    android:id="@+id/tv_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Monologue丶95"

                    android:textColor="#b9b5b5"
                    android:textSize="14sp"
                    android:background="@null"
                    android:layout_marginRight="20dp"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    />

            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="0.1dp"
                android:background="#000"
                android:layout_below="@id/rl_h1"/>
            <RelativeLayout
                android:id="@+id/rl_add"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@+id/rl_h1"
                android:background="#fff"
                android:layout_marginBottom="0.5dp"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="性别"
                    android:textSize="17dp"
                    android:textColor="#212121"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    />
                <TextView
                    android:id="@+id/tv_add"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="女"
                    android:textSize="14sp"
                    android:textColor="#b9b5b5"
                    android:background="@null"
                    android:layout_centerVertical="true"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="20dp"
                    />

            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#808080"
                android:layout_below="@id/rl_add"/>

            <RelativeLayout
                android:background="#fff"
                android:id="@+id/rl_h2"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@+id/rl_add"
                android:layout_marginBottom="0.5dp"
                >
                <TextView
                    android:id="@+id/tv_h2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="生日"
                    android:textColor="#212121"
                    android:textSize="17dp"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    />
                <TextView
                    android:id="@+id/tv_birthday"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="1996-09-08"
                    android:textSize="14sp"
                    android:background="@null"
                    android:textColor="#b9b5b5"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="20dp"
                    android:layout_centerVertical="true"

                    />
                <!--<ImageView-->
                <!--android:id="@+id/iv_go2"-->
                <!--android:layout_width="wrap_content"-->
                <!--android:layout_height="30dp"-->
                <!--android:src="@drawable/iv_editinfo"-->
                <!--android:layout_centerVertical="true"-->
                <!--android:layout_marginRight="8dp"-->
                <!--android:layout_alignParentRight="true"-->
                <!--/>-->
            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#808080"
                android:layout_below="@id/rl_h2"/>

            <RelativeLayout
                android:id="@+id/rl_h3"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@id/rl_h2"
                android:background="#fff"
                android:layout_marginBottom="1dp"
                >
                <TextView
                    android:id="@+id/tv_office_phone2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="公司电话"
                    android:textColor="#212121"
                    android:textSize="17dp"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    />
                <TextView
                    android:id="@+id/tv_office_phone"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="4001-123123"
                    android:textSize="14sp"
                    android:textColor="#b9b5b5"
                    android:background="@null"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="20dp"
                    android:layout_centerVertical="true"

                    />
                <!--<ImageView-->
                <!--android:id="@+id/iv_go3"-->
                <!--android:layout_width="wrap_content"-->
                <!--android:layout_height="30dp"-->
                <!--android:layout_marginRight="8dp"-->
                <!--android:src="@drawable/iv_editinfo"-->
                <!--android:layout_centerVertical="true"-->
                <!--android:layout_alignParentRight="true"-->
                <!--/>-->
            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#808080"
                android:layout_below="@id/rl_h3"/>
            <RelativeLayout
                android:id="@+id/rl_h4"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@id/rl_h3"
                android:background="#fff"
                android:layout_marginBottom="12dp"
                >

                <TextView
                    android:id="@+id/tv_mobile_phone"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="18006245896"
                    android:textSize="14sp"
                    android:background="@null"
                    android:textColor="#b9b5b5"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="20dp"

                    android:layout_centerVertical="true"
                    />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="手机号"
                    android:textColor="#212121"
                    android:textSize="17sp"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"

                    android:id="@+id/textView3" />

            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#808080"
                android:layout_below="@id/rl_h4"/>
            <RelativeLayout
                android:id="@+id/rl_h5"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@id/rl_h4"
                android:background="#fff"
                android:layout_marginBottom="0.5dp"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="家庭电话"
                    android:textColor="#212121"
                    android:textSize="17sp"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    android:id="@+id/textView" />

                <TextView
                    android:id="@+id/tv_home_phone"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="6008589"

                    android:textSize="14sp"
                    android:background="@null"
                    android:textColor="#b9b5b5"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="20dp"

                    android:layout_centerVertical="true"

                    />
                <!--<ImageView-->
                <!--android:id="@+id/iv_go5"-->
                <!--android:layout_width="wrap_content"-->
                <!--android:layout_height="30dp"-->
                <!--android:layout_marginRight="8dp"-->
                <!--android:src="@drawable/iv_editinfo"-->
                <!--android:layout_centerVertical="true"-->
                <!--android:layout_alignParentRight="true"-->
                <!--/>-->
            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#808080"
                android:layout_below="@id/rl_h5"/>

            <RelativeLayout
                android:id="@+id/rl_h6"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@id/rl_h5"
                android:background="#fff"
                android:layout_marginBottom="0.5dp"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="邮箱"
                    android:textColor="#212121"
                    android:textSize="17sp"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    />
                <TextView
                    android:id="@+id/tv_email"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="18006245896@163.com"
                    android:textSize="14sp"
                    android:background="@null"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="20dp"

                    android:textColor="#b9b5b5"
                    android:layout_centerVertical="true"

                    />
                <!--<ImageView-->
                <!--android:id="@+id/iv_go6"-->
                <!--android:layout_width="wrap_content"-->
                <!--android:layout_height="30dp"-->
                <!--android:src="@drawable/iv_editinfo"-->
                <!--android:layout_centerVertical="true"-->
                <!--android:layout_marginRight="8dp"-->
                <!--android:layout_alignParentRight="true"-->
                <!--/>-->
            </RelativeLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#808080"
                android:layout_below="@id/rl_h6"/>
            <RelativeLayout
                android:id="@+id/rl_h7"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_below="@id/rl_h6"
                android:background="#fff"
                android:layout_marginBottom="0.5dp"
                >
                <TextView
                    android:id="@+id/msn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="MSN"
                    android:textColor="#212121"
                    android:textSize="17sp"
                    android:layout_marginLeft="20dp"
                    android:layout_centerVertical="true"
                    />
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="18006245896@msn.com"
                    android:textSize="14sp"
                    android:background="@null"
                    android:layout_alignParentRight="true"
                    android:layout_marginRight="20dp"
                    android:textColor="#b9b5b5"
                    android:layout_centerVertical="true"
                    />

            </RelativeLayout>
            <View
                android:id="@+id/v_line"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:background="#ccc"
                android:layout_below="@id/rl_h7"/>
            <RelativeLayout
                android:id="@+id/rl_zh"
                android:layout_below="@id/v_line"
                android:layout_width="match_parent"
                android:background="#fff"
                android:layout_height="35dp"
                android:layout_marginBottom="0.5dp">
                <!--<TextView-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content"-->
                    <!--android:textSize="17sp"-->
                    <!--android:layout_marginLeft="20dp"-->
                    <!--android:layout_centerVertical="true"-->
                    <!--android:text="签名:"-->
                    <!--android:textColor="#212121"-->
                    <!--/>-->
                <!--<TextView-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content"-->
                    <!--android:text="我不想生活在这里了"-->
                    <!--android:textSize="14sp"-->
                    <!--android:background="@null"-->
                    <!--android:textColor="#b9b5b5"-->
                    <!--android:layout_alignParentRight="true"-->
                    <!--android:layout_marginRight="20dp"-->
                    <!--android:layout_centerVertical="true"-->

                    <!--/>-->
            <!--</RelativeLayout>-->
            <!--<View-->
                <!--android:layout_width="match_parent"-->
                <!--android:layout_height="0dp"-->
                <!--android:background="#808080"-->
                <!--android:layout_below="@id/rl_zh"-->
                <!--/>-->
            <!--<RelativeLayout-->
                <!--android:id="@+id/rl_switch"-->
                <!--android:layout_below="@id/rl_zh"-->
                <!--android:layout_width="match_parent"-->
                <!--android:layout_height="35dp"-->
                <!--android:background="#fff"-->
                <!--android:layout_marginBottom="0.5dp">-->
                <!--<TextView-->
                    <!--android:id="@+id/tv_h8"-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content"-->
                    <!--android:text="简介:"-->
                    <!--android:textColor="#212121"-->
                    <!--android:textSize="17sp"-->
                    <!--android:layout_marginLeft="20dp"-->
                    <!--android:layout_centerVertical="true" />-->

                <!--<TextView-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content"-->
                    <!--android:text="我不想生活在这里了"-->
                    <!--android:textSize="14sp"-->
                    <!--android:background="@null"-->
                    <!--android:layout_marginRight="20dp"-->
                    <!--android:textColor="#b9b5b5"-->

                    <!--android:layout_alignTop="@+id/tv_h8"-->
                    <!--android:layout_alignParentEnd="true"-->
                    <!--android:layout_marginEnd="20dp"-->
                    <!--android:id="@+id/textView4" />-->

            </RelativeLayout>
            <!--<View-->
                <!--android:layout_width="match_parent"-->
                <!--android:layout_height="0.1dp"-->
                <!--android:background="#d9d5d5"-->
                <!--android:layout_below="@id/rl_switch"-->
                />

        </RelativeLayout>

</RelativeLayout>


text:
import pytest

from wal_e import exception
from wal_e import worker

class FakeTarPartition(object):
    """Implements enough protocol to test concurrency semantics."""
    def __init__(self, num_members, explosive=False):
        self._explosive = explosive
        self.num_members = num_members

    def __len__(self):
        return self.num_members

class FakeUploader(object):
    """A no-op uploader that makes affordance for fault injection."""

    def __call__(self, tpart):
        if tpart._explosive:
            raise tpart._explosive

        return tpart

class Explosion(Exception):
    """Marker type of injected faults."""
    pass

def make_pool(max_concurrency, max_members):
    """Set up a pool with a FakeUploader"""
    return worker.TarUploadPool(FakeUploader(),
                                max_concurrency, max_members)

def test_simple():
    """Simple case of uploading one partition."""
    pool = make_pool(1, 1)
    pool.put(FakeTarPartition(1))
    pool.join()

def test_not_enough_resources():
    """Detect if a too-large segment can never complete."""
    pool = make_pool(1, 1)

    with pytest.raises(exception.UserCritical):
        pool.put(FakeTarPartition(2))

    pool.join()

def test_simple_concurrency():
    """Try a pool that cannot execute all submitted jobs at once."""
    pool = make_pool(1, 1)

    for i in range(3):
        pool.put(FakeTarPartition(1))

    pool.join()

def test_fault_midstream():
    """Test if a previous upload fault is detected in calling .put.

    This case is seen while pipelining many uploads in excess of the
    maximum concurrency.

    NB: This test is critical as to prevent failed uploads from
    failing to notify a caller that the entire backup is incomplete.
    """
    pool = make_pool(1, 1)

    # Set up upload doomed to fail.
    tpart = FakeTarPartition(1, explosive=Explosion('Boom'))
    pool.put(tpart)

    # Try to receive the error through adding another upload.
    tpart = FakeTarPartition(1)
    with pytest.raises(Explosion):
        pool.put(tpart)

def test_fault_join():
    """Test if a fault is detected when .join is used.

    This case is seen at the end of a series of uploads.

    NB: This test is critical as to prevent failed uploads from
    failing to notify a caller that the entire backup is incomplete.
    """
    pool = make_pool(1, 1)

    # Set up upload doomed to fail.
    tpart = FakeTarPartition(1, explosive=Explosion('Boom'))
    pool.put(tpart)

    # Try to receive the error while finishing up.
    with pytest.raises(Explosion):
        pool.join()

def test_put_after_join():
    """New jobs cannot be submitted after a .join

    This is mostly a re-check to detect programming errors.
    """
    pool = make_pool(1, 1)

    pool.join()

    with pytest.raises(exception.UserCritical):
        pool.put(FakeTarPartition(1))

def test_pool_concurrent_success():
    pool = make_pool(4, 4)

    for i in range(30):
        pool.put(FakeTarPartition(1))

    pool.join()

def test_pool_concurrent_failure():
    pool = make_pool(4, 4)

    parts = [FakeTarPartition(1) for i in range(30)]

    exc = Explosion('boom')
    parts[27]._explosive = exc

    with pytest.raises(Explosion) as e:
        for part in parts:
            pool.put(part)

        pool.join()

    assert e.value is exc


text:
using System;
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Kliva.Controls
{
    /// <summary>
    /// An adaptive GridView that restricts item's aspect ratio to MinItemWidth and MinItemHeight values
    /// </summary>
    public class AdaptiveGridView : GridView
    {
        #region DependencyProperties

        /// <summary>
        /// Minimum height for item
        /// </summary>
        public double MinItemHeight
        {
            get { return (double)GetValue(MinItemHeightProperty); }
            set { SetValue(MinItemHeightProperty, value); }
        }

        public static readonly DependencyProperty MinItemHeightProperty = DependencyProperty.Register("MinItemHeight", typeof(double), typeof(AdaptiveGridView), new PropertyMetadata(1.0, (s, a) =>
        {
            if (!double.IsNaN((double)a.NewValue))
            {
                ((AdaptiveGridView)s).InvalidateMeasure();
            }
        }));

        /// <summary>
        /// Minimum width for item (must be greater than zero)
        /// </summary>
        public double MinItemWidth
        {
            get { return (double)GetValue(MinimumItemWidthProperty); }
            set { SetValue(MinimumItemWidthProperty, value); }
        }

        public static readonly DependencyProperty MinimumItemWidthProperty = DependencyProperty.Register("MinItemWidth", typeof(double), typeof(AdaptiveGridView), new PropertyMetadata(1.0, (s, a) =>
        {
            if (!Double.IsNaN((double)a.NewValue))
            {
                ((AdaptiveGridView)s).InvalidateMeasure();
            }
        }));

        #endregion

        public AdaptiveGridView()
        {
            if (ItemContainerStyle == null)
                ItemContainerStyle = new Style(typeof(GridViewItem));

            ItemContainerStyle.Setters.Add(new Setter(HorizontalContentAlignmentProperty, HorizontalAlignment.Stretch));

            Loaded += AdaptiveGridView_Loaded;
        }

        private void AdaptiveGridView_Loaded(object sender, RoutedEventArgs e)
        {
            if (ItemsPanelRoot != null)
            {
                InvalidateMeasure();
            }
        }

        protected override Size ArrangeOverride(Size finalSize)
        {
            var panel = ItemsPanelRoot as ItemsWrapGrid;
            if (panel != null)
            {
                if (MinItemWidth == 0 || MinItemHeight == 0)
                {
                    throw new ArgumentException("You need to set MinItemHeight and MinItemWidth to a value greater than 0");
                }

                var availableWidth = finalSize.Width - (Padding.Right + Padding.Left);

                var numColumns = Math.Floor(availableWidth / MinItemWidth);
                numColumns = numColumns == 0 ? 1 : numColumns;

                //Not used yet (for horizontal scrolling scenarios)
                //var numRows = Math.Ceiling(this.Items.Count / numColumns);

                var itemWidth = availableWidth / numColumns;
                var aspectRatio = MinItemHeight / MinItemWidth;
                var itemHeight = itemWidth * aspectRatio;

                panel.ItemWidth = itemWidth;
                panel.ItemHeight = itemHeight;
            }

            return base.ArrangeOverride(finalSize);
        }
    }
}


text:
var ctx;
var room;

function extractUrlParams () {
    var t = location.search.substring(1).split('&');
    var f = [];
    for (var i=0; i<t.length; i++) {
        var x = t[i].split('=');
        f[x[0]]=x[1];
    }
    return f;
}

window.onload = function() {
    console.log("background.Start moving background");
    StartMove();

    // Get url params
    params = extractUrlParams()

    // Get canvas element and instantiate room
    var canvas = document.getElementById('scroller');
    ctx = canvas.getContext('2d');
    room = new Room(ctx);

    // Load sprites
    LoadBulletSprite();

    // Connect to server
    room.Connect(params["uname"], params["room"]);

    // Set interval to refresh screen
    setInterval("room.Draw()", 100);

    // Activate keyboard listening
    setInterval("room.ParseKey()", 30);
}


text:
#ifndef PCL_KINFU_INTERNAL_HPP_
#define PCL_KINFU_INTERNAL_HPP_

#include <pcl/gpu/utils/safe_call.hpp>
#include <pcl/gpu/kinfu_large_scale/device.h>

//using namespace pcl::gpu;

namespace pcl
{
  namespace device
  {
    namespace kinfuLS
    {
      /** \brief Light source collection
        */
      struct LightSource
      {
        float3 pos[1];
        int number;
      };

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // Maps

      /** \brief Perfoms bilateral filtering of disparity map
        * \param[in] src soruce map
        * \param[out] dst output map
        */
      void
      bilateralFilter (const DepthMap& src, DepthMap& dst);

      /** \brief Computes depth pyramid
        * \param[in] src source
        * \param[out] dst destination
        */
      void
      pyrDown (const DepthMap& src, DepthMap& dst);

      /** \brief Computes vertex map
        * \param[in] intr depth camera intrinsics
        * \param[in] depth depth
        * \param[out] vmap vertex map
        */
      void
      createVMap (const Intr& intr, const DepthMap& depth, MapArr& vmap);

      /** \brief Computes normal map using cross product
        * \param[in] vmap vertex map
        * \param[out] nmap normal map
        */
      void
      createNMap (const MapArr& vmap, MapArr& nmap);

      /** \brief Computes normal map using Eigen/PCA approach
        * \param[in] vmap vertex map
        * \param[out] nmap normal map
        */
      void
      computeNormalsEigen (const MapArr& vmap, MapArr& nmap);

      /** \brief Performs affine tranform of vertex and normal maps
        * \param[in] vmap_src source vertex map
        * \param[in] nmap_src source vertex map
        * \param[in] Rmat Rotation mat
        * \param[in] tvec translation
        * \param[out] vmap_dst destination vertex map
        * \param[out] nmap_dst destination vertex map
        */
      void
      transformMaps (const MapArr& vmap_src, const MapArr& nmap_src, const Mat33& Rmat, const float3& tvec, MapArr& vmap_dst, MapArr& nmap_dst);

      /** \brief Performs depth truncation
        * \param[out] depth depth map to truncation
        * \param[in] max_distance truncation threshold, values that are higher than the threshold are reset to zero (means not measurement)
        */
      void
      truncateDepth(DepthMap& depth, float max_distance);

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      //   ICP

      /** \brief (now it's exra code) Computes corespondances map
        * \param[in] vmap_g_curr current vertex map in global coo space
        * \param[in] nmap_g_curr current normals map in global coo space
        * \param[in] Rprev_inv inverse camera rotation at previous pose
        * \param[in] tprev camera translation at previous pose
        * \param[in] intr camera intrinsics
        * \param[in] vmap_g_prev previous vertex map in global coo space
        * \param[in] nmap_g_prev previous vertex map in global coo space
        * \param[in] distThres distance filtering threshold
        * \param[in] angleThres angle filtering threshold. Represents sine of angle between normals
        * \param[out] coresp
        */
      void
      findCoresp (const MapArr& vmap_g_curr, const MapArr& nmap_g_curr, const Mat33& Rprev_inv, const float3& tprev, const Intr& intr,
                  const MapArr& vmap_g_prev, const MapArr& nmap_g_prev, float distThres, float angleThres, PtrStepSz<short2> coresp);

      /** \brief (now it's exra code) Computation Ax=b for ICP iteration
        * \param[in] v_dst destination vertex map (previous frame cloud)
        * \param[in] n_dst destination normal map (previous frame normals)
        * \param[in] v_src source normal map (current frame cloud)
        * \param[in] coresp Corespondances
        * \param[out] gbuf temp buffer for GPU reduction
        * \param[out] mbuf ouput GPU buffer for matrix computed
        * \param[out] matrixA_host A
        * \param[out] vectorB_host b
        */
      void
      estimateTransform (const MapArr& v_dst, const MapArr& n_dst, const MapArr& v_src, const PtrStepSz<short2>& coresp,
                        DeviceArray2D<float>& gbuf, DeviceArray<float>& mbuf, float* matrixA_host, float* vectorB_host);

      /** \brief Computation Ax=b for ICP iteration
        * \param[in] Rcurr Rotation of current camera pose guess
        * \param[in] tcurr translation of current camera pose guess
        * \param[in] vmap_curr current vertex map in camera coo space
        * \param[in] nmap_curr current vertex map in camera coo space
        * \param[in] Rprev_inv inverse camera rotation at previous pose
        * \param[in] tprev camera translation at previous pose
        * \param[in] intr camera intrinsics
        * \param[in] vmap_g_prev previous vertex map in global coo space
        * \param[in] nmap_g_prev previous vertex map in global coo space
        * \param[in] distThres distance filtering threshold
        * \param[in] angleThres angle filtering threshold. Represents sine of angle between normals
        * \param[out] gbuf temp buffer for GPU reduction
        * \param[out] mbuf ouput GPU buffer for matrix computed
        * \param[out] matrixA_host A
        * \param[out] vectorB_host b
        */
      void
      estimateCombined (const Mat33& Rcurr, const float3& tcurr, const MapArr& vmap_curr, const MapArr& nmap_curr, const Mat33& Rprev_inv, const float3& tprev, const Intr& intr,
                        const MapArr& vmap_g_prev, const MapArr& nmap_g_prev, float distThres, float angleThres,
                        DeviceArray2D<float>& gbuf, DeviceArray<float>& mbuf, float* matrixA_host, float* vectorB_host);

      /** \brief Computation Ax=b for ICP iteration
        * \param[in] Rcurr Rotation of current camera pose guess
        * \param[in] tcurr translation of current camera pose guess
        * \param[in] vmap_curr current vertex map in camera coo space
        * \param[in] nmap_curr current vertex map in camera coo space
        * \param[in] Rprev_inv inverse camera rotation at previous pose
        * \param[in] tprev camera translation at previous pose
        * \param[in] intr camera intrinsics
        * \param[in] vmap_g_prev previous vertex map in global coo space
        * \param[in] nmap_g_prev previous vertex map in global coo space
        * \param[in] distThres distance filtering threshold
        * \param[in] angleThres angle filtering threshold. Represents sine of angle between normals
        * \param[out] gbuf temp buffer for GPU reduction
        * \param[out] mbuf ouput GPU buffer for matrix computed
        * \param[out] matrixA_host A
        * \param[out] vectorB_host b
        */
      void
      estimateCombined (const Mat33& Rcurr, const float3& tcurr, const MapArr& vmap_curr, const MapArr& nmap_curr, const Mat33& Rprev_inv, const float3& tprev, const Intr& intr,
                        const MapArr& vmap_g_prev, const MapArr& nmap_g_prev, float distThres, float angleThres,
                        DeviceArray2D<double>& gbuf, DeviceArray<double>& mbuf, double* matrixA_host, double* vectorB_host);

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // TSDF volume functions

      /** \brief Perform tsdf volume initialization
        *  \param[out] array volume to be initialized
        */
      PCL_EXPORTS void
      initVolume(PtrStep<short2> array);

      //first version
      /** \brief Performs Tsfg volume uptation (extra obsolete now)
        * \param[in] depth_raw Kinect depth image
        * \param[in] intr camera intrinsics
        * \param[in] volume_size size of volume in mm
        * \param[in] Rcurr_inv inverse rotation for current camera pose
        * \param[in] tcurr translation for current camera pose
        * \param[in] tranc_dist tsdf truncation distance
        * \param[in] volume tsdf volume to be updated
        */
      void
      integrateTsdfVolume (const PtrStepSz<ushort>& depth_raw, const Intr& intr, const float3& volume_size,
                          const Mat33& Rcurr_inv, const float3& tcurr, float tranc_dist, PtrStep<short2> volume);

      //second version
      /** \brief Function that integrates volume if volume element contains: 2 bytes for round(tsdf*SHORT_MAX) and 2 bytes for integer weight.
        * \param[in] depth Kinect depth image
        * \param[in] intr camera intrinsics
        * \param[in] volume_size size of volume in mm
        * \param[in] Rcurr_inv inverse rotation for current camera pose
        * \param[in] tcurr translation for current camera pose
        * \param[in] tranc_dist tsdf truncation distance
        * \param[in] volume tsdf volume to be updated
        * \param[in] buffer cyclical buffer structure
        * \param[out] depthScaled Buffer for scaled depth along ray
        */
      PCL_EXPORTS void
      integrateTsdfVolume (const PtrStepSz<ushort>& depth, const Intr& intr, const float3& volume_size,
                          const Mat33& Rcurr_inv, const float3& tcurr, float tranc_dist, PtrStep<short2> volume, const pcl::gpu::kinfuLS::tsdf_buffer* buffer, DeviceArray2D<float>& depthScaled);

      /** \brief Function that clears the TSDF values. The clearing takes place from the origin (in indices) to an offset in X,Y,Z values accordingly
        * \param[in] volume Pointer to TSDF volume in GPU
        * \param[in] buffer Pointer to the buffer struct that contains information about memory addresses of the tsdf volume memory block, which are used for the cyclic buffer.
        * \param[in] shiftX Offset in indices that will be cleared from the TSDF volume. The clearing start from buffer.OriginX and stops in OriginX + shiftX
        * \param[in] shiftY Offset in indices that will be cleared from the TSDF volume. The clearing start from buffer.OriginY and stops in OriginY + shiftY
        * \param[in] shiftZ Offset in indices that will be cleared from the TSDF volume. The clearing start from buffer.OriginZ and stops in OriginZ + shiftZ
        */
      PCL_EXPORTS void
      clearTSDFSlice (PtrStep<short2> volume, pcl::gpu::kinfuLS::tsdf_buffer* buffer, int shiftX, int shiftY, int shiftZ);

      /** \brief Initialzied color volume
        * \param[out] color_volume color volume for initialization
        */
      void
      initColorVolume(PtrStep<uchar4> color_volume);

      /** \brief Performs integration in color volume
        * \param[in] intr Depth camera intrionsics structure
        * \param[in] tranc_dist tsdf truncation distance
        * \param[in] R_inv Inverse camera rotation
        * \param[in] t camera translation
        * \param[in] vmap Raycasted vertex map
        * \param[in] colors RGB colors for current frame
        * \param[in] volume_size volume size in meters
        * \param[in] color_volume color volume to be integrated
        * \param[in] max_weight max weight for running color average. Zero means not average, one means average with prev value, etc.
        */
      void
      updateColorVolume(const Intr& intr, float tranc_dist, const Mat33& R_inv, const float3& t, const MapArr& vmap,
              const PtrStepSz<uchar3>& colors, const float3& volume_size, PtrStep<uchar4> color_volume, int max_weight = 1);

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // Raycast and view generation
      /** \brief Generation vertex and normal maps from volume for current camera pose
        * \param[in] intr camera intrinsices
        * \param[in] Rcurr current rotation
        * \param[in] tcurr current translation
        * \param[in] tranc_dist volume truncation distance
        * \param[in] volume_size volume size in mm
        * \param[in] volume tsdf volume
        * \param[in] buffer cyclical buffer structure
        * \param[out] vmap output vertex map
        * \param[out] nmap output normals map
        */
      void
      raycast (const Intr& intr, const Mat33& Rcurr, const float3& tcurr, float tranc_dist, const float3& volume_size,
              const PtrStep<short2>& volume, const pcl::gpu::kinfuLS::tsdf_buffer* buffer, MapArr& vmap, MapArr& nmap);

      /** \brief Renders 3D image of the scene
        * \param[in] vmap vertex map
        * \param[in] nmap normals map
        * \param[in] light pose of light source
        * \param[out] dst buffer where image is generated
        */
      void
      generateImage (const MapArr& vmap, const MapArr& nmap, const LightSource& light, PtrStepSz<uchar3> dst);

      /** \brief Renders depth image from give pose
        * \param[in] R_inv inverse camera rotation
        * \param[in] t camera translation
        * \param[in] vmap vertex map
        * \param[out] dst buffer where depth is generated
        */
      void
      generateDepth (const Mat33& R_inv, const float3& t, const MapArr& vmap, DepthMap& dst);

      /** \brief Paints 3D view with color map
        * \param[in] colors rgb color frame from OpenNI
        * \param[out] dst output 3D view
        * \param[in] colors_weight weight for colors
        */
      void
      paint3DView(const PtrStep<uchar3>& colors, PtrStepSz<uchar3> dst, float colors_weight = 0.5f);

      /** \brief Performs resize of vertex map to next pyramid level by averaging each four points
        * \param[in] input vertext map
        * \param[out] output resized vertex map
        */
      void
      resizeVMap (const MapArr& input, MapArr& output);

      /** \brief Performs resize of vertex map to next pyramid level by averaging each four normals
        * \param[in] input normal map
        * \param[out] output vertex map
        */
      void
      resizeNMap (const MapArr& input, MapArr& output);

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // Push data to TSDF

          /** \brief Loads the values of a tsdf point cloud to the tsdf volume in GPU
        * \param[in] volume tsdf volume
        * \param[in] cloud_gpu contains the data to be pushed to the tsdf volume
        * \param[in] buffer Pointer to the buffer struct that contains information about memory addresses of the tsdf volume memory block, which are used for the cyclic buffer.
        */
      /*PCL_EXPORTS*/ void
      pushCloudAsSliceGPU (const PtrStep<short2>& volume, pcl::gpu::DeviceArray<PointType> cloud_gpu, const pcl::gpu::kinfuLS::tsdf_buffer* buffer);

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // Cloud extraction

      /** \brief Perform point cloud extraction from tsdf volume
        * \param[in] volume tsdf volume
        * \param[in] volume_size size of the volume
        * \param[out] output buffer large enought to store point cloud
        * \return number of point stored to passed buffer
        */
      PCL_EXPORTS size_t
      extractCloud (const PtrStep<short2>& volume, const float3& volume_size, PtrSz<PointType> output);

      /** \brief Perform point cloud extraction of a slice from tsdf volume
        * \param[in] volume tsdf volume on GPU
        * \param[in] volume_size size of the volume
        * \param[in] buffer Pointer to the buffer struct that contains information about memory addresses of the tsdf volume memory block, which are used for the cyclic buffer.
        * \param[in] shiftX Offset in indices that will be cleared from the TSDF volume. The clearing start from buffer.OriginX and stops in OriginX + shiftX
        * \param[in] shiftY Offset in indices that will be cleared from the TSDF volume. The clearing start from buffer.OriginY and stops in OriginY + shiftY
        * \param[in] shiftZ Offset in indices that will be cleared from the TSDF volume. The clearing start from buffer.OriginZ and stops in OriginZ + shiftZ
        * \param[out] output_xyz buffer large enought to store point cloud xyz values
        * \param[out] output_intensities buffer large enought to store point cloud intensity values
        * \return number of point stored to passed buffer
        */
      PCL_EXPORTS size_t
      extractSliceAsCloud (const PtrStep<short2>& volume, const float3& volume_size, const pcl::gpu::kinfuLS::tsdf_buffer* buffer, const int shiftX, const int shiftY, const int shiftZ, PtrSz<PointType> output_xyz, PtrSz<float> output_intensities);

      /** \brief Performs normals computation for given poins using tsdf volume
        * \param[in] volume tsdf volume
        * \param[in] volume_size volume size
        * \param[in] input points where normals are computed
        * \param[out] output normals. Could be float4 or float8. If for a point normal can't be computed, such normal is marked as nan.
        */
      template<typename NormalType>
      void
      extractNormals (const PtrStep<short2>& volume, const float3& volume_size, const PtrSz<PointType>& input, NormalType* output);

      /** \brief Performs colors exctraction from color volume
        * \param[in] color_volume color volume
        * \param[in] volume_size volume size
        * \param[in] points points for which color are computed
        * \param[out] colors output array with colors.
        */
      void
      exctractColors(const PtrStep<uchar4>& color_volume, const float3& volume_size, const PtrSz<PointType>& points, uchar4* colors);

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // Utility
      struct float8  { float x, y, z, w, c1, c2, c3, c4; };
      struct float12 { float x, y, z, w, normal_x, normal_y, normal_z, n4, c1, c2, c3, c4; };

      /** \brief Conversion from SOA to AOS
        * \param[in] vmap SOA map
        * \param[out] output Array of 3D points. Can be float4 or float8.
        */
      template<typename T>
      void
      convert (const MapArr& vmap, DeviceArray2D<T>& output);

      /** \brief Merges pcl::PointXYZ and pcl::Normal to PointNormal
        * \param[in] cloud points cloud
        * \param[in] normals normals cloud
        * \param[out] output array of PointNomals.
        */
      void
      mergePointNormal(const DeviceArray<float4>& cloud, const DeviceArray<float8>& normals, const DeviceArray<float12>& output);

      /** \brief  Check for qnan (unused now)
        * \param[in] value
        */
      inline bool
      valid_host (float value)
      {
        return *reinterpret_cast<int*>(&value) != 0x7fffffff; //QNAN
      }

      /** \brief synchronizes CUDA execution */
      inline
      void
      sync () { cudaSafeCall (cudaDeviceSynchronize ()); }

      template<class D, class Matx> D&
      device_cast (Matx& matx)
      {
        return (*reinterpret_cast<D*>(matx.data ()));
      }

      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // Marching cubes implementation

      /** \brief Binds marching cubes tables to texture references */
      void
      bindTextures(const int *edgeBuf, const int *triBuf, const int *numVertsBuf);

      /** \brief Unbinds */
      void
      unbindTextures();

      /** \brief Scans tsdf volume and retrieves occuped voxes
        * \param[in] volume tsdf volume
        * \param[out] occupied_voxels buffer for occuped voxels. The function fulfills first row with voxel ids and second row with number of vertextes.
        * \return number of voxels in the buffer
        */
      int
      getOccupiedVoxels(const PtrStep<short2>& volume, DeviceArray2D<int>& occupied_voxels);

      /** \brief Computes total number of vertexes for all voxels and offsets of vertexes in final triangle array
        * \param[out] occupied_voxels buffer with occuped voxels. The function fulfills 3nd only with offsets
        * \return total number of vertexes
        */
      int
      computeOffsetsAndTotalVertexes(DeviceArray2D<int>& occupied_voxels);

      /** \brief Generates final triangle array
        * \param[in] volume tsdf volume
        * \param[in] occupied_voxels occuped voxel ids (first row), number of vertexes(second row), offsets(third row).
        * \param[in] volume_size volume size in meters
        * \param[out] output triangle array
        */
      void
      generateTriangles(const PtrStep<short2>& volume, const DeviceArray2D<int>& occupied_voxels, const float3& volume_size, DeviceArray<PointType>& output);
    }
  }
}

#endif /* PCL_KINFU_INTERNAL_HPP_ */


text:
<resources>
    <string name="agentweb_download_task_has_been_exist">该任务已经存在 , 请勿重复点击下载!</string>
    <string name="agentweb_tips">提示</string>
    <string name="agentweb_honeycomblow">您正在使用手机流量 , 继续下载该文件吗?</string>
    <string name="agentweb_download">下载</string>
    <string name="agentweb_cancel">取消</string>
    <string name="agentweb_download_fail">下载失败!</string>
    <string name="agentweb_current_downloading_progress">当前进度:%s</string>
    <string name="agentweb_current_downloaded_length">已下载:%s</string>
    <string name="agentweb_trickter">您有一条新通知</string>
    <string name="agentweb_file_download">文件下载</string>
    <string name="agentweb_click_open">点击打开</string>
    <string name="agentweb_coming_soon_download">即将开始下载文件</string>
    <string name="agentweb_camera">相机</string>
    <string name="agentweb_file_chooser">文件</string>
    <string name="agentweb_loading">加载中 ...</string>
    <string name="agentweb_leave_app_and_go_other_page">您需要离开%s前往其他应用吗?</string>
    <string name="agentweb_leave">离开</string>
    <string name="agentweb_message_show_ssl_untrusted">证书颁发机构不受信任,</string>
    <string name="agentweb_max_file_length_limit">选择的文件不能大于%sMB</string>
    <string name="agentweb_default_page_error">出错啦! 点击空白处刷新 ~</string>
    <string name="agentweb_message_show_ssl_expired">证书已过期,</string>
    <string name="agentweb_message_show_ssl_hostname_mismatch">证书主机名不匹配,</string>
    <string name="agentweb_message_show_ssl_not_yet_valid">该证书尚未生效,</string>
    <string name="agentweb_message_show_ssl_error">SSL 认证错误,</string>
    <string name="agentweb_message_show_continue">你确定要访问该网页吗?</string>
    <string name="agentweb_title_ssl_error">SSL 认证错误</string>
    <string name="agentweb_continue">确定</string>
</resources>


text:
from swgpy.object import *

def create(kernel):
	result = Creature()

	result.template = "object/mobile/shared_atat.iff"
	result.attribute_template_id = 9
	result.stfName("theme_park_name","at_at")

	#### BEGIN MODIFICATIONS ####
	####  END MODIFICATIONS  ####

	return result


text:
layout: home

# Header
header:
  title: 1 Million Learners - Cloud, DevOps and Microservices
  description: 7 Amazing Roadmaps - ZERO to EXPERT
  image:
  main_button:
    title: Start learning
    url: https://www.in28minutes.com/roadmaps
  secondary_button:
    title: Watch on YouTube
    url: https://www.youtube.com/user/rithustutorials/videos

# Features
features:
  title: Take your first step into Cloud and DevOps
  description: Join 1 MILLION learners
  items:
    - title: Cloud Roadmaps
      description: Get started with AWS, Azure and Google Cloud
      icon: lni-layout
    - title: DevOps Roadmaps
      description: Get started with Docker, Kubernetes and Terraform
      icon: lni-layout
    - title: Spring Boot Roadmaps
      description: Learn Java, Spring Boot, Microservices and Full Stack development
      icon: lni-layout
    - title: Hands-on courses designed for absolute beginners
      description: 50+ Course with almost 250,000+ reviews
      icon: lni-layout

# About
about:
  title: YOUR FIRST STEP into Programming, Cloud & DevOps
  description: Ranga Karanam, the founder of in28minutes, has 2 decades of experience with technology - architecture, design, and programming.  We are helping learners take their first steps into modern cloud native technology and gain expertise on AWS, Azure, Google Cloud, Docker, Kubernetes amongst others.

# FAQ
faq:
  title: FAQ
  description: There are many variations of passages of Lorem Ipsum available but the majority have suffered alteration in some form.
  items:
    - title: How to use UIdeck?
      description: Lorem Ipsum is simply dummy text of the printing and
        typesetting industry. Lorem Ipsum has been the industry's
        standard dummy text ever since the 1500s, when an unknown
        printer took a galley of type and scrambled it to make a
        type specimen book.
    - title: How to use UIdeck?
      description: Lorem Ipsum is simply dummy text of the printing and
        typesetting industry. Lorem Ipsum has been the industry's
        standard dummy text ever since the 1500s, when an unknown
        printer took a galley of type and scrambled it to make a
        type specimen book.
    - title: How to use UIdeck?
      description: Lorem Ipsum is simply dummy text of the printing and
        typesetting industry. Lorem Ipsum has been the industry's
        standard dummy text ever since the 1500s, when an unknown
        printer took a galley of type and scrambled it to make a
        type specimen book.
    - title: How to use UIdeck?
      description: Lorem Ipsum is simply dummy text of the printing and
        typesetting industry. Lorem Ipsum has been the industry's
        standard dummy text ever since the 1500s, when an unknown
        printer took a galley of type and scrambled it to make a
        type specimen book.

# Testimonials
testimonials:
  title: What our students say
  description: Lots of love from our learners
  items:
    - name: Learner - AZ-900 Microsoft Azure Fundamentals in a Weekend
      comment: Get certified quickly without even looking for other resources. Just watch videos for 2 days and appeared for the exam and cleared the exam.
    - name: Learner - AWS Certified Cloud Practitioner - AWS Certification
      comment: Awesome course to get started with AWS. I have started with ZERO AWS knowledge and now I am familiar and confident to talk in AWS terminology. THANK YOU Ranga !!!!
    - name: Learner -  Master Microservices with Spring Boot and Spring Cloud
      comment: My respect and admiration for you as a teacher cannot be expressed in words. You did amazing job with full of responsibility. Thank you for the gift I felt I climbed several ladder as a programmer when I completed you great course. Thank you countless time!!
---