text:
var App = require('app');
var configs = [
/**********************************************core-site***************************************/
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
    "templateName": ["proxyuser_group"],
    "foreignKey": ["hive_user"],
    "value": "<templateName[0]>",
    "filename": "core-site.xml",
    "isOverridable": true
  },
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
    "templateName": ["hivemetastore_host"],
    "foreignKey": ["hive_user"],
    "value": "<templateName[0]>",
    "filename": "core-site.xml",
    "isOverridable": true
  },
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
    "templateName": [],
    "foreignKey": ["oozie_user"],
    "value": "*",
    "filename": "core-site.xml",
    "isOverridable": true
  },
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
    "templateName": ["oozieserver_host"],
    "foreignKey": ["oozie_user"],
    "value": "<templateName[0]>",
    "filename": "core-site.xml",
    "isOverridable": true
  },
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
    "templateName": ["proxyuser_group"],
    "foreignKey": ["webhcat_user"],
    "value": "<templateName[0]>",
    "filename": "core-site.xml",
    "isOverridable": true
  },
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
    "templateName": ["hivemetastore_host"],
    "foreignKey": ["webhcat_user"],
    "value": "<templateName[0]>",
    "filename": "core-site.xml",
    "isOverridable": true
  },
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
    "templateName": ["proxyuser_group"],
    "foreignKey": ["falcon_user"],
    "value": "<templateName[0]>",
    "filename": "core-site.xml",
    "isOverridable": true
  },
  {
    "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
    "templateName": [],
    "foreignKey": ["falcon_user"],
    "value": "*",
    "filename": "core-site.xml",
    "isOverridable": true
  },

/**********************************Oozie******************************/

  {
    "name": "oozie.service.ProxyUserService.proxyuser.<foreignKey[0]>.groups",
    "templateName": [],
    "foreignKey": ["falcon_user"],
    "value": "*",
    "filename": "oozie-site.xml",
    "isOverridable": true,
    "serviceName": "OOZIE"
  },
  {
    "name": "oozie.service.ProxyUserService.proxyuser.<foreignKey[0]>.hosts",
    "templateName": [],
    "foreignKey": ["falcon_user"],
    "value": "*",
    "filename": "oozie-site.xml",
    "isOverridable": true,
    "serviceName": "OOZIE"
  }
];

/**
 * Configs consists of 2 types: Computed values, which cannot be modified by user
 * and overridable values, which user can modify. We provide interface how to get all of this
 * configs separately
 * @type {Object}
 */
module.exports = {

  checkPrecondition: function () {
    return configs.filter(function (config) {
      return ((!config.precondition) || (config.precondition()));
    });
  },
  all: function (skipPreconditionCheck) {
    if (skipPreconditionCheck) {
      return configs.slice(0);
    } else {
      return this.checkPrecondition().slice(0);
    }
  },
  overridable: function (skipPreconditionCheck) {
    if (skipPreconditionCheck) {
      return configs.filterProperty('foreignKey');
    } else {
      return this.checkPrecondition().filterProperty('foreignKey');
    }
  },
  computed: function (skipPreconditionCheck) {
    if (skipPreconditionCheck) {
      return configs.filterProperty('foreignKey', null);
    } else {
      return this.checkPrecondition().filterProperty('foreignKey', null);
    }
  }
};


text:
package team1;

import battlecode.common.Clock;
import battlecode.common.Direction;
import battlecode.common.GameConstants;
import battlecode.common.RobotController;
import battlecode.common.RobotType;

public class Building extends Arobot {

	public Building(RobotController rc){
		super(rc);
		my_max_supply_level = max_building_supply_level;
		my_min_supply_level = min_building_supply_level;
		my_optimal_supply_level = optimal_building_supply_level;
	}

	public void basic_turn_loop(){
		robot_controller.yield();
		while(true){
			sensed_enemy_robots = robot_controller.senseNearbyRobots((int)(GameConstants.HQ_BUFFED_ATTACK_RADIUS_SQUARED * 1.2),enemy_team);
			//attack_random_enemy_in_range();
			attack_deadest_enemy_in_range();
			if(Clock.getRoundNum()%5 == 0){
				count_the_troops();
				update_strategy();
				check_for_spawns();
			}
		//	if(all_out_attack)
				dish_out_supply();
			robot_controller.yield();
		}
	}

	public void check_for_spawns() {
		if(my_type.canSpawn() && spawn_build_ordinals != null)
			for(int spawn_ordinal: spawn_build_ordinals)
				if(need_more_spawns(spawn_ordinal))
					if(spawn_robot(robot_types[spawn_ordinal]))
						break;
		}

	private boolean need_more_spawns(int spawn_ordinal) {
		if(robot_census[spawn_ordinal] < robot_max[spawn_ordinal])
			return true;
		return false;
	}

	public boolean spawn_robot(RobotType required_type){
		if(robot_controller.isCoreReady())
			if(robot_controller.hasSpawnRequirements(required_type))
				for (final Direction direction: directions)
					if(robot_controller.canSpawn(direction, required_type))
						try{
							robot_controller.spawn(direction,required_type);
							return true;
						} catch(Exception e){
							print_exception(e);
						}
		return false;
	}

}

redpajama_set_name: RedPajamaGithub


text:
//  =============================================================================================================================
//  author       : david sexton (@sextondjc | sextondjc.com)
//  date         : 2017.09.29 (21:39)
//  modified     : 2017.10.01 (20:39)
//  licence      : This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
//  =============================================================================================================================

#region

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
// ReSharper disable UnusedTypeParameter

#endregion

namespace Syrx
{
    /// <inheritdoc />
    /// <summary>
    ///     Basically breaks down into two distinct operations for mutating data/retrieving data
    /// </summary>
    public partial interface ICommander<TRepository>
    {
        /// <summary>
        ///     Queries the data source asynchronously.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="parameters">The parameters to be passed to operation.</param>
        /// <param name="cancellationToken">The cancellation token.</param>
        /// <param name="method">The method.</param>
        /// <returns></returns>
        Task<IEnumerable<T>> QueryAsync<T>
            (object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multimap query with two generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">Mapping predicate used to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, TResult>(Func<T1, T2, TResult> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multimap query with three generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="TResult">The type of the result.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, TResult>(
            Func<T1, T2, T3, TResult> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multimap query with four generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="TResult">The type of the result.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, TResult>(
            Func<T1, T2, T3, T4, TResult> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multimap query with five generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="TResult">The type of the result.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, TResult>(
            Func<T1, T2, T3, T4, T5, TResult> map,
            object parameters = null, CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multimap query with six generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="TResult">The type of the result.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, TResult>(
            Func<T1, T2, T3, T4, T5, T6, TResult> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multimap query with seven generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="TResult">The type of the result.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(
            Func<T1, T2, T3, T4, T5, T6, T7, TResult> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with a single generic input.
        /// </summary>
        /// <typeparam name="T1">The input type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with two generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, TResult>(
            Func<IEnumerable<T1>,
                IEnumerable<T2>,
                IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with three generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with four generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with five generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with six generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with seven generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with eight generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with nine generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with ten generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="T10">The tenth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<T10>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with eleven generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="T10">The tenth type.</typeparam>
        /// <typeparam name="T11">The eleventh type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<T10>,
                 IEnumerable<T11>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with twelve generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="T10">The tenth type.</typeparam>
        /// <typeparam name="T11">The eleventh type.</typeparam>
        /// <typeparam name="T12">The twelfth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<T10>,
                 IEnumerable<T11>,
                 IEnumerable<T12>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with thirteen generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="T10">The tenth type.</typeparam>
        /// <typeparam name="T11">The eleventh type.</typeparam>
        /// <typeparam name="T12">The twelfth type.</typeparam>
        /// <typeparam name="T13">The thirteenth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<T10>,
                 IEnumerable<T11>,
                 IEnumerable<T12>,
                 IEnumerable<T13>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with fourteen generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="T10">The tenth type.</typeparam>
        /// <typeparam name="T11">The eleventh type.</typeparam>
        /// <typeparam name="T12">The twelfth type.</typeparam>
        /// <typeparam name="T13">The thirteenth type.</typeparam>
        /// <typeparam name="T14">The fourteenth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<T10>,
                 IEnumerable<T11>,
                 IEnumerable<T12>,
                 IEnumerable<T13>,
                 IEnumerable<T14>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with fifteen generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="T10">The tenth type.</typeparam>
        /// <typeparam name="T11">The eleventh type.</typeparam>
        /// <typeparam name="T12">The twelfth type.</typeparam>
        /// <typeparam name="T13">The thirteenth type.</typeparam>
        /// <typeparam name="T14">The fourteenth type.</typeparam>
        /// <typeparam name="T15">The fifteenth type.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<T10>,
                 IEnumerable<T11>,
                 IEnumerable<T12>,
                 IEnumerable<T13>,
                 IEnumerable<T14>,
                 IEnumerable<T15>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);

        /// <summary>
        ///     Use a multiple query with sixteen generic inputs.
        /// </summary>
        /// <typeparam name="T1">The first type.</typeparam>
        /// <typeparam name="T2">The second type.</typeparam>
        /// <typeparam name="T3">The third type.</typeparam>
        /// <typeparam name="T4">The fourth type.</typeparam>
        /// <typeparam name="T5">The fifth type.</typeparam>
        /// <typeparam name="T6">The sixth type.</typeparam>
        /// <typeparam name="T7">The seventh type.</typeparam>
        /// <typeparam name="T8">The eighth type.</typeparam>
        /// <typeparam name="T9">The ninth type.</typeparam>
        /// <typeparam name="T10">The tenth type.</typeparam>
        /// <typeparam name="T11">The eleventh type.</typeparam>
        /// <typeparam name="T12">The twelfth type.</typeparam>
        /// <typeparam name="T13">The thirteenth type.</typeparam>
        /// <typeparam name="T14">The fourteenth type.</typeparam>
        /// <typeparam name="T15">The fifteenth type.</typeparam>
        /// <typeparam name="T16">The sixteenth.</typeparam>
        /// <typeparam name="TResult">The result type.</typeparam>
        /// <param name="map">The mapping predicate to use to compose the result type.</param>
        /// <param name="parameters">Optional parameters to pass to the query.</param>
        /// <param name="cancellationToken"></param>
        /// <param name="method">Optionally pass a method name to use as the key to finding a command setting.</param>
        /// <returns></returns>
        Task<IEnumerable<TResult>> QueryAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>(
            Func<IEnumerable<T1>,
                 IEnumerable<T2>,
                 IEnumerable<T3>,
                 IEnumerable<T4>,
                 IEnumerable<T5>,
                 IEnumerable<T6>,
                 IEnumerable<T7>,
                 IEnumerable<T8>,
                 IEnumerable<T9>,
                 IEnumerable<T10>,
                 IEnumerable<T11>,
                 IEnumerable<T12>,
                 IEnumerable<T13>,
                 IEnumerable<T14>,
                 IEnumerable<T15>,
                 IEnumerable<T16>,
                 IEnumerable<TResult>> map,
            object parameters = null,
            CancellationToken cancellationToken = default(CancellationToken),
            [CallerMemberName] string method = null);
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<title>OpenCV: Member List</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>

<link href="../../search/search.css" rel="stylesheet" type="text/css"/>

<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>

OpenCV
    3.2.0

Open Source Computer Vision

cv

bioinspired

TransientAreasSegmentationModule

cv::bioinspired::TransientAreasSegmentationModule Member List

This is the complete list of members for cv::bioinspired::TransientAreasSegmentationModule, including all inherited members.

Algorithm()	cv::Algorithm

clear()	cv::Algorithm	virtual

clearAllBuffers()=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

createTransientAreasSegmentationModule(Size inputSize)	cv::bioinspired::TransientAreasSegmentationModule	related

empty() const	cv::Algorithm	virtual

getDefaultName() const	cv::Algorithm	virtual

getParameters()=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

getSegmentationPicture(OutputArray transientAreas)=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

getSize()=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

load(const String &filename, const String &objname=String())	cv::Algorithm	static

loadFromString(const String &strModel, const String &objname=String())	cv::Algorithm	static

printSetup()=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

read(const FileNode &fn)	cv::Algorithm	virtual

read(const FileNode &fn)	cv::Algorithm	static

run(InputArray inputToSegment, const int channelIndex=0)=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

save(const String &filename) const	cv::Algorithm	virtual

setup(String segmentationParameterFile="", const bool applyDefaultSetupOnFailure=true)=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure=true)=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

setup(SegmentationParameters newParameters)=0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

write(String fs) const =0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

write(cv::FileStorage &fs) const =0	cv::bioinspired::TransientAreasSegmentationModule	pure virtual

writeFormat(FileStorage &fs) const	cv::Algorithm	protected

~Algorithm()	cv::Algorithm	virtual

<address class="footer">
Generated on Fri Dec 23 2016 13:00:27 for OpenCV by

 1.8.12
</address>


text:
package com.owera.xaps.web.app.page.unittype;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import com.owera.xaps.dbi.Unittype;
import com.owera.xaps.dbi.Unittype.ProvisioningProtocol;
import com.owera.xaps.dbi.UnittypeParameter;
import com.owera.xaps.dbi.XAPS;
import com.owera.xaps.web.Page;
import com.owera.xaps.web.app.Output;
import com.owera.xaps.web.app.input.DropDownSingleSelect;
import com.owera.xaps.web.app.input.InputDataIntegrity;
import com.owera.xaps.web.app.input.InputDataRetriever;
import com.owera.xaps.web.app.input.InputSelectionFactory;
import com.owera.xaps.web.app.input.ParameterParser;
import com.owera.xaps.web.app.menu.MenuItem;
import com.owera.xaps.web.app.page.AbstractWebPage;
import com.owera.xaps.web.app.page.syslog.SyslogUtil;
import com.owera.xaps.web.app.table.TableElementMaker;
import com.owera.xaps.web.app.util.SessionCache;
import com.owera.xaps.web.app.util.SessionData;
import com.owera.xaps.web.app.util.WebConstants;
import com.owera.xaps.web.app.util.XAPSLoader;

/**
 * The Class UnittypePage.
 */
public class UnittypePage extends AbstractWebPage {

	protected static final String NA_PROTOCOL = "N/A";
	protected static final String TR069_PROTOCOL = "TR-069";

	/** The input data. */
	private UnittypeData inputData;

	/** The xaps. */
	private XAPS xaps;

	/** The unittype. */
	private Unittype unittype;

	/** The session id. */
	private String sessionId;

	/** The unittype updated. */
	private boolean unittypeUpdated = false;

	/* (non-Javadoc)
	 * @see com.owera.xaps.web.app.page.AbstractWebPage#getTitle(java.lang.String)
	 */
	public String getTitle(String page) {
		return super.getTitle(page) + (unittype != null ? " | " + unittype.getName() : "");
	}

	/* (non-Javadoc)
	 * @see com.owera.xaps.web.app.page.AbstractWebPage#getShortcutItems(com.owera.xaps.web.app.util.SessionData)
	 */
	public List<MenuItem> getShortcutItems(SessionData sessionData) {
		List<MenuItem> list = new ArrayList<MenuItem>();
		list.addAll(super.getShortcutItems(sessionData));
		list.add(new MenuItem("Create new Unit Type", Page.UNITTYPECREATE));
		list.add(new MenuItem("Unit Type overview", Page.UNITTYPEOVERVIEW));
		list.add(new MenuItem("Trigger Overview", Page.TRIGGEROVERVIEW));
		if (unittype != null) {
			list.add(new MenuItem("Last 100 syslog entries", Page.SYSLOG).addCommand("auto") // automatically hit the Search button
					.addParameter("unittype", unittype.getName()));
			list.add(new MenuItem("Add new parameter", Page.UNITTYPEPARAMETERS).addParameter("unittype", unittype.getName()));
			list.add(new MenuItem("Manage syslog events", Page.SYSLOGEVENTS).addParameter("unittype", unittype.getName()));
			list.add(new MenuItem("Create new trigger", Page.CREATETRIGGER).addParameter("unittype", unittype.getName()));
		}
		return list;
	}

	/**
	 * Action cud unittype.
	 *
	 * @throws Exception the exception
	 */
	private void actionCUDUnittype() throws Exception {
		if (unittype == null)
			return;

		if (inputData.getFormSubmit().isValue(WebConstants.UPDATE)) {
			ProvisioningProtocol protocol = ProvisioningProtocol.toEnum(inputData.getProtocol().getString());
			unittype.setProtocol(protocol);
			//			if (protocol != null && protocol.equals("OPP") && inputData.getMatcherId().getString() != null)
			//				unittype.setMatcherId(inputData.getMatcherId().getString());
			//			if (protocol != null && !protocol.equalsIgnoreCase("unspecified"))
			//				unittype.setProtocol(protocol);
			//			else if (protocol != null && protocol.equalsIgnoreCase("unspecified"))
			//				unittype.setProtocol(null);
			unittype.setVendor(inputData.getVendor().getString());
			unittype.setDescription(inputData.getDescription().getString());
			xaps.getUnittypes().addOrChangeUnittype(unittype, xaps);
			unittypeUpdated = true;
		}
		if (inputData.getFormSubmit().isValue(WebConstants.DELETE)) {
			try {
				xaps.getUnittypes().deleteUnittype(unittype, xaps, true);
				inputData.getUnittype().setValue(null);
				SessionCache.getSessionData(sessionId).setUnittypeName(null);
				unittype = null;
			} catch (SQLException ex) {
				throw new SQLException("Could not delete Unit Type [" + unittype.getName() + "]. Delete profile, units, groups and/or firmwares first.");
			}
		}
	}

	/**
	 * Action cud parameters.
	 *
	 * @param params the params
	 * @throws Exception the exception
	 */
	private void actionCUDParameters(ParameterParser params) throws Exception {
		if (unittype == null)
			return;
		if (inputData.getFormSubmit().isValue(WebConstants.UPDATE_PARAMS)) {
			UnittypeParameter[] upParams = unittype.getUnittypeParameters().getUnittypeParameters();
			for (UnittypeParameter utp : upParams) {
				String upName = utp.getName();
				String upFlag = utp.getFlag().getFlag();
				if (params.getParameter("delete::" + upName) != null) {
					try {
						unittype.getUnittypeParameters().deleteUnittypeParameter(utp, xaps);
					} catch (SQLException ex) {
						throw new SQLException("Could not delete Unit Type parameter [" + utp.getName() + "]. Delete profile, unit, group and/or job parameters first.");
					}
				} else if (params.getParameter("update::" + upName) != null) {
					String updatedFlag = params.getParameter("update::" + upName).trim();
					if (!upFlag.equals(updatedFlag)) {
						utp.getFlag().setFlag(updatedFlag);
						unittype.getUnittypeParameters().addOrChangeUnittypeParameter(utp, xaps);
					}
				}
			}
			unittypeUpdated = true;
		}
	}

	/**
	 * Checks if is protocol.
	 *
	 * @param ut the ut
	 * @param protocol the protocol
	 * @return true, if is protocol
	 */
	public static boolean isProtocol(Unittype ut, String protocol) {
		if (ut == null)
			return false;
		return ut.getProtocol() != null && ut.getProtocol().equals(protocol);
	}

	/* (non-Javadoc)
	 * @see com.owera.xaps.web.app.page.WebPage#process(com.owera.xaps.web.app.input.ParameterParser, com.owera.xaps.web.app.output.ResponseHandler)
	 */
	public void process(ParameterParser params, Output outputHandler) throws Exception {
		// Get important var
		inputData = (UnittypeData) InputDataRetriever.parseInto(new UnittypeData(), params);

		sessionId = params.getSession().getId();

		xaps = XAPSLoader.getXAPS(sessionId);
		if (xaps == null) {
			outputHandler.setRedirectTarget(WebConstants.DB_LOGIN_URL);
			return;
		}

		InputDataIntegrity.loadAndStoreSession(params, outputHandler, inputData, inputData.getUnittype(), inputData.getProfile(), inputData.getUnit());

		Map<String, Object> root = outputHandler.getTemplateMap();

		String template = null;

		if (inputData.getUnittype().getString() != null) {
			unittype = xaps.getUnittype(inputData.getUnittype().getString());
			if (unittype == null) {
				SessionCache.getSessionData(sessionId).setUnittypeName(null);
			}
		}

		actionCUDUnittype();

		actionCUDParameters(params);

		if (unittypeUpdated) {
			outputHandler.setDirectToPage(Page.UNITTYPE);
			return;
		}

		List<Unittype> unittypes = getAllowedUnittypes(sessionId);

		if (unittype != null) {
			template = "/unit-type/details.ftl";
			root.put("syslogdate", SyslogUtil.getDateString());
			root.put("unittypes", unittypes);
			DropDownSingleSelect<String> protocols = InputSelectionFactory.getDropDownSingleSelect(inputData.getProtocol(), getDisplayValueFromProtocol(unittype.getProtocol()), Arrays.asList(NA_PROTOCOL, TR069_PROTOCOL));
			root.put("protocols", protocols);
			root.put("unittype", unittype);
			root.put("params", new TableElementMaker().getParameters(unittype.getUnittypeParameters().getUnittypeParameters()));
			String selectedFlag = inputData.getFilterFlag().getString() != null ? inputData.getFilterFlag().getString() : "All";
			DropDownSingleSelect<String> flags = InputSelectionFactory.getDropDownSingleSelect(inputData.getFilterFlag(), selectedFlag, UnittypeParameterFlags.toList());
			root.put("flags", flags);
			root.put("string", inputData.getFilterString().getString() != null ? inputData.getFilterString().getString() : "");
			root.put("tmsstart", SyslogUtil.getDateString());
			outputHandler.setTemplatePath(template);
		} else if (inputData.getUnittype().notNullNorValue("")) {
			outputHandler.setDirectResponse("Invalid Unit Type");
		} else {
			outputHandler.setDirectToPage(Page.UNITTYPEOVERVIEW);
		}
	}

	private static String getDisplayValueFromProtocol(ProvisioningProtocol protocol) {
		switch(protocol) {
		case NA:
			return NA_PROTOCOL;
		case TR069:
			return TR069_PROTOCOL;
		default:
			return protocol.toString();
		}
	}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:background="@drawable/list_shadow">

    <!--
            The FrameLayout below is used to clip touch effects. This is only a useless view on
            API 21+. On KitKat and lower, foreground drawables are not displayed correctly in
            the widget's remote views, so we need this workaround
     -->

    <FrameLayout
        android:id="@+id/widget_wide_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:foreground="?android:selectableItemBackground"
        tools:ignore="UselessParent">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/widget_wide_height"
            android:background="@color/widget_background">

            <ImageView
                android:id="@+id/widget_wide_artwork"
                android:layout_width="@dimen/widget_wide_height"
                android:layout_height="@dimen/widget_wide_height"
                android:src="@drawable/art_default_xl"
                android:scaleType="centerCrop"/>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/widget_wide_height"
                android:orientation="vertical"
                android:layout_toRightOf="@id/widget_wide_artwork"
                android:layout_toEndOf="@id/widget_wide_artwork"
                android:layout_above="@+id/widget_wide_controls"
                android:gravity="center_vertical"
                android:paddingLeft="@dimen/widget_padding"
                android:paddingRight="@dimen/widget_padding">

                <TextView
                    android:id="@+id/widget_square_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textColor="@color/widget_primary_text"
                    android:textDirection="locale"
                    style="@style/TextAppearance.AppCompat.Subhead"
                    tools:text="Song Name"/>

                <TextView
                    android:id="@+id/widget_wide_detail"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textColor="@color/widget_secondary_text"
                    android:textDirection="locale"
                    style="@style/TextAppearance.AppCompat.Body1"
                    tools:text="Artist – Album"/>

            </LinearLayout>

            <include layout="@layout/widget_view_controls"
                android:id="@+id/widget_wide_controls"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_marginBottom="@dimen/widget_button_padding"
                android:layout_toRightOf="@id/widget_wide_artwork"
                android:layout_toEndOf="@id/widget_wide_artwork"/>

        </RelativeLayout>

    </FrameLayout>

</FrameLayout>


text:
package com.myapp.test.server;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.jdo.Extent;
import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

import com.myapp.test.model.Message;

public class MessageRepository {

	PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions-optional");

	public Collection<Message> getAll() {
		PersistenceManager pm = pmfInstance.getPersistenceManager();
		try {
			List<Message> messages = new ArrayList<Message>();
		    Extent<Message> extent = pm.getExtent(Message.class, false);
		    for (Message message : extent) {
		        messages.add(message);
		    }
		    extent.closeAll();

		    return messages;
		} finally {
			pm.close();
		}
	}

	public void create(Message message) {
		PersistenceManager pm = pmfInstance.getPersistenceManager();
		try {
		    pm.makePersistent(message);
		} finally {
			pm.close();
		}
	}

	public void deleteById(Long id) {
		PersistenceManager pm = pmfInstance.getPersistenceManager();
		try {
			pm.deletePersistent(pm.getObjectById(Message.class, id));
		} finally {
			pm.close();
		}
	}
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: meathill
 * Date: 14-5-14
 * Time: 下午6:05
 */
require_once "Base.class.php";

class Fetcher extends \gamepop\Base {
  const SOURCE = 't_data_source';

  static $ALL = '*';

  public function getTable($fields) {
    return self::SOURCE;
  }
}


text:
login_facade_soap_bind       = ''
login_facade_soap_port         = 30623
login_facade_soap_service_name = '/weblab/login/soap/'

login_facade_xmlrpc_bind    = ''
login_facade_xmlrpc_port      = 39645

login_facade_json_bind      = ''
login_facade_json_port        = 38645

login_web_facade_port = 38745


text:
package apple.coredata;

import apple.NSObject;
import apple.foundation.NSArray;
import apple.foundation.NSCoder;
import apple.foundation.NSError;
import apple.foundation.NSMethodSignature;
import apple.foundation.NSPredicate;
import apple.foundation.NSSet;
import apple.foundation.NSSortDescriptor;
import apple.foundation.protocol.NSCoding;
import apple.foundation.protocol.NSCopying;
import org.moe.natj.c.ann.FunctionPtr;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Library;
import org.moe.natj.general.ann.Mapped;
import org.moe.natj.general.ann.MappedReturn;
import org.moe.natj.general.ann.NInt;
import org.moe.natj.general.ann.NUInt;
import org.moe.natj.general.ann.Owned;
import org.moe.natj.general.ann.ReferenceInfo;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.general.ptr.Ptr;
import org.moe.natj.general.ptr.VoidPtr;
import org.moe.natj.objc.Class;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.SEL;
import org.moe.natj.objc.ann.ObjCClassBinding;
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.map.ObjCObjectMapper;

@Generated
@Library("CoreData")
@Runtime(ObjCRuntime.class)
@ObjCClassBinding
public class NSFetchRequest<_ResultType> extends NSPersistentStoreRequest implements NSCoding, NSCopying {
    static {
        NatJ.register();
    }

    @Generated
    protected NSFetchRequest(Pointer peer) {
        super(peer);
    }

    @Generated
    @Selector("accessInstanceVariablesDirectly")
    public static native boolean accessInstanceVariablesDirectly();

    @Generated
    @Owned
    @Selector("alloc")
    public static native NSFetchRequest<?> alloc();

    @Owned
    @Generated
    @Selector("allocWithZone:")
    public static native NSFetchRequest<?> allocWithZone(VoidPtr zone);

    @Generated
    @Selector("automaticallyNotifiesObserversForKey:")
    public static native boolean automaticallyNotifiesObserversForKey(String key);

    @Generated
    @Selector("cancelPreviousPerformRequestsWithTarget:")
    public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget);

    @Generated
    @Selector("cancelPreviousPerformRequestsWithTarget:selector:object:")
    public static native void cancelPreviousPerformRequestsWithTargetSelectorObject(
            @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector,
            @Mapped(ObjCObjectMapper.class) Object anArgument);

    @Generated
    @Selector("classFallbacksForKeyedArchiver")
    public static native NSArray<String> classFallbacksForKeyedArchiver();

    @Generated
    @Selector("classForKeyedUnarchiver")
    public static native Class classForKeyedUnarchiver();

    @Generated
    @Selector("debugDescription")
    public static native String debugDescription_static();

    @Generated
    @Selector("description")
    public static native String description_static();

    @Generated
    @Selector("fetchRequestWithEntityName:")
    public static native <_ResultType> NSFetchRequest<?> fetchRequestWithEntityName(String entityName);

    @Generated
    @Selector("hash")
    @NUInt
    public static native long hash_static();

    @Generated
    @Selector("instanceMethodForSelector:")
    @FunctionPtr(name = "call_instanceMethodForSelector_ret")
    public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector);

    @Generated
    @Selector("instanceMethodSignatureForSelector:")
    public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector);

    @Generated
    @Selector("instancesRespondToSelector:")
    public static native boolean instancesRespondToSelector(SEL aSelector);

    @Generated
    @Selector("isSubclassOfClass:")
    public static native boolean isSubclassOfClass(Class aClass);

    @Generated
    @Selector("keyPathsForValuesAffectingValueForKey:")
    public static native NSSet<String> keyPathsForValuesAffectingValueForKey(String key);

    @Generated
    @Owned
    @Selector("new")
    public static native NSFetchRequest<?> new_objc();

    @Generated
    @Selector("resolveClassMethod:")
    public static native boolean resolveClassMethod(SEL sel);

    @Generated
    @Selector("resolveInstanceMethod:")
    public static native boolean resolveInstanceMethod(SEL sel);

    @Generated
    @Selector("setVersion:")
    public static native void setVersion_static(@NInt long aVersion);

    @Generated
    @Selector("superclass")
    public static native Class superclass_static();

    @Generated
    @Selector("version")
    @NInt
    public static native long version_static();

    @Generated
    @Selector("affectedStores")
    public native NSArray<? extends NSPersistentStore> affectedStores();

    @Generated
    @Selector("encodeWithCoder:")
    public native void encodeWithCoder(NSCoder coder);

    @Generated
    @Selector("entity")
    public native NSEntityDescription entity();

    @Generated
    @Selector("entityName")
    public native String entityName();

    /**
     * Executes the fetch request using the current managed object context. This method must be called from within a
     * block submitted to a managed object context.
     */
    @Generated
    @Selector("execute:")
    public native NSArray<?> execute(@ReferenceInfo(type = NSError.class) Ptr<NSError> error);

    /**
     * This breaks the result set into batches. The entire request will be evaluated, and the identities of all matching
     * objects will be recorded, but no more than batchSize objects' data will be fetched from the persistent store at a
     * time. The array returned from executing the request will be a subclass that transparently faults batches on
     * demand. For purposes of thread safety, the returned array proxy is owned by the NSManagedObjectContext the
     * request is executed against, and should be treated as if it were a managed object registered with that context. A
     * batch size of 0 is treated as infinite, which disables the batch faulting behavior. The default is 0.
     */
    @Generated
    @Selector("fetchBatchSize")
    @NUInt
    public native long fetchBatchSize();

    @Generated
    @Selector("fetchLimit")
    @NUInt
    public native long fetchLimit();

    /**
     * Allows you to specify an offset at which rows will begin being returned. Effectively, the request will skip over
     * 'offset' number of matching entries. For example, given a fetch which would normally return a, b, c, and d,
     * specifying an offset of 1 will return b, c, and d and an offset of 4 will return an empty array. Offsets are
     * ignored in nested requests such as subqueries. Default value is 0.
     */
    @Generated
    @Selector("fetchOffset")
    @NUInt
    public native long fetchOffset();

    /**
     * Specifies a predicate that will be used to filter rows being returned by a query containing a GROUP BY. If a
     * having predicate is
     * supplied, it will be run after the GROUP BY. Specifying a HAVING predicate requires that a GROUP BY also be
     * specified.
     */
    @Generated
    @Selector("havingPredicate")
    public native NSPredicate havingPredicate();

    /**
     * Results accommodate the currently unsaved changes in the NSManagedObjectContext. When disabled, the fetch request
     * skips checking unsaved changes and only returns objects that matched the predicate in the persistent store.
     * Defaults to YES.
     */
    @Generated
    @Selector("includesPendingChanges")
    public native boolean includesPendingChanges();

    /**
     * Returns/sets if, when the fetch is executed, property data is obtained from the persistent store. If the value is
     * set to NO, the request will not obtain property information, but only information to identify each object (used
     * to create NSManagedObjectIDs.) If managed objects for these IDs are later faulted (as a result attempting to
     * access property values), they will incur subsequent access to the persistent store to obtain their property
     * values. Defaults to YES.
     */
    @Generated
    @Selector("includesPropertyValues")
    public native boolean includesPropertyValues();

    /**
     * Returns/sets if the fetch request includes subentities. If set to NO, the request will fetch objects of exactly
     * the entity type of the request; if set to YES, the request will include all subentities of the entity for the
     * request. Defaults to YES.
     */
    @Generated
    @Selector("includesSubentities")
    public native boolean includesSubentities();

    @Generated
    @Selector("init")
    public native NSFetchRequest<?> init();

    @Generated
    @Selector("initWithCoder:")
    public native NSFetchRequest<?> initWithCoder(NSCoder coder);

    @Generated
    @Selector("initWithEntityName:")
    public native NSFetchRequest<?> initWithEntityName(String entityName);

    @Generated
    @Selector("predicate")
    public native NSPredicate predicate();

    /**
     * Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched. The
     * collection may represent attributes, to-one relationships, or NSExpressionDescription. If NSDictionaryResultType
     * is set, the results of the fetch will be dictionaries containing key/value pairs where the key is the name of the
     * specified property description. If NSManagedObjectResultType is set, then NSExpressionDescription cannot be used,
     * and the results are managed object faults partially pre-populated with the named properties
     */
    @Generated
    @Selector("propertiesToFetch")
    public native NSArray<?> propertiesToFetch();

    /**
     * Specifies the way in which data should be grouped before a select statement is run in an SQL database.
     * Values passed to propertiesToGroupBy must be NSPropertyDescriptions, NSExpressionDescriptions, or keypath
     * strings; keypaths can not contain
     * any to-many steps.
     * If GROUP BY is used, then you must set the resultsType to NSDictionaryResultsType, and the SELECT values must be
     * literals, aggregates,
     * or columns specified in the GROUP BY. Aggregates will operate on the groups specified in the GROUP BY rather than
     * the whole table.
     */
    @Generated
    @Selector("propertiesToGroupBy")
    public native NSArray<?> propertiesToGroupBy();

    /**
     * Returns/sets an array of relationship keypaths to prefetch along with the entity for the request. The array
     * contains keypath strings in NSKeyValueCoding notation, as you would normally use with valueForKeyPath.
     * (Prefetching allows Core Data to obtain developer-specified related objects in a single fetch (per entity),
     * rather than incurring subsequent access to the store for each individual record as their faults are tripped.)
     * Defaults to an empty array (no prefetching.)
     */
    @Generated
    @Selector("relationshipKeyPathsForPrefetching")
    public native NSArray<String> relationshipKeyPathsForPrefetching();

    /**
     * Returns/sets the result type of the fetch request (the instance type of objects returned from executing the
     * request.) Setting the value to NSManagedObjectIDResultType will demote any sort orderings to "best effort" hints
     * if property values are not included in the request. Defaults to NSManagedObjectResultType.
     */
    @Generated
    @Selector("resultType")
    @NUInt
    public native long resultType();

    /**
     * Returns/sets if the fetch request returns only distinct values for the fields specified by propertiesToFetch.
     * This value is only used for NSDictionaryResultType. Defaults to NO.
     */
    @Generated
    @Selector("returnsDistinctResults")
    public native boolean returnsDistinctResults();

    /**
     * Returns/sets if the objects resulting from a fetch request are faults. If the value is set to NO, the returned
     * objects are pre-populated with their property values (making them fully-faulted objects, which will immediately
     * return NO if sent the -isFault message.) If the value is set to YES, the returned objects are not pre-populated
     * (and will receive a -didFireFault message when the properties are accessed the first time.) This setting is not
     * utilized if the result type of the request is NSManagedObjectIDResultType, as object IDs do not have property
     * values. Defaults to YES.
     */
    @Generated
    @Selector("returnsObjectsAsFaults")
    public native boolean returnsObjectsAsFaults();

    @Generated
    @Selector("setAffectedStores:")
    public native void setAffectedStores(NSArray<? extends NSPersistentStore> value);

    @Generated
    @Selector("setEntity:")
    public native void setEntity(NSEntityDescription value);

    /**
     * This breaks the result set into batches. The entire request will be evaluated, and the identities of all matching
     * objects will be recorded, but no more than batchSize objects' data will be fetched from the persistent store at a
     * time. The array returned from executing the request will be a subclass that transparently faults batches on
     * demand. For purposes of thread safety, the returned array proxy is owned by the NSManagedObjectContext the
     * request is executed against, and should be treated as if it were a managed object registered with that context. A
     * batch size of 0 is treated as infinite, which disables the batch faulting behavior. The default is 0.
     */
    @Generated
    @Selector("setFetchBatchSize:")
    public native void setFetchBatchSize(@NUInt long value);

    @Generated
    @Selector("setFetchLimit:")
    public native void setFetchLimit(@NUInt long value);

    /**
     * Allows you to specify an offset at which rows will begin being returned. Effectively, the request will skip over
     * 'offset' number of matching entries. For example, given a fetch which would normally return a, b, c, and d,
     * specifying an offset of 1 will return b, c, and d and an offset of 4 will return an empty array. Offsets are
     * ignored in nested requests such as subqueries. Default value is 0.
     */
    @Generated
    @Selector("setFetchOffset:")
    public native void setFetchOffset(@NUInt long value);

    /**
     * Specifies a predicate that will be used to filter rows being returned by a query containing a GROUP BY. If a
     * having predicate is
     * supplied, it will be run after the GROUP BY. Specifying a HAVING predicate requires that a GROUP BY also be
     * specified.
     */
    @Generated
    @Selector("setHavingPredicate:")
    public native void setHavingPredicate(NSPredicate value);

    /**
     * Results accommodate the currently unsaved changes in the NSManagedObjectContext. When disabled, the fetch request
     * skips checking unsaved changes and only returns objects that matched the predicate in the persistent store.
     * Defaults to YES.
     */
    @Generated
    @Selector("setIncludesPendingChanges:")
    public native void setIncludesPendingChanges(boolean value);

    /**
     * Returns/sets if, when the fetch is executed, property data is obtained from the persistent store. If the value is
     * set to NO, the request will not obtain property information, but only information to identify each object (used
     * to create NSManagedObjectIDs.) If managed objects for these IDs are later faulted (as a result attempting to
     * access property values), they will incur subsequent access to the persistent store to obtain their property
     * values. Defaults to YES.
     */
    @Generated
    @Selector("setIncludesPropertyValues:")
    public native void setIncludesPropertyValues(boolean value);

    /**
     * Returns/sets if the fetch request includes subentities. If set to NO, the request will fetch objects of exactly
     * the entity type of the request; if set to YES, the request will include all subentities of the entity for the
     * request. Defaults to YES.
     */
    @Generated
    @Selector("setIncludesSubentities:")
    public native void setIncludesSubentities(boolean value);

    @Generated
    @Selector("setPredicate:")
    public native void setPredicate(NSPredicate value);

    /**
     * Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched. The
     * collection may represent attributes, to-one relationships, or NSExpressionDescription. If NSDictionaryResultType
     * is set, the results of the fetch will be dictionaries containing key/value pairs where the key is the name of the
     * specified property description. If NSManagedObjectResultType is set, then NSExpressionDescription cannot be used,
     * and the results are managed object faults partially pre-populated with the named properties
     */
    @Generated
    @Selector("setPropertiesToFetch:")
    public native void setPropertiesToFetch(NSArray<?> value);

    /**
     * Specifies the way in which data should be grouped before a select statement is run in an SQL database.
     * Values passed to propertiesToGroupBy must be NSPropertyDescriptions, NSExpressionDescriptions, or keypath
     * strings; keypaths can not contain
     * any to-many steps.
     * If GROUP BY is used, then you must set the resultsType to NSDictionaryResultsType, and the SELECT values must be
     * literals, aggregates,
     * or columns specified in the GROUP BY. Aggregates will operate on the groups specified in the GROUP BY rather than
     * the whole table.
     */
    @Generated
    @Selector("setPropertiesToGroupBy:")
    public native void setPropertiesToGroupBy(NSArray<?> value);

    /**
     * Returns/sets an array of relationship keypaths to prefetch along with the entity for the request. The array
     * contains keypath strings in NSKeyValueCoding notation, as you would normally use with valueForKeyPath.
     * (Prefetching allows Core Data to obtain developer-specified related objects in a single fetch (per entity),
     * rather than incurring subsequent access to the store for each individual record as their faults are tripped.)
     * Defaults to an empty array (no prefetching.)
     */
    @Generated
    @Selector("setRelationshipKeyPathsForPrefetching:")
    public native void setRelationshipKeyPathsForPrefetching(NSArray<String> value);

    /**
     * Returns/sets the result type of the fetch request (the instance type of objects returned from executing the
     * request.) Setting the value to NSManagedObjectIDResultType will demote any sort orderings to "best effort" hints
     * if property values are not included in the request. Defaults to NSManagedObjectResultType.
     */
    @Generated
    @Selector("setResultType:")
    public native void setResultType(@NUInt long value);

    /**
     * Returns/sets if the fetch request returns only distinct values for the fields specified by propertiesToFetch.
     * This value is only used for NSDictionaryResultType. Defaults to NO.
     */
    @Generated
    @Selector("setReturnsDistinctResults:")
    public native void setReturnsDistinctResults(boolean value);

    /**
     * Returns/sets if the objects resulting from a fetch request are faults. If the value is set to NO, the returned
     * objects are pre-populated with their property values (making them fully-faulted objects, which will immediately
     * return NO if sent the -isFault message.) If the value is set to YES, the returned objects are not pre-populated
     * (and will receive a -didFireFault message when the properties are accessed the first time.) This setting is not
     * utilized if the result type of the request is NSManagedObjectIDResultType, as object IDs do not have property
     * values. Defaults to YES.
     */
    @Generated
    @Selector("setReturnsObjectsAsFaults:")
    public native void setReturnsObjectsAsFaults(boolean value);

    @Generated
    @Selector("setShouldRefreshRefetchedObjects:")
    public native void setShouldRefreshRefetchedObjects(boolean value);

    @Generated
    @Selector("setSortDescriptors:")
    public native void setSortDescriptors(NSArray<? extends NSSortDescriptor> value);

    @Generated
    @Selector("shouldRefreshRefetchedObjects")
    public native boolean shouldRefreshRefetchedObjects();

    @Generated
    @Selector("sortDescriptors")
    public native NSArray<? extends NSSortDescriptor> sortDescriptors();

    @Generated
    @Owned
    @Selector("copyWithZone:")
    @MappedReturn(ObjCObjectMapper.class)
    public native Object copyWithZone(VoidPtr zone);
}


text:
package com.intellij.util.indexing.impl;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.Comparing;
import com.intellij.util.indexing.StorageException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;

public class MapInputDataDiffBuilder<Key, Value> extends DirectInputDataDiffBuilder<Key, Value> {
  @NotNull
  private final Map<Key, Value> myMap;

  public MapInputDataDiffBuilder(int inputId, @Nullable Map<Key, Value> map) {
    super(inputId);
    myMap = map == null ? Collections.emptyMap() : map;
  }

  @Override
  public boolean differentiate(@NotNull Map<Key, Value> newData,
                               @NotNull KeyValueUpdateProcessor<? super Key, ? super Value> addProcessor,
                               @NotNull KeyValueUpdateProcessor<? super Key, ? super Value> updateProcessor,
                               @NotNull RemovedKeyProcessor<? super Key> removeProcessor) throws StorageException {
    if (myMap.isEmpty()) {
      return EmptyInputDataDiffBuilder.processAllKeyValuesAsAdded(myInputId, newData, addProcessor);
    }
    if (newData.isEmpty()) {
      return EmptyInputDataDiffBuilder.processAllKeyValuesAsRemoved(myInputId, myMap, removeProcessor);
    }

    int added = 0;
    int removed = 0;
    int updated = 0;

    for (Map.Entry<Key, Value> e : myMap.entrySet()) {
      Key key = e.getKey();
      Value oldValue = e.getValue();
      Value newValue = newData.get(key);
      if (!Comparing.equal(oldValue, newValue) || (newValue == null && !newData.containsKey(key))) {
        if (newData.containsKey(key)) {
          updateProcessor.process(key, newValue, myInputId);
          updated++;
        }
        else {
          removeProcessor.process(key, myInputId);
          removed++;
        }
      }
    }

    for (Map.Entry<Key, Value> e : newData.entrySet()) {
      final Key newKey = e.getKey();
      if (!myMap.containsKey(newKey)) {
        addProcessor.process(newKey, e.getValue(), myInputId);
        added++;
      }
    }

    if (IndexDebugProperties.DEBUG) {
      updateStatistics(added, removed, updated, myMap, newData);
    }

    return added != 0 || removed != 0 || updated != 0;
  }

  @NotNull
  @Override
  public Collection<Key> getKeys() {
    return myMap.keySet();
  }

  private static <Key, Value> void updateStatistics(int added,
                                                    int removed,
                                                    int updated,
                                                    @NotNull Map<Key, Value> oldData,
                                                    @NotNull Map<Key, Value> newData) {
    incrementalAdditions.addAndGet(added);
    incrementalRemovals.addAndGet(removed);
    totalRemovals.addAndGet(oldData.size());
    totalAdditions.addAndGet(newData.size());

    if (added == 0 && removed == 0 && updated == 0) {
      noopModifications.incrementAndGet();
    }

    int requests = totalRequests.incrementAndGet();
    if ((requests & 0xFFFF) == 0) {
      Logger.getInstance(MapInputDataDiffBuilder.class).info(
        "Incremental index diff update: " + requests +
        ", removals: " + totalRemovals + "->" + incrementalRemovals +
        ", additions: " + totalAdditions + "->" + incrementalAdditions +
        ", no op changes: " + noopModifications
      );
    }
  }

  private static final AtomicInteger totalRequests = new AtomicInteger();
  private static final AtomicInteger totalRemovals = new AtomicInteger();
  private static final AtomicInteger totalAdditions = new AtomicInteger();
  private static final AtomicInteger incrementalRemovals = new AtomicInteger();
  private static final AtomicInteger incrementalAdditions = new AtomicInteger();
  private static final AtomicInteger noopModifications = new AtomicInteger();
}


text:
#include "Base.h"

#include "TextureTarget.h"
#include "Maths\Matrix4.h"
#include "Maths\Vector3.h"
#include "EngineInfo.h"

#include "Memory/DebugNew.h"
#include "Renderer/Renderer.h"

namespace CasaEngine
{
	/**
	 *
	 */
	TargetTexture::TargetTexture() :
		m_pTexture(NULL)
	{
	}

	/**
	 *
	 */
	const TargetTexture& TargetTexture::operator=( const TargetTexture& /*rsh_*/ )
	{
		return *this;
	}

	/**
	 *
	 */
	TargetTexture::~TargetTexture()
	{
		delete m_pTexture;
	}

	/**
	 *
	 */
	void TargetTexture::Create(const Vector2I& Size, PixelFormat::TPixelFormat Format)
	{
		m_pTexture = IRenderer::Get().CreateTexture(Size, Format);

	}

	/**
	 *
	 */
	void TargetTexture::Activate()
	{
		m_pOldRenderTarget = IRenderer::Get().GetRenderTarget();
		IRenderer::Get().SetRenderTarget(this);
	}

	/**
	 *
	 */
	void TargetTexture::Deactivate()
	{
		IRenderer::Get().SetRenderTarget(m_pOldRenderTarget);
	}

	/**
	 *
	 */
	ITextureBase *TargetTexture::GetTexture()
	{
		return m_pTexture;
	}

	/**
	 *
	 */
	bool TargetTexture::IsImageryCache() const
	{

	}

} // namespace CasaEngine


text:
class ClauseIterator;

// clause class definitions
class Clause {
public:
	// friend classes
	friend class ClauseIterator;

	// constructors and destructor
	Clause();
	Clause(const Clause &);
	Clause(const List<Term> &, int = -1, int = 0);
	~Clause();

	// assignment
	Clause &operator=(const Clause &);

	// comparisons
#if 0
	int operator==(const Clause &) const;
	int operator!=(const Clause &) const;
	int operator<=(const Clause &) const;
	int operator>=(const Clause &) const;
	int operator<(const Clause &) const;
	int operator>(const Clause &) const;
#endif

	// add or remove terms from clause
	void insert(const Term &);
	void remove(Term &);
	void clear();

	// tests to run on a clause
	int isInClause(const Term &) const;
	int isEmpty() const;
	int isATautology() const;
	int isPartOfConclusion() const;
	int subsumes(const Clause &) const;

	// access conclusion bit
	int getPartOfConclusion() const;
	void setPartOfConclusion(int);

	// access depth and number fields
	int getDepth() const;
	void setDepth(int);
	int getNumber() const;
	void setNumber(int);

        // union set operations
        Clause &operator|=(const Clause &);
        Clause operator|(const Clause &) const;

        // intersection set operations
        Clause &operator&=(const Clause &);
        Clause operator&(const Clause &) const;

        // difference set operations
        Clause &operator-=(const Clause &);
        Clause operator-(const Clause &) const;

	// dump data
	friend ostream &operator<<(ostream &, const Clause &);

protected:
	// internal data
	int depth;
	int number;
	int partOfConclusion;
	List<Term *> terms;
};

// clause iterator definition
class ClauseIterator {
public:
	// constructors and destructor
	ClauseIterator(const Clause &);
	ClauseIterator(const ClauseIterator &);
	~ClauseIterator();

	// reset iterator to start
	void reset();

	// check if at end of set
	int done() const;

	// return current member in set
	Term operator()();

	// advance to next set member
	int operator++(int);

private:
	// not allowed
	ClauseIterator &operator=(const ClauseIterator &);

protected:
	// internal data
	ListIterator<Term> iterator;
};

#endif


text:
"use strict";

var Hapi = require("hapi");
var server = new Hapi.Server();

server.connection({
    host: "localhost",
    port: Number(process.argv[2] || 8080)
});

function main(request, reply) {
    return reply("Hello " + request.params.name);
}

server.route({ path: "/{name}", method: "GET", handler: main });
server.start();