text:
var namespaceanonymous__namespace_02shell__to__hex_8C_03 =
[
    [ "Globals", "structanonymous__namespace_02shell__to__hex_8C_03_1_1Globals.html", "structanonymous__namespace_02shell__to__hex_8C_03_1_1Globals" ]
];


text:
package org.ehcache.sample.web.rest.errors;

import org.zalando.problem.AbstractThrowableProblem;
import org.zalando.problem.Status;

public class EmailNotFoundException extends AbstractThrowableProblem {

    private static final long serialVersionUID = 1L;

    public EmailNotFoundException() {
        super(ErrorConstants.EMAIL_NOT_FOUND_TYPE, "Email address not registered", Status.BAD_REQUEST);
    }
}

redpajama_set_name: RedPajamaGithub


text:
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module CloudfunctionsV2beta

      class AuditConfig
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class AuditLogConfig
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Binding
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class BuildConfig
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class EventFilter
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class EventTrigger
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Expr
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Function
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GenerateDownloadUrlRequest
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GenerateDownloadUrlResponse
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GenerateUploadUrlRequest
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GenerateUploadUrlResponse
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2OperationMetadata
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2Stage
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2StateMessage
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2alphaOperationMetadata
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2alphaStage
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2alphaStateMessage
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2betaOperationMetadata
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2betaStage
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class GoogleCloudFunctionsV2betaStateMessage
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class ListFunctionsResponse
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class ListLocationsResponse
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class ListOperationsResponse
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class ListRuntimesResponse
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Location
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Operation
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class OperationMetadataV1
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Policy
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class RepoSource
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Runtime
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class SecretEnvVar
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class SecretVersion
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class SecretVolume
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class ServiceConfig
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class SetIamPolicyRequest
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Source
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class SourceProvenance
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class Status
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class StorageSource
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class TestIamPermissionsRequest
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class TestIamPermissionsResponse
        class Representation < Google::Apis::Core::JsonRepresentation; end

        include Google::Apis::Core::JsonObjectSupport
      end

      class AuditConfig
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudfunctionsV2beta::AuditLogConfig, decorator: Google::Apis::CloudfunctionsV2beta::AuditLogConfig::Representation

          property :service, as: 'service'
        end
      end

      class AuditLogConfig
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :exempted_members, as: 'exemptedMembers'
          property :log_type, as: 'logType'
        end
      end

      class Binding
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :condition, as: 'condition', class: Google::Apis::CloudfunctionsV2beta::Expr, decorator: Google::Apis::CloudfunctionsV2beta::Expr::Representation

          collection :members, as: 'members'
          property :role, as: 'role'
        end
      end

      class BuildConfig
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :build, as: 'build'
          property :buildpack_stack, as: 'buildpackStack'
          property :docker_registry, as: 'dockerRegistry'
          property :docker_repository, as: 'dockerRepository'
          property :entry_point, as: 'entryPoint'
          hash :environment_variables, as: 'environmentVariables'
          property :runtime, as: 'runtime'
          property :source, as: 'source', class: Google::Apis::CloudfunctionsV2beta::Source, decorator: Google::Apis::CloudfunctionsV2beta::Source::Representation

          property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudfunctionsV2beta::SourceProvenance, decorator: Google::Apis::CloudfunctionsV2beta::SourceProvenance::Representation

          property :worker_pool, as: 'workerPool'
        end
      end

      class EventFilter
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :attribute, as: 'attribute'
          property :operator, as: 'operator'
          property :value, as: 'value'
        end
      end

      class EventTrigger
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :channel, as: 'channel'
          collection :event_filters, as: 'eventFilters', class: Google::Apis::CloudfunctionsV2beta::EventFilter, decorator: Google::Apis::CloudfunctionsV2beta::EventFilter::Representation

          property :event_type, as: 'eventType'
          property :pubsub_topic, as: 'pubsubTopic'
          property :retry_policy, as: 'retryPolicy'
          property :service_account_email, as: 'serviceAccountEmail'
          property :trigger, as: 'trigger'
          property :trigger_region, as: 'triggerRegion'
        end
      end

      class Expr
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :description, as: 'description'
          property :expression, as: 'expression'
          property :location, as: 'location'
          property :title, as: 'title'
        end
      end

      class Function
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :build_config, as: 'buildConfig', class: Google::Apis::CloudfunctionsV2beta::BuildConfig, decorator: Google::Apis::CloudfunctionsV2beta::BuildConfig::Representation

          property :description, as: 'description'
          property :environment, as: 'environment'
          property :event_trigger, as: 'eventTrigger', class: Google::Apis::CloudfunctionsV2beta::EventTrigger, decorator: Google::Apis::CloudfunctionsV2beta::EventTrigger::Representation

          hash :labels, as: 'labels'
          property :name, as: 'name'
          property :service_config, as: 'serviceConfig', class: Google::Apis::CloudfunctionsV2beta::ServiceConfig, decorator: Google::Apis::CloudfunctionsV2beta::ServiceConfig::Representation

          property :state, as: 'state'
          collection :state_messages, as: 'stateMessages', class: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2betaStateMessage, decorator: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2betaStateMessage::Representation

          property :update_time, as: 'updateTime'
        end
      end

      class GenerateDownloadUrlRequest
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
        end
      end

      class GenerateDownloadUrlResponse
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :download_url, as: 'downloadUrl'
        end
      end

      class GenerateUploadUrlRequest
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
        end
      end

      class GenerateUploadUrlResponse
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :storage_source, as: 'storageSource', class: Google::Apis::CloudfunctionsV2beta::StorageSource, decorator: Google::Apis::CloudfunctionsV2beta::StorageSource::Representation

          property :upload_url, as: 'uploadUrl'
        end
      end

      class GoogleCloudFunctionsV2OperationMetadata
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :api_version, as: 'apiVersion'
          property :cancel_requested, as: 'cancelRequested'
          property :create_time, as: 'createTime'
          property :end_time, as: 'endTime'
          hash :request_resource, as: 'requestResource'
          collection :stages, as: 'stages', class: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2Stage, decorator: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2Stage::Representation

          property :status_detail, as: 'statusDetail'
          property :target, as: 'target'
          property :verb, as: 'verb'
        end
      end

      class GoogleCloudFunctionsV2Stage
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :message, as: 'message'
          property :name, as: 'name'
          property :resource, as: 'resource'
          property :resource_uri, as: 'resourceUri'
          property :state, as: 'state'
          collection :state_messages, as: 'stateMessages', class: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2StateMessage, decorator: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2StateMessage::Representation

        end
      end

      class GoogleCloudFunctionsV2StateMessage
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :message, as: 'message'
          property :severity, as: 'severity'
          property :type, as: 'type'
        end
      end

      class GoogleCloudFunctionsV2alphaOperationMetadata
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :api_version, as: 'apiVersion'
          property :cancel_requested, as: 'cancelRequested'
          property :create_time, as: 'createTime'
          property :end_time, as: 'endTime'
          hash :request_resource, as: 'requestResource'
          collection :stages, as: 'stages', class: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2alphaStage, decorator: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2alphaStage::Representation

          property :status_detail, as: 'statusDetail'
          property :target, as: 'target'
          property :verb, as: 'verb'
        end
      end

      class GoogleCloudFunctionsV2alphaStage
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :message, as: 'message'
          property :name, as: 'name'
          property :resource, as: 'resource'
          property :resource_uri, as: 'resourceUri'
          property :state, as: 'state'
          collection :state_messages, as: 'stateMessages', class: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2alphaStateMessage, decorator: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2alphaStateMessage::Representation

        end
      end

      class GoogleCloudFunctionsV2alphaStateMessage
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :message, as: 'message'
          property :severity, as: 'severity'
          property :type, as: 'type'
        end
      end

      class GoogleCloudFunctionsV2betaOperationMetadata
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :api_version, as: 'apiVersion'
          property :cancel_requested, as: 'cancelRequested'
          property :create_time, as: 'createTime'
          property :end_time, as: 'endTime'
          hash :request_resource, as: 'requestResource'
          collection :stages, as: 'stages', class: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2betaStage, decorator: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2betaStage::Representation

          property :status_detail, as: 'statusDetail'
          property :target, as: 'target'
          property :verb, as: 'verb'
        end
      end

      class GoogleCloudFunctionsV2betaStage
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :message, as: 'message'
          property :name, as: 'name'
          property :resource, as: 'resource'
          property :resource_uri, as: 'resourceUri'
          property :state, as: 'state'
          collection :state_messages, as: 'stateMessages', class: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2betaStateMessage, decorator: Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2betaStateMessage::Representation

        end
      end

      class GoogleCloudFunctionsV2betaStateMessage
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :message, as: 'message'
          property :severity, as: 'severity'
          property :type, as: 'type'
        end
      end

      class ListFunctionsResponse
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :functions, as: 'functions', class: Google::Apis::CloudfunctionsV2beta::Function, decorator: Google::Apis::CloudfunctionsV2beta::Function::Representation

          property :next_page_token, as: 'nextPageToken'
          collection :unreachable, as: 'unreachable'
        end
      end

      class ListLocationsResponse
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :locations, as: 'locations', class: Google::Apis::CloudfunctionsV2beta::Location, decorator: Google::Apis::CloudfunctionsV2beta::Location::Representation

          property :next_page_token, as: 'nextPageToken'
        end
      end

      class ListOperationsResponse
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :next_page_token, as: 'nextPageToken'
          collection :operations, as: 'operations', class: Google::Apis::CloudfunctionsV2beta::Operation, decorator: Google::Apis::CloudfunctionsV2beta::Operation::Representation

        end
      end

      class ListRuntimesResponse
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :runtimes, as: 'runtimes', class: Google::Apis::CloudfunctionsV2beta::Runtime, decorator: Google::Apis::CloudfunctionsV2beta::Runtime::Representation

        end
      end

      class Location
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :display_name, as: 'displayName'
          hash :labels, as: 'labels'
          property :location_id, as: 'locationId'
          hash :metadata, as: 'metadata'
          property :name, as: 'name'
        end
      end

      class Operation
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :done, as: 'done'
          property :error, as: 'error', class: Google::Apis::CloudfunctionsV2beta::Status, decorator: Google::Apis::CloudfunctionsV2beta::Status::Representation

          hash :metadata, as: 'metadata'
          property :name, as: 'name'
          hash :response, as: 'response'
        end
      end

      class OperationMetadataV1
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :build_id, as: 'buildId'
          property :build_name, as: 'buildName'
          hash :request, as: 'request'
          property :source_token, as: 'sourceToken'
          property :target, as: 'target'
          property :type, as: 'type'
          property :update_time, as: 'updateTime'
          property :version_id, :numeric_string => true, as: 'versionId'
        end
      end

      class Policy
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudfunctionsV2beta::AuditConfig, decorator: Google::Apis::CloudfunctionsV2beta::AuditConfig::Representation

          collection :bindings, as: 'bindings', class: Google::Apis::CloudfunctionsV2beta::Binding, decorator: Google::Apis::CloudfunctionsV2beta::Binding::Representation

          property :etag, :base64 => true, as: 'etag'
          property :version, as: 'version'
        end
      end

      class RepoSource
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :branch_name, as: 'branchName'
          property :commit_sha, as: 'commitSha'
          property :dir, as: 'dir'
          property :invert_regex, as: 'invertRegex'
          property :project_id, as: 'projectId'
          property :repo_name, as: 'repoName'
          property :tag_name, as: 'tagName'
        end
      end

      class Runtime
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :display_name, as: 'displayName'
          property :environment, as: 'environment'
          property :name, as: 'name'
          property :stage, as: 'stage'
          collection :warnings, as: 'warnings'
        end
      end

      class SecretEnvVar
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :key, as: 'key'
          property :project_id, as: 'projectId'
          property :secret, as: 'secret'
          property :version, as: 'version'
        end
      end

      class SecretVersion
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :path, as: 'path'
          property :version, as: 'version'
        end
      end

      class SecretVolume
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :mount_path, as: 'mountPath'
          property :project_id, as: 'projectId'
          property :secret, as: 'secret'
          collection :versions, as: 'versions', class: Google::Apis::CloudfunctionsV2beta::SecretVersion, decorator: Google::Apis::CloudfunctionsV2beta::SecretVersion::Representation

        end
      end

      class ServiceConfig
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :all_traffic_on_latest_revision, as: 'allTrafficOnLatestRevision'
          property :available_memory, as: 'availableMemory'
          hash :environment_variables, as: 'environmentVariables'
          property :ingress_settings, as: 'ingressSettings'
          property :max_instance_count, as: 'maxInstanceCount'
          property :min_instance_count, as: 'minInstanceCount'
          property :revision, as: 'revision'
          collection :secret_environment_variables, as: 'secretEnvironmentVariables', class: Google::Apis::CloudfunctionsV2beta::SecretEnvVar, decorator: Google::Apis::CloudfunctionsV2beta::SecretEnvVar::Representation

          collection :secret_volumes, as: 'secretVolumes', class: Google::Apis::CloudfunctionsV2beta::SecretVolume, decorator: Google::Apis::CloudfunctionsV2beta::SecretVolume::Representation

          property :security_level, as: 'securityLevel'
          property :service, as: 'service'
          property :service_account_email, as: 'serviceAccountEmail'
          property :timeout_seconds, as: 'timeoutSeconds'
          property :uri, as: 'uri'
          property :vpc_connector, as: 'vpcConnector'
          property :vpc_connector_egress_settings, as: 'vpcConnectorEgressSettings'
        end
      end

      class SetIamPolicyRequest
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :policy, as: 'policy', class: Google::Apis::CloudfunctionsV2beta::Policy, decorator: Google::Apis::CloudfunctionsV2beta::Policy::Representation

          property :update_mask, as: 'updateMask'
        end
      end

      class Source
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :repo_source, as: 'repoSource', class: Google::Apis::CloudfunctionsV2beta::RepoSource, decorator: Google::Apis::CloudfunctionsV2beta::RepoSource::Representation

          property :storage_source, as: 'storageSource', class: Google::Apis::CloudfunctionsV2beta::StorageSource, decorator: Google::Apis::CloudfunctionsV2beta::StorageSource::Representation

        end
      end

      class SourceProvenance
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :resolved_repo_source, as: 'resolvedRepoSource', class: Google::Apis::CloudfunctionsV2beta::RepoSource, decorator: Google::Apis::CloudfunctionsV2beta::RepoSource::Representation

          property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudfunctionsV2beta::StorageSource, decorator: Google::Apis::CloudfunctionsV2beta::StorageSource::Representation

        end
      end

      class Status
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :code, as: 'code'
          collection :details, as: 'details'
          property :message, as: 'message'
        end
      end

      class StorageSource
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          property :bucket, as: 'bucket'
          property :generation, :numeric_string => true, as: 'generation'
          property :object, as: 'object'
        end
      end

      class TestIamPermissionsRequest
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :permissions, as: 'permissions'
        end
      end

      class TestIamPermissionsResponse
        # @private
        class Representation < Google::Apis::Core::JsonRepresentation
          collection :permissions, as: 'permissions'
        end
      end
    end
  end
end


text:
<?php

abstract class Shineisp_Banks_BNL_Igfs_BaseIgfsCgInit extends Shineisp_Banks_BNL_Igfs_BaseIgfsCg {

	public $shopID; // chiave messaggio

	function __construct() {
		parent::__construct();
	}

	protected function resetFields() {
		parent::resetFields();
		$this->shopID = NULL;
	}

	protected function checkFields() {
		parent::checkFields();
		if ($this->shopID == NULL || "" == $this->shopID)
			Shineisp_Commons_Utilities::logs ("---> Missing shopID", 'bnl_igfs.log');
			return false;
	}

	protected function buildRequest() {
		$request = parent::buildRequest();
		$request = $this->replaceRequest($request, "{shopID}", $this->shopID);
		return $request;
	}

	protected function getServicePort() {
		return "PaymentInitGatewayPort";
	}

}

?>


text:
/**
 * (c) 2014 Vincenzo Cappello
 * This projected is licensed under the terms of the MIT license,
 * refer to the file LICENSE.txt.
 */

#ifndef WIN_EVENT_H
#define WIN_EVENT_H

#include <list>
#include <functional>
#include <algorithm>

namespace win
{

/**
 * Event delegate type, call all registered std::function when
 * the event is fired.
 *
 * For example you can declare an event with an integer argument:
 *
 *     // Declare an event with an integer argument
 *     Event<int> onIntEvent;
 *
 * Later you register an event handler, it can be a lambda:
 *
 *     // Handle integer event
 *     onIntEvent.add([&](int arg){
 *       std::cout << "The argument is: " << arg << std::endl;
 *     });
 *
 * Later you can fire the event giving desired argument value:
 *
 *     // Fire the event with the integer value 5
 *     onIntEvent.fire (5);
 */
template<typename...Arguments>
class Event
{
public:
	Event() {
	}
	virtual ~Event() {
	}

public:
	using handler_t = std::function<void(Arguments...)>;

	void fire(Arguments... parameters) {
		for(auto handler : registry)
			handler (parameters...);
	}

	void add(handler_t handler) {
		registry.push_back (handler);
	}

	void remove(handler_t handler) {
		auto handler_itor = std::find(registry.begin(), registry.end(), handler);
		if (handler_itor != registry.end())
			registry.erase (handler_itor);
	}

	void clear() {
		registry.clear();
	}

	bool hasSubscriptions() const { return !registry.empty(); }

protected:
	std::list<handler_t> registry;
};

}

#endif // WIN_EVENT_H


text:
title:  Pristavi posle Edemskog vrta
date:   27/01/2018
---

### Tekstovi za proučavanje u toku sedmice:
Isaija 22,14-18; 1. Korinćanima 4,1.2; Kološanima 2,2.3; Efescima 6,13-17; 2. Korinćanima 5,10.

>
Tekst za pamćenje

> »Nego kako nas okuša Bog da smo vjerni da primimo Jevanđelje, tako govorimo, ne kao ljudima ugađajući nego Bogu koji kuša srca naša.« (1. Solunjanima 2,4)

Adamov i Evin prvi posao obuhvatao je pristavsku službu. Vrt i sva dela stvaranja data su im na staranje, da uživaju u njima i da njima vladaju (1. Mojsijeva 2,15), čak iako ništa nije bilo njihova svojina. Oni su bili pristavi onoga što im je Gospod poverio.

Ove sedmice podrobnije ćemo proučiti definiciju pristava posle pada, nakon što su naši praroditelji bili izagnani iz Edemskog vrta. Mi smo, takođe, pristavi, ali u sredini potpuno drugačijoj od one u kojoj su Adam i Eva prvobitno boravili.

Šta je pristavska služba? Određene biblijske ličnosti svojim životom otkrile su šta znači biti pristav. Pojedine biblijske knjige to jasno određuju. Kada postanemo Božji pristavi, središte naše pažnje se pomera sa sveta i njegovih materijalističkih vrednosti na Stvoritelja i Njegovu misiju. Kao u Adamovom i Evinom slučaju, Bog nam poverava odgovornosti koje imaju božansko poreklo. Međutim, od pada u Edemskom vrtu, zadatak pristavske službe se promenio zato što nam je pored odgovornosti da brinemo o materijalnom svetu poveren zadatak da budemo dobri pristavi duhovnih istina.


text:
//
//  Rectangle.h
//  gowengamedev-framework
//
//  Created by Stephen Gowen on 2/22/14.
//  Copyright (c) 2015 Gowen Game Dev. All rights reserved.
//

#ifndef Rectangle_H
#define Rectangle_H

#include <memory>

class Vector2D;

class Rectangle
{
public:
    Rectangle(float x, float y, float width, float height, float angle = 0);

    Vector2D& getLowerLeft();

    const float getWidth() const;

    const void setWidth(float width);

    const float getHeight() const;

    const void setHeight(float height);

    const float getAngle() const;

    const void setAngle(float angle);

private:
    std::unique_ptr<Vector2D> m_LowerLeft;
    float m_fWidth;
    float m_fHeight;
    float m_fAngle;
};

#endif /* Rectangle_H */


text:
class IdentificationsController < ApplicationController
  before_action :doorkeeper_authorize!, :only => [ :create, :update, :destroy ], :if => lambda { authenticate_with_oauth? }
  before_filter :authenticate_user!, :except => [:by_login], :unless => lambda { authenticated_with_oauth? }
  before_filter :load_user_by_login, :only => [:by_login]
  load_only = [ :show, :edit, :update, :destroy ]
  before_filter :load_identification, :only => load_only
  blocks_spam :only => load_only, :instance => :identification
  before_filter :require_owner, :only => [:edit, :update, :destroy]
  cache_sweeper :comment_sweeper, :only => [:create, :update, :destroy, :agree]
  caches_action :bold, :expires_in => 6.hours, :cache_path => Proc.new {|c|
    c.params.merge(:sequence => Digest::MD5.hexdigest(c.params[:sequence]))
  }

  def index
    per_page = 50
    search_params = {
      order_by: "id",
      order: "desc",
      per_page: per_page,
      page: params[:page] || 1,
      d1: params[:d1],
      d2: params[:d2]
    }
    if Identification::CATEGORIES.include?( params[:category] )
      search_params[:category] = params[:category]
    end
    if params[:user_id]
      if user = ( User.find_by_id( params[:user_id] ) || User.find_by_login( params[:user_id] ) )
        search_params[:user_id] = user.id
      end
    end
    if params[:current].blank? || params[:current].yesish?
      search_params[:current] = "true"
    elsif params[:current].noish?
      search_params[:current] = "false"
    else
      search_params[:current] = "any"
    end
    if params[:for] == "others"
      search_params[:own_observation] = "false"
    elsif params[:for] == "self"
      search_params[:own_observation] = "true"
    end
    search_params[:taxon_id] = params[:taxon_id] if params[:taxon_id]
    api_response = INatAPIService.identifications(search_params)
    ids = Identification.where(id: api_response.results.map{ |r| r["id"] }).
      includes(:observation, :user, { taxon: [ { taxon_names: :place_taxon_names }, :photos ] }).order(id: :desc)
    Observation.preload_for_component(ids.map(&:observation), logged_in: logged_in?)
    @identifications = WillPaginate::Collection.create(params[:page] || 1, per_page,
      api_response.total_results) do |pager|
      pager.replace(ids)
    end

    counts_response = INatAPIService.identifications_categories(search_params)
    @counts = Hash[counts_response.results.map{ |r| [ r["category"], r["count"] ] }]
    respond_to do |format|
      format.html { render layout: "bootstrap" }
    end
  end

  def show
    redirect_to observation_url(@identification.observation, :anchor => "identification-#{@identification.id}")
  end

  def by_login
    block_if_spammer(@selected_user) && return
    params[:page] = params[:page].to_i
    params[:page] = 1 unless params[:page] > 0
    user_filter = { term: { "identifications.user.id": @selected_user.id } }
    ownership_filter = { term: { "identifications.own_observation": false } }
    date_parts = Identification.conditions_for_date("col", params[:on])
    # only if conditions_for_date determines a valid range will it return
    # an array of [ condition_to_interpolate, min_date, max_date ]
    if date_parts.length == 3
      date_filters = [
        { range: { "identifications.created_at": { gte: date_parts[1] } } },
        { range: { "identifications.created_at": { lte: date_parts[2] } } }
      ]
    end
    result = Observation.elastic_search(
      filters: [ { nested: {
        path: "identifications",
        query: { bool: { must: [ user_filter, date_filters, ownership_filter ].flatten.compact } }
      } } ],
      size: limited_per_page,
      from: (params[:page] - 1) * limited_per_page,
      sort: {
        "identifications.created_at": {
          order: "desc",
          mode: "max",
          nested_path: "identifications",
          nested_filter: user_filter
        }
      }
    )
    # pluck the proper Identification IDs from the obs results
    ids = result.response.hits.hits.map do |h|
      ( h._source.identifications).detect{ |i|
        i.user.id == @selected_user.id
      }
    end.compact.map{ |i| i.id }
    # fetch the Identification instances and preload
    instances = Identification.where(id: ids).order(id: :desc).includes(
      { observation: [ :user, :photos, { taxon: [{taxon_names: :place_taxon_names}, :photos] } ] },
      { taxon: [{taxon_names: :place_taxon_names}, :photos] },
      :user
    )
    # turn the instances into a WillPaginate Collection
    @identifications = WillPaginate::Collection.create(params[:page], limited_per_page,
      result.response.hits.total) do |pager|
      pager.replace(instances.to_a)
    end
    respond_to do |format|
      format.html do
        @identifications_by_obs_id = @identifications.index_by(&:observation_id)
        @observations = @identifications.collect(&:observation)
        @other_ids = Identification.where(observation_id: @observations).where("user_id != ?", @selected_user).
          includes(:observation, :taxon)
        @other_id_stats = {}
        @other_ids.group_by(&:observation).each do |obs, ids|
          user_ident = @identifications_by_obs_id[obs.id]
          agreements = ids.select do |ident|
            ident.in_agreement_with?(user_ident)
          end
          @other_id_stats[obs.id] = {
            :num_agreements => agreements.size,
            :num_disagreements => ids.size - agreements.size
          }
        end
      end
      format.json do
        pagination_headers_for( @identifications )
        taxon_options = {
          only: [:id, :name, :rank],
          methods: [:default_name, :photo_url, :iconic_taxon_name]
        }
        render json: @identifications.as_json( include: [
          {
            taxon: taxon_options
          },
          {
            observation: {
              only: [:id, :species_guess],
              methods: [:iconic_taxon_name],
              include: {
                taxon: taxon_options,
                photos: {
                  only: [:id, :square_url, :thumb_url, :small_url, :medium_url, :large_url],
                  methods: [:license_code, :attribution]
                }
              }
            }
          }
        ] )
      end
    end
  end

  # POST identification_url
  def create
    @identification = Identification.new(params[:identification])
    @identification.user = current_user
    if @identification.taxon.blank? && params[:taxa_search_form_taxon_name]
      taxon_name = TaxonName.find_by_name(params[:taxa_search_form_taxon_name])
      @identification.taxon = taxon_name.taxon if taxon_name
    end
    if params[:vision]
      @identification.prefers_vision = true
    end
    respond_to do |format|
      duplicate_key_violation = false
      begin
        @identification.save
      rescue PG::Error, ActiveRecord::RecordNotUnique => e
        raise e unless e =~ /index_identifications_on_current/
        duplicate_key_violation = true
      end
      if @identification.valid? && duplicate_key_violation == false
        format.html do
          flash[:notice] = t(:identification_saved)
          if params[:return_to]
            return redirect_to(params[:return_to])
          end
          redirect_to @identification.observation and return
        end

        format.json do
          Observation.refresh_es_index
          @identification.html = view_context.render_in_format(:html, :partial => "identifications/identification")
          render :json => @identification.to_json(
            :methods => [:html, :vision],
            :include => {
              :observation => {:methods => [:iconic_taxon_name]}
            }
          ).html_safe
        end
      else
        format.html do
          flash[:error] = t(:there_was_a_problem_saving_your_identification, :error => @identification.errors.full_messages.join(', '))
          if params[:return_to]
            return redirect_to(params[:return_to])
          end
          redirect_to @identification.observation || root_url
          return
        end

        format.json do
          render :status => :unprocessable_entity, :json => {:errors => @identification.errors.full_messages }
        end
      end
    end
  end

  def edit
    render layout: "bootstrap"
  end

  def update
    if @identification.update_attributes(params[:identification])
      msg = t(:identification_updated)
      respond_to do |format|
        format.html do
          flash[:notice] = msg
          redirect_to @identification.observation
        end
        format.json do
          Observation.refresh_es_index
          render :json => @identification
        end
      end
    else
      msg = t(:there_was_a_problem_saving_your_identification, :error => @identification.errors.full_messages.join(', '))
      respond_to do |format|
        format.html do
          flash[:error] = msg
          redirect_to @identification.observation
        end
        format.json do
          render :status => :unprocessable_entity, :json => {:errors => @identification.errors.full_messages}
        end
      end
    end
  end

  # DELETE identification_url
  def destroy
    observation = @identification.observation
    if params[:delete]
      @identification.destroy
    else
      @identification.update_attributes( current: false )
    end
    respond_to do |format|
      format.html do
        flash[:notice] = if @identification.frozen?
          t(:identification_deleted)
        else
          t(:identification_withdrawn)
        end
        redirect_to observation
      end
      format.js do
        Observation.refresh_es_index
        render :status => :ok, :json => nil
      end
      format.json do
        Observation.refresh_es_index
        render :status => :ok, :json => nil
      end
    end
  end

## Custom actions ############################################################

  # Agree with an identification
  def agree
    unless @observation = Observation.find_by_id(params[:observation_id])
      render_404
      return
    end
    @old_identification = @observation.identifications.by(current_user).current.last
    if @old_identification && @old_identification.taxon_id == params[:taxon_id].to_i
      @identification = @old_identification
    else
      @identification = Identification.new(
        :user => current_user,
        :taxon_id => params[:taxon_id].to_i,
        :observation_id => params[:observation_id]
      )
    end

    respond_to do |format|
      duplicate_key_violation = false
      begin
        @identification.save
      rescue PG::Error, ActiveRecord::RecordNotUnique => e
        raise e unless e =~ /index_identifications_on_current/
        duplicate_key_violation = true
      end
      if @identification.valid? && duplicate_key_violation == false
        format.html { agree_respond_to_html }
        format.json do
          @identification.html = view_context.render_in_format(:html, :partial => "identifications/identification")
          render :json => @identification.to_json(:methods => [:html])
        end
      else
        format.html { agree_respond_to_html_failure }
        format.json do
          render :status => :unprocessable_entity, :json => {:errors => @identification.errors.full_messages }
        end
      end
    end
  end

  def bold
    url = "http://boldsystems.org/index.php/Ids_xml?db=#{params[:db]}&sequence=#{params[:sequence]}"
    xml = begin
      Nokogiri::XML(open(url))
    rescue URI::InvalidURIError => e
      "<error>#{e.message}</error>"
    end
    respond_to do |format|
      format.xml { render :xml => xml }
    end
  end

  private

  def agree_respond_to_html
    flash[:notice] = t(:identification_saved)
    if params[:return_to]
      return redirect_to(params[:return_to])
    end
    redirect_to @identification.observation
  end

  def agree_respond_to_html_failure
    flash[:error] = t(:there_was_a_problem_saving_your_identification, :error => @identification.errors.full_messages.join(', '))
    if params[:return_to]
      return redirect_to(params[:return_to])
    end
    redirect_to @identification.observation
  end

  def load_identification
    render_404 unless @identification = Identification.find_by_id(params[:id])
  end

  def require_owner
    unless logged_in? && @identification.user_id == current_user.id
      redirect_to_hell
    end
  end
end


text:
package org.apache.commons.collections4.functors;

import java.io.Serializable;
import java.util.Objects;

import org.apache.commons.collections4.Closure;
import org.apache.commons.collections4.Predicate;

/**
 * Closure implementation acts as an if statement calling one or other closure
 * based on a predicate.
 *
 * @since 3.0
 */
public class IfClosure<E> implements Closure<E>, Serializable {

    /** Serial version UID */
    private static final long serialVersionUID = 3518477308466486130L;

    /** The test */
    private final Predicate<? super E> iPredicate;
    /** The closure to use if true */
    private final Closure<? super E> iTrueClosure;
    /** The closure to use if false */
    private final Closure<? super E> iFalseClosure;

    /**
     * Factory method that performs validation.
     *

     * This factory creates a closure that performs no action when
     * the predicate is false.
     *
     * @param <E> the type that the closure acts on
     * @param predicate  predicate to switch on
     * @param trueClosure  closure used if true
     * @return the {@code if} closure
     * @throws NullPointerException if either argument is null
     * @since 3.2
     */
    public static <E> Closure<E> ifClosure(final Predicate<? super E> predicate, final Closure<? super E> trueClosure) {
        return IfClosure.<E>ifClosure(predicate, trueClosure, NOPClosure.<E>nopClosure());
    }

    /**
     * Factory method that performs validation.
     *
     * @param <E> the type that the closure acts on
     * @param predicate  predicate to switch on
     * @param trueClosure  closure used if true
     * @param falseClosure  closure used if false
     * @return the {@code if} closure
     * @throws NullPointerException if any argument is null
     */
    public static <E> Closure<E> ifClosure(final Predicate<? super E> predicate,
                                           final Closure<? super E> trueClosure,
                                           final Closure<? super E> falseClosure) {
        return new IfClosure<>(Objects.requireNonNull(predicate, "predicate"),
                Objects.requireNonNull(trueClosure, "trueClosure"),
                Objects.requireNonNull(falseClosure, "falseClosure"));
    }

    /**
     * Constructor that performs no validation.
     * Use {@code ifClosure} if you want that.
     *

     * This constructor creates a closure that performs no action when
     * the predicate is false.
     *
     * @param predicate  predicate to switch on, not null
     * @param trueClosure  closure used if true, not null
     * @since 3.2
     */
    public IfClosure(final Predicate<? super E> predicate, final Closure<? super E> trueClosure) {
        this(predicate, trueClosure, NOPClosure.nopClosure());
    }

    /**
     * Constructor that performs no validation.
     * Use {@code ifClosure} if you want that.
     *
     * @param predicate  predicate to switch on, not null
     * @param trueClosure  closure used if true, not null
     * @param falseClosure  closure used if false, not null
     */
    public IfClosure(final Predicate<? super E> predicate, final Closure<? super E> trueClosure,
                     final Closure<? super E> falseClosure) {
        iPredicate = predicate;
        iTrueClosure = trueClosure;
        iFalseClosure = falseClosure;
    }

    /**
     * Executes the true or false closure according to the result of the predicate.
     *
     * @param input  the input object
     */
    @Override
    public void execute(final E input) {
        if (iPredicate.evaluate(input)) {
            iTrueClosure.execute(input);
        } else {
            iFalseClosure.execute(input);
        }
    }

    /**
     * Gets the predicate.
     *
     * @return the predicate
     * @since 3.1
     */
    public Predicate<? super E> getPredicate() {
        return iPredicate;
    }

    /**
     * Gets the closure called when true.
     *
     * @return the closure
     * @since 3.1
     */
    public Closure<? super E> getTrueClosure() {
        return iTrueClosure;
    }

    /**
     * Gets the closure called when false.
     *
     * @return the closure
     * @since 3.1
     */
    public Closure<? super E> getFalseClosure() {
        return iFalseClosure;
    }

}


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once(COREPATH."controllers/Admin_controller.php");

class Client extends Admin_Controller
{
	protected $_user_validation_rules = array(
	//array('field' => 'name', 'label' => 'Name', 'rules' => 'trim|required|max_length[255]'),
	//array('field' => 'email', 'label' => 'email', 'rules' => 'trim|required|valid_email'),
	//array('field' => 'password', 'label' => 'Password', 'rules' => 'trim|required'),
    array('field' => 'is_active', 'label' => 'Is Active', 'rules' => 'trim')

);

    function __construct()
    {
        parent::__construct();

        $this->load->model('client_model','user_model');
        if(!is_logged_in())
        {
          redirect("login");
        }

    }

    public function index()
    {
        $this->layout->add_javascripts(array('listing', 'rwd-table'));

        $this->load->library('listing');

		if(isset($_GET['id']))
			$this->session->set_userdata('admin_client_id',$_GET['id']);

        //init fncts
       //$this->load_settings_data();

        $this->simple_search_fields = array(

                                                'name' => 'Name'

        );

        $this->_narrow_search_conditions = array("start_date");

        $str = '

                ';

        $this->listing->initialize(array('listing_action' => $str));

        $listing = $this->listing->get_listings('client_model', 'listing');

        if($this->input->is_ajax_request())
            $this->_ajax_output(array('listing' => $listing), TRUE);

        $this->data['bulk_actions'] = array('' => 'select', 'delete' => 'Delete');
        $this->data['simple_search_fields'] = $this->simple_search_fields;
        $this->data['search_conditions'] = $this->session->userdata($this->namespace.'_search_conditions');
        $this->data['per_page'] = $this->listing->_get_per_page();
        $this->data['per_page_options'] = array_combine($this->listing->_get_per_page_options(), $this->listing->_get_per_page_options());

        $this->data['search_bar'] = $this->load->view('listing/search_bar', $this->data, TRUE);

        $this->data['listing'] = $listing;

        $this->data['grid'] = $this->load->view('listing/view', $this->data, TRUE);

        if(is_logged_in())
            $this->layout->view("client/client_list");
        else
            redirect("login");

    }

    public function add_edit_user($edit_id = "")
    {

		if(is_logged_in()) {
			 $edit_id = (isset($_POST['edit_id']))?$_POST['edit_id']:$edit_id;

			$this->form_validation->set_rules($this->_user_validation_rules);

			$id  = $this->session->userdata('admin_client_id');

			if (isset($_POST['password']) &&  $edit_id =="" )
			{
				$this->form_validation->set_rules('password', 'Password', 'required');
			}

			if(isset($_POST['name']))
			{
					$this->form_validation->set_rules('name', 'Name', 'trim|required|callback_name_unique_check['.$edit_id.']');
			}

			if(isset($_POST['email']))
			{
					$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|callback_email_unique_check['.$edit_id.']');
			}

        if($this->form_validation->run())
        {
            $form = $this->input->post();
           // print_r($form);exit;

           // print_r($form);exit;
			if(isset($form['is_active'])) {
				$form['is_active'] = $form['is_active'];
			}
			else {
				$form['is_active'] = "0";
			}

			$ins_data = array();

			//print $filename;exit;
			 $edit_data = $this->user_model->get_lession_data("users",array("id" => $edit_id));

            $ins_data['name']       	= $form['name'];
            $ins_data['is_active']  = $form['is_active'];
            $ins_data['email']  = $form['email'];
            if($form['password'] == "") {

					$ins_data['password']  = $edit_data[0]['password'];
            }else {

				$ins_data['password']  = md5($form['password']);
			}
            //$ins_data['ori_password']  = $form['password'];
            $ins_data['role']  = 3;
            $ins_data['created_date']  = date("Y-m-d H:i:s");
            $ins_data['created_id']  = $id;

			if(empty($edit_id)){

			$update_data = $this->user_model->insert("users",$ins_data);
           // $this->service_message->set_flash_message('record_insert_success');
		}else {

			$update_data = $this->user_model->update("users",$ins_data,array("id" => $edit_id));
           // $this->service_message->set_flash_message('record_update_success');
		}
		redirect("client");

		}

			 if($edit_id) {
                $edit_data = $this->user_model->get_lession_data("users",array("id" => $edit_id));

                if(!isset($edit_data[0])) {
                    //$this->service_message->set_flash_message('record_not_found_error');
                    redirect("client");
                }
                $this->data['title']          = "EDIT USER";
                $this->data['crumb']        = "Edit";
                $this->data['form_data']      = (array)$edit_data[0];

            }
            else if($this->input->post()) {
                $this->data['form_data'] = $_POST;
                $this->data['title']     = "ADD USER";
                $this->data['crumb']   = "Add";
                $this->data['form_data']['id'] = $edit_id != ''?$edit_id:'';
                $this->data['form_data']['ori_password'] = "";

            }
            else
            {
                $this->data['title']     = "ADD USER";
                $this->data['crumb']   = "Add";
                $this->data['form_data'] = array("name" => "","is_active" => "","email" => "","password" => "","ori_password" => "");
            }

		$this->layout->view('client/add');

		}
        else
        {
            redirect("login");
        }

	}

	function client_delete()
    {

        $id = ($_POST['id'])?$_POST['id']:"";
        if(!empty($id)) {

            $this->db->query('delete from users where id in ('.$id.')');

           // $this->service_message->set_flash_message('record_delete_success');
            return true;
        }
    }

     function name_unique_check($name,$edit_id)
     {

        $get_data = $this->user_model->check_exists("users",array("name" => $name,"id !=" => $edit_id));

        if(count($get_data) >0) {

          $this->form_validation->set_message('name_unique_check', 'Username already exists');
          return FALSE;
        }

       	return TRUE;
    }

     function email_unique_check($email,$edit_id)
     {

        $get_data = $this->user_model->check_exists("users",array("email" => $email,"id !=" => $edit_id));

        if(count($get_data) >0) {

          $this->form_validation->set_message('email_unique_check', 'Email already exists');
          return FALSE;
        }

       	return TRUE;
    }

}
?>


text:
from django.contrib.auth.middleware import RemoteUserMiddleware
from django.contrib.auth.models import Group
from django.contrib import auth
from django.core.exceptions import ImproperlyConfigured
import re

from shibboleth.app_settings import SHIB_ATTRIBUTE_MAP, GROUP_ATTRIBUTES, GROUP_DELIMITERS

class ShibbolethRemoteUserMiddleware(RemoteUserMiddleware):
    """
    Authentication Middleware for use with Shibboleth.  Uses the recommended pattern
    for remote authentication from: http://code.djangoproject.com/svn/django/tags/releases/1.3/django/contrib/auth/middleware.py
    """
    def process_request(self, request):
        # AuthenticationMiddleware is required so that request.user exists.
        if not hasattr(request, 'user'):
            raise ImproperlyConfigured(
                "The Django remote user auth middleware requires the"
                " authentication middleware to be installed.  Edit your"
                " MIDDLEWARE_CLASSES setting to insert"
                " 'django.contrib.auth.middleware.AuthenticationMiddleware'"
                " before the RemoteUserMiddleware class.")

        # Locate the remote user header.
        try:
            username = request.META[self.header]
        except KeyError:
            # If specified header doesn't exist then return (leaving
            # request.user set to AnonymousUser by the
            # AuthenticationMiddleware).
            return
        #If we got an empty value for request.META[self.header], treat it like
        #   self.header wasn't in self.META at all - it's still an anonymous user.
        if not username:
            return
        # If the user is already authenticated and that user is the user we are
        # getting passed in the headers, then the correct user is already
        # persisted in the session and we don't need to continue.
        is_authenticated = request.user.is_authenticated
        if is_authenticated:
            if request.user.username == self.clean_username(username, request):
                return

        # Make sure we have all required Shiboleth elements before proceeding.
        shib_meta, error = self.parse_attributes(request)
        # Add parsed attributes to the session.
        request.session['shib'] = shib_meta
        if error:
            raise ShibbolethValidationError("All required Shibboleth elements"
                                            " not found.  %s" % shib_meta)

        # We are seeing this user for the first time in this session, attempt
        # to authenticate the user.
        user = auth.authenticate(request, remote_user=username, shib_meta=shib_meta)
        if user:
            # User is valid.  Set request.user and persist user in the session
            # by logging the user in.
            request.user = user
            auth.login(request, user)

            # Upgrade user groups if configured in the settings.py
            # If activated, the user will be associated with those groups.
            if GROUP_ATTRIBUTES:
                self.update_user_groups(request, user)
            # call make profile.
            self.make_profile(user, shib_meta)
            # setup session.
            self.setup_session(request)

    def make_profile(self, user, shib_meta):
        """
        This is here as a stub to allow subclassing of ShibbolethRemoteUserMiddleware
        to include a make_profile method that will create a Django user profile
        from the Shib provided attributes.  By default it does nothing.
        """
        return

    def setup_session(self, request):
        """
        If you want to add custom code to setup user sessions, you
        can extend this.
        """
        return

    def update_user_groups(self, request, user):
        groups = self.parse_group_attributes(request)
        # Remove the user from all groups that are not specified in the shibboleth metadata
        for group in user.groups.all():
            if group.name not in groups:
                group.user_set.remove(user)
        # Add the user to all groups in the shibboleth metadata
        for g in groups:
            group, created = Group.objects.get_or_create(name=g)
            group.user_set.add(user)

    @staticmethod
    def parse_attributes(request):
        """
        Parse the incoming Shibboleth attributes and convert them to the internal data structure.
        From: https://github.com/russell/django-shibboleth/blob/master/django_shibboleth/utils.py
        Pull the mapped attributes from the apache headers.
        """
        shib_attrs = {}
        error = False
        meta = request.META
        for header, attr in list(SHIB_ATTRIBUTE_MAP.items()):
            if len(attr) == 3:
                required, name, attr_processor = attr
            else:
                required, name = attr
                attr_processor = lambda x: x
            value = meta.get(header, None)
            if value:
                shib_attrs[name] = attr_processor(value)
            elif required:
                error = True
        return shib_attrs, error

    @staticmethod
    def parse_group_attributes(request):
        """
        Parse the Shibboleth attributes for the GROUP_ATTRIBUTES and generate a list of them.
        """
        groups = []
        for attr in GROUP_ATTRIBUTES:
            parsed_groups = re.split('|'.join(GROUP_DELIMITERS),
                                     request.META.get(attr, ''))
            groups += filter(bool, parsed_groups)
        return groups

class ShibbolethValidationError(Exception):
    pass


text:
<?php

namespace jh90809jnkjkljhu3764\home;

class Module extends \yii\base\Module
{
	public $controllerNamespace = 'jh90809jnkjkljhu3764\home\controllers';
	public $defaultRoute = 'site';
	public function init()
	{
		parent::init();

		// custom initialization code goes here
	}
}


text:
#define TARGET_SYM		go32coff_vec
#define TARGET_NAME		"coff-go32"
#define TARGET_UNDERSCORE	'_'
#define COFF_LONG_SECTION_NAMES
#define COFF_SUPPORT_GNU_LINKONCE
#define COFF_LONG_FILENAMES

#define COFF_SECTION_ALIGNMENT_ENTRIES \
{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.d"), \
  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.t"), \
  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.r"), \
  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi"), \
  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }

#include "coff-i386.c"


text:
<?php

namespace Ilum\Console;

trait ArgvCommandCompare
{

}


text:
var mongoose = require('mongoose')
var ObjectId = mongoose.Schema.ObjectId;

var schema = mongoose.Schema({
	created: {
		type: Date,
		default: Date.now
	},
	credential_type: {
		type: String,
		enum: ['ssh', 'vault', 'git']
	},
	name: String,
	// vault password
	password: String,
	// private keys for ssh/git
	private_key: String,
	public_key: String
});

schema.index({
	name: 1
});

module.exports = mongoose.model('Identity', schema);


text:
<?php

namespace App\Http\Middleware;

use Closure;
use Config;

class BeforeMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure                 $next
     *
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if ($request->segment(2) === 'admin') {
            Config::set('is_admin', true);
        } else {
            Config::set('is_admin', false);
        }

        return $next($request);
    }
}


text:
package webrtc

import (
	"testing"

	"github.com/pion/ice/v2"
	"github.com/stretchr/testify/assert"
)

func TestICETransportState_String(t *testing.T) {
	testCases := []struct {
		state          ICETransportState
		expectedString string
	}{
		{ICETransportState(Unknown), unknownStr},
		{ICETransportStateNew, "new"},
		{ICETransportStateChecking, "checking"},
		{ICETransportStateConnected, "connected"},
		{ICETransportStateCompleted, "completed"},
		{ICETransportStateFailed, "failed"},
		{ICETransportStateDisconnected, "disconnected"},
		{ICETransportStateClosed, "closed"},
	}

	for i, testCase := range testCases {
		assert.Equal(t,
			testCase.expectedString,
			testCase.state.String(),
			"testCase: %d %v", i, testCase,
		)
	}
}

func TestICETransportState_Convert(t *testing.T) {
	testCases := []struct {
		native ICETransportState
		ice    ice.ConnectionState
	}{
		{ICETransportState(Unknown), ice.ConnectionState(Unknown)},
		{ICETransportStateNew, ice.ConnectionStateNew},
		{ICETransportStateChecking, ice.ConnectionStateChecking},
		{ICETransportStateConnected, ice.ConnectionStateConnected},
		{ICETransportStateCompleted, ice.ConnectionStateCompleted},
		{ICETransportStateFailed, ice.ConnectionStateFailed},
		{ICETransportStateDisconnected, ice.ConnectionStateDisconnected},
		{ICETransportStateClosed, ice.ConnectionStateClosed},
	}

	for i, testCase := range testCases {
		assert.Equal(t,
			testCase.native.toICE(),
			testCase.ice,
			"testCase: %d %v", i, testCase,
		)
		assert.Equal(t,
			testCase.native,
			newICETransportStateFromICE(testCase.ice),
			"testCase: %d %v", i, testCase,
		)
	}
}


text:
<?php

namespace Acme\DemoBundle\Controller;

use Acme\DemoBundle\Entity\Message;
use Acme\DemoBundle\Form\MessageType;

use FOS\RestBundle\Controller\Annotations\QueryParam;
use FOS\RestBundle\Controller\Annotations\RouteResource;
use FOS\RestBundle\Controller\Annotations\View;
use FOS\RestBundle\Request\ParamFetcherInterface;
use FOS\RestBundle\Util\Codes;
use FOS\RestBundle\View\View as FOSView;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use Voryx\RESTGeneratorBundle\Controller\VoryxController;

/**
 * Message controller.
 * @RouteResource("Message")
 */
class MessageRESTController extends VoryxController
{
    /**
     * Get a Message entity
     *
     * @View(serializerEnableMaxDepthChecks=true)
     *
     * @return Response
     *
     */
    public function getAction(Message $entity)
    {
        return $entity;
    }
    /**
     * Get all Message entities.
     *
     * @View(serializerEnableMaxDepthChecks=true)
     *
     * @param ParamFetcherInterface $paramFetcher
     *
     * @return Response
     *
     * @QueryParam(name="offset", requirements="\d+", nullable=true, description="Offset from which to start listing notes.")
     * @QueryParam(name="limit", requirements="\d+", default="20", description="How many notes to return.")
     * @QueryParam(name="order_by", nullable=true, array=true, description="Order by fields. Must be an array ie. &order_by[name]=ASC&order_by[description]=DESC")
     * @QueryParam(name="filters", nullable=true, array=true, description="Filter by fields. Must be an array ie. &filters[id]=3")
     */
    public function cgetAction(ParamFetcherInterface $paramFetcher)
    {
        try {
            $offset = $paramFetcher->get('offset');
            $limit = $paramFetcher->get('limit');
            $order_by = $paramFetcher->get('order_by');
            $filters = !is_null($paramFetcher->get('filters')) ? $paramFetcher->get('filters') : array();

            $em = $this->getDoctrine()->getManager();
            $entities = $em->getRepository('AcmeDemoBundle:Message')->findBy($filters, $order_by, $limit, $offset);
            if ($entities) {
                return $entities;
            }

            return FOSView::create('Not Found', Codes::HTTP_NO_CONTENT);
        } catch (\Exception $e) {
            return FOSView::create($e->getMessage(), Codes::HTTP_INTERNAL_SERVER_ERROR);
        }
    }
    /**
     * Create a Message entity.
     *
     * @View(statusCode=201, serializerEnableMaxDepthChecks=true)
     *
     * @param Request $request
     *
     * @return Response
     *
     */
    public function postAction(Request $request)
    {
        $entity = new Message();
        $form = $this->createForm(new MessageType(), $entity, array("method" => $request->getMethod()));
        $this->removeExtraFields($request, $form);
        $form->handleRequest($request);

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($entity);
            $em->flush();

            return $entity;
        }

        return FOSView::create(array('errors' => $form->getErrors()), Codes::HTTP_INTERNAL_SERVER_ERROR);
    }
    /**
     * Update a Message entity.
     *
     * @View(serializerEnableMaxDepthChecks=true)
     *
     * @param Request $request
     * @param $entity
     *
     * @return Response
     */
    public function putAction(Request $request, Message $entity)
    {
        try {
            $em = $this->getDoctrine()->getManager();
            $request->setMethod('PATCH'); //Treat all PUTs as PATCH
            $form = $this->createForm(new MessageType(), $entity, array("method" => $request->getMethod()));
            $this->removeExtraFields($request, $form);
            $form->handleRequest($request);
            if ($form->isValid()) {
                $em->flush();

                return $entity;
            }

            return FOSView::create(array('errors' => $form->getErrors()), Codes::HTTP_INTERNAL_SERVER_ERROR);
        } catch (\Exception $e) {
            return FOSView::create($e->getMessage(), Codes::HTTP_INTERNAL_SERVER_ERROR);
        }
    }
    /**
     * Partial Update to a Message entity.
     *
     * @View(serializerEnableMaxDepthChecks=true)
     *
     * @param Request $request
     * @param $entity
     *
     * @return Response
*/
    public function patchAction(Request $request, Message $entity)
    {
        return $this->putAction($request, $entity);
    }
    /**
     * Delete a Message entity.
     *
     * @View(statusCode=204)
     *
     * @param Request $request
     * @param $entity
     * @internal param $id
     *
     * @return Response
     */
    public function deleteAction(Request $request, Message $entity)
    {
        try {
            $em = $this->getDoctrine()->getManager();
            $em->remove($entity);
            $em->flush();

            return null;
        } catch (\Exception $e) {
            return FOSView::create($e->getMessage(), Codes::HTTP_INTERNAL_SERVER_ERROR);
        }
    }
}


text:
var redis = require('redis');
var url = require('url');

function redisUIDStore(options) {
  var redisURL = url.parse(options.url);
  this.client = redis.createClient(redisURL.port, redisURL.hostname,
                                  {no_ready_check: true});
  if (redisURL.auth) this.client.auth(redisURL.auth.split(":")[1]);
  this.key = options.key || 'uids';
}

redisUIDStore.prototype.getLatestUID = function(callback) {
  this.client.zrevrange(this.key, 0, 0, function(err, reply) {
    if (err) return callback(err, reply);
    var uid = parseInt(reply);
    if (isNaN(uid)) return callback('NaN');
    callback(null, uid);
  });
};

redisUIDStore.prototype.setLatestUID = function(UID, callback) {
  this.client.zadd(this.key, UID, UID, callback);
};

redisUIDStore.prototype.clear = function(callback) {
  this.client.del(this.key, callback);
};

module.exports = redisUIDStore;


text:
package org.jpc.term.compiler;

import java.util.HashMap;
import java.util.Map;

import org.jpc.term.AbstractVar;
import org.jpc.term.Var;

public class Environment {

	private static int ID_COUNTER = -1;

	private final int id;

	private final Map<String, AbstractVar> varMap;
	private int varCount;

	public Environment() {
		this(ID_COUNTER--); //in the current implementation default environment ids are negative numbers, positive ids are reserved for clause environments.
	}

	public Environment(int id) {
		this.id = id;
		varMap = new HashMap<>();
	}

	public int getId() {
		return id;
	}

	/**
	 * Compiles a variable for the given clause id according to this compilation context.
	 * @param var a variable to compile.
	 * @param env a clause environment.
	 * @return the compiled variable.
	 */
	public CompiledVar compile(Var var) {
		String varName = var.getName();
		CompiledVar compiledVar = (CompiledVar)varMap.get(varName);
		if(compiledVar == null) {
			if(!var.isAnonymous()) {
				compiledVar = new CompiledVar(getId(), varCount++);
				varMap.put(varName, compiledVar);
			} else {
				compiledVar = CompiledVar.anonymousVar(getId());
			}
		}
		return compiledVar;
	}

	public BindableVar compileForFrame(AbstractVar var) {
		String varName = var.getName();
		BindableVar bindableVar = (BindableVar)varMap.get(varName);
		if(bindableVar == null) {
			bindableVar = new BindableVar(var);
			if(!var.isAnonymous())
				varMap.put(varName, bindableVar);
		}
		return bindableVar;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Environment other = (Environment) obj;
		if (id != other.id)
			return false;
		return true;
	}

}


text:
<refentry xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:xi="http://www.w3.org/2001/XInclude"
          xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          version="5.0" xml:id="crop.mark.width">
<refmeta>
<refentrytitle>crop.mark.width</refentrytitle>
<refmiscinfo class="other" otherclass="datatype">length</refmiscinfo>
</refmeta>
<refnamediv>
<refname>crop.mark.width</refname>
<refpurpose>Width of crop marks.</refpurpose>
</refnamediv>

<refsynopsisdiv>
<src:fragment xml:id="crop.mark.width.frag">
<xsl:param name="crop.mark.width">0.5pt</xsl:param>
</src:fragment>
</refsynopsisdiv>

<refsection><info><title>Description</title></info>

<para>Width of crop marks. Crop marks are controlled by
<parameter>crop.marks</parameter> parameter.</para>

</refsection>
</refentry>


text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class UElibPNG : ModuleRules
{
	public UElibPNG(TargetInfo Target)
	{
		Type = ModuleType.External;

		string libPNGPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2";
		PublicIncludePaths.Add(libPNGPath);

		if (Target.Platform == UnrealTargetPlatform.Win64)
		{
			string LibPath = libPNGPath+ "/lib/Win64/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
			PublicLibraryPaths.Add(LibPath);

			string LibFileName = "libpng" + (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT ? "d" : "") + "_64.lib";
			PublicAdditionalLibraries.Add(LibFileName);
		}
		else if (Target.Platform == UnrealTargetPlatform.Win32 ||
				(Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32"))
		{
			libPNGPath = libPNGPath + "/lib/Win32/VS" + WindowsPlatform.GetVisualStudioCompilerVersionName();
			PublicLibraryPaths.Add(libPNGPath);

			string LibFileName = "libpng" + (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT ? "d" : "") + ".lib";
			PublicAdditionalLibraries.Add(LibFileName);
		}
		else if (Target.Platform == UnrealTargetPlatform.Mac)
		{
			PublicAdditionalLibraries.Add(libPNGPath + "/lib/Mac/libpng.a");
		}
        else if (Target.Platform == UnrealTargetPlatform.IOS)
        {
			if (Target.Architecture == "-simulator")
            {
                PublicLibraryPaths.Add(libPNGPath + "/lib/ios/Simulator");
                PublicAdditionalShadowFiles.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2/lib/ios/Simulator/libpng152.a");
            }
            else
            {
                PublicLibraryPaths.Add(libPNGPath + "/lib/ios/Device");
                PublicAdditionalShadowFiles.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "libPNG/libPNG-1.5.2/lib/ios/Device/libpng152.a");
            }

            PublicAdditionalLibraries.Add("png152");
        }
        else if (Target.Platform == UnrealTargetPlatform.Android)
        {
			PublicLibraryPaths.Add(libPNGPath + "/lib/Android/ARMv7");
			PublicLibraryPaths.Add(libPNGPath + "/lib/Android/ARM64");
			PublicLibraryPaths.Add(libPNGPath + "/lib/Android/x86");
			PublicLibraryPaths.Add(libPNGPath + "/lib/Android/x64");

			PublicAdditionalLibraries.Add("png");
        }
        else if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            PublicAdditionalLibraries.Add(libPNGPath + "/lib/Linux/" + Target.Architecture + "/libpng.a");
        }
        else if (Target.Platform == UnrealTargetPlatform.HTML5)
        {
            PublicLibraryPaths.Add(libPNGPath + "/lib/HTML5");

			if (UEBuildConfiguration.bCompileForSize)
			{
				PublicAdditionalLibraries.Add(libPNGPath + "/lib/HTML5/libpng_Oz.bc");
			}
			else
			{
				PublicAdditionalLibraries.Add(libPNGPath + "/lib/HTML5/libpng.bc");
			}
        }
    }
}


text:
package org.apache.hadoop.hbase.procedure2.store.region;

import static org.hamcrest.CoreMatchers.startsWith;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
import org.apache.commons.lang3.mutable.MutableLong;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
import org.apache.hadoop.hbase.HBaseIOException;
import org.apache.hadoop.hbase.Server;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.RegionInfoBuilder;
import org.apache.hadoop.hbase.master.assignment.AssignProcedure;
import org.apache.hadoop.hbase.master.region.MasterRegion;
import org.apache.hadoop.hbase.master.region.MasterRegionFactory;
import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility.LoadCounter;
import org.apache.hadoop.hbase.procedure2.store.LeaseRecovery;
import org.apache.hadoop.hbase.procedure2.store.ProcedureStore.ProcedureIterator;
import org.apache.hadoop.hbase.procedure2.store.ProcedureStore.ProcedureLoader;
import org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore;
import org.apache.hadoop.hbase.regionserver.MemStoreLAB;
import org.apache.hadoop.hbase.testclassification.MasterTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.apache.hadoop.hbase.util.CommonFSUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

@SuppressWarnings("deprecation")
@Category({ MasterTests.class, SmallTests.class })
public class TestRegionProcedureStoreMigration {

  @ClassRule
  public static final HBaseClassTestRule CLASS_RULE =
    HBaseClassTestRule.forClass(TestRegionProcedureStoreMigration.class);

  private HBaseCommonTestingUtility htu;

  private Server server;

  private MasterRegion region;

  private RegionProcedureStore store;

  private WALProcedureStore walStore;

  @Before
  public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    Configuration conf = htu.getConfiguration();
    conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
    // Runs on local filesystem. Test does not need sync. Turn off checks.
    conf.setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, false);
    Path testDir = htu.getDataTestDir();
    CommonFSUtils.setRootDir(conf, testDir);
    walStore = new WALProcedureStore(conf, new LeaseRecovery() {

      @Override
      public void recoverFileLease(FileSystem fs, Path path) throws IOException {
      }
    });
    walStore.start(1);
    walStore.recoverLease();
    walStore.load(new LoadCounter());
    server = RegionProcedureStoreTestHelper.mockServer(conf);
    region = MasterRegionFactory.create(server);
  }

  @After
  public void tearDown() throws IOException {
    if (store != null) {
      store.stop(true);
    }
    region.close(true);
    walStore.stop(true);
    htu.cleanupTestDir();
  }

  @Test
  public void test() throws IOException {
    List<RegionProcedureStoreTestProcedure> procs = new ArrayList<>();
    for (int i = 0; i < 10; i++) {
      RegionProcedureStoreTestProcedure proc = new RegionProcedureStoreTestProcedure();
      walStore.insert(proc, null);
      procs.add(proc);
    }
    for (int i = 5; i < 10; i++) {
      walStore.delete(procs.get(i).getProcId());
    }
    walStore.stop(true);
    SortedSet<RegionProcedureStoreTestProcedure> loadedProcs =
      new TreeSet<>((p1, p2) -> Long.compare(p1.getProcId(), p2.getProcId()));
    MutableLong maxProcIdSet = new MutableLong(0);
    store = RegionProcedureStoreTestHelper.createStore(server, region, new ProcedureLoader() {

      @Override
      public void setMaxProcId(long maxProcId) {
        maxProcIdSet.setValue(maxProcId);
      }

      @Override
      public void load(ProcedureIterator procIter) throws IOException {
        while (procIter.hasNext()) {
          RegionProcedureStoreTestProcedure proc =
            (RegionProcedureStoreTestProcedure) procIter.next();
          loadedProcs.add(proc);
        }
      }

      @Override
      public void handleCorrupted(ProcedureIterator procIter) throws IOException {
        if (procIter.hasNext()) {
          fail("Found corrupted procedures");
        }
      }
    });
    assertEquals(10, maxProcIdSet.longValue());
    assertEquals(5, loadedProcs.size());
    int procId = 1;
    for (RegionProcedureStoreTestProcedure proc : loadedProcs) {
      assertEquals(procId, proc.getProcId());
      procId++;
    }
    Path testDir = htu.getDataTestDir();
    FileSystem fs = testDir.getFileSystem(htu.getConfiguration());
    Path oldProcWALDir = new Path(testDir, WALProcedureStore.MASTER_PROCEDURE_LOGDIR);
    // make sure the old proc wal directory has been deleted.
    assertFalse(fs.exists(oldProcWALDir));
  }

  @Test
  public void testMigrateWithUnsupportedProcedures() throws IOException {
    AssignProcedure assignProc = new AssignProcedure();
    assignProc.setProcId(1L);
    assignProc.setRegionInfo(RegionInfoBuilder.newBuilder(TableName.valueOf("table")).build());
    walStore.insert(assignProc, null);
    walStore.stop(true);

    try {
      store = RegionProcedureStoreTestHelper.createStore(server, region, new LoadCounter());
      fail("Should fail since AssignProcedure is not supported");
    } catch (HBaseIOException e) {
      assertThat(e.getMessage(), startsWith("Unsupported"));
    }
  }
}


text:
package com.arpnetworking.tsdcore.statistics;

import com.arpnetworking.tsdcore.model.Quantity;

import java.util.List;

/**
 * Top 0th percentile statistic (aka min).
 *
 * @author Brandon Arp (barp at groupon dot com)
 */
public class TP0Statistic extends TPStatistic {

    /**
     * Public constructor.
     */
    public TP0Statistic() {
        super(0d);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getName() {
        return "min";
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Quantity calculate(final List<Quantity> orderedValues) {
        return orderedValues.get(0);
    }

    private static final long serialVersionUID = 107620025236661457L;
}


text:
      About
      Contact me

          {% include svg/twitter.svg %}

          {% include svg/facebook.svg %}

          {% include svg/github.svg %}

      © Nayaabkhan


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <!-- Theme applied to the Android Window while the process is starting -->
  <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
    <!-- Show a splash screen on the activity. Automatically removed when
         Flutter draws its first frame -->
    <item name="android:windowBackground">@drawable/launch_background</item>
  </style>
  <!-- Theme applied to the Android Window as soon as the process has started.
       This theme determines the color of the Android Window while your
       Flutter UI initializes, as well as behind your Flutter UI while its
       running.
       This Theme is only used starting with V2 of Flutter's Android embedding. -->
  <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
    <item name="android:windowBackground">@android:color/white</item>
  </style>
</resources>


text:
package org.jclouds.gogrid.domain;

import static com.google.common.base.Preconditions.checkNotNull;

public enum LoadBalancerType {

    ROUND_ROBIN("Round Robin"),
    LEAST_CONNECTED("Least Connect"),
    UNRECOGNIZED("Unknown");

    String type;
    LoadBalancerType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return type;
    }

    public static LoadBalancerType fromValue(String type) {
        for (LoadBalancerType persistenceType : values()) {
            if (persistenceType.type.equals(checkNotNull(type))) return persistenceType;
        }
        return UNRECOGNIZED;
    }

}


text:
using System;

using Foundation;
using UIKit;

namespace MaterialControls.Xamarin.Sample.iOS.Views
{
	public partial class TabContentViewController : UIViewController
	{
		string Title;

		public TabContentViewController (string title) : base ("TabContentViewController", null)
		{
			Title = title;
		}

		public override void DidReceiveMemoryWarning ()
		{
			// Releases the view if it doesn't have a superview.
			base.DidReceiveMemoryWarning ();

			// Release any cached data, images, etc that aren't in use.
		}

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad();
			Label.Text = Title;
		}
	}
}


text:
package com.drop.spper.di.component;

import com.drop.spper.di.moudle.MyLikeMoudle;
import com.drop.spper.mvp.ui.fragment.MyLike;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.di.scope.FragmentScope;

import dagger.Component;

/**
 * Created by Drop on 2017/5/15.
 */

@FragmentScope
@Component (modules = MyLikeMoudle.class, dependencies = AppComponent.class)
public interface MyLikeComponent {

    void inject(MyLike myLike);
}


text:
[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coveralls Status][coveralls-image]][coveralls-url]
[![Dependency Status][depstat-image]][depstat-url]
[![devDependency Status][devstat-image]][devstat-url]
[![Downloads][download-badge]][npm-url]

Angular 1.x directive for [Chartist.js](http://gionkunz.github.io/chartist-js/)

[Looking for the Angular 2 version?](https://github.com/paradox41/angular2-chartist)

## Installation

```
npm install angular-chartist.js chartist angular --save
```

For package managers other than NPM, you can install via the git url:

For example, with Bower:
```
bower install 'https://github.com/paradox41/angular-chartist.js.git#<tag>' --save
```

## Usage

Make sure you have loaded the necessary scripts in the correct order.
Add `angular-chartist` as a module dependency, like so:

```js
// >= 4.1
import angular from 'angular';
import angularChartist from 'angular-chartist.js';

angular.module('app', [
  angularChartist
]);
```

```js
// <= 4.0
import angular from 'angular';
import angularChartist from 'angular-chartist.js';

angular.module('app', [
  angularChartist.name
]);
```

In your HTML, add the `chartist` directive to any `div` or make it a custom element:

```html
<chartist class="ct-chart" chartist-data="chartist.barData" chartist-chart-type="Bar"></chartist>
```

| Attribute | Type | Required |
| ------------- | ------------- | ------------- |
| `chartist-data` | Object  | Yes |
| `chartist-chart-type` | String  | Yes |
| `chartist-events`* | Object  | No |
| `chartist-chart-options` | Object  | No |
| `chartist-responsive-options` | Array  | No |

Format for Chartist events:
```js
{
  event: function eventHandler(obj) {
    // do stuff on event
  }
}
```

For the sorts of values these options accept, check out the [Chartist.js docs](http://gionkunz.github.io/chartist-js/api-documentation.html)

## Using Plugins

Simply put the plugins array in the `options` object.

Example:

```js
$scope.chartOptions = {
    plugins: [
        ctPointLabels({
          textAnchor: 'middle'
        })
    ]
};
```

## Issues?

This directive is simply a wrapper, anything you pass to the directive gets passed right through to the appropriate method
on the Chartist side. Any issues with the charts, data, options, etc, should be filed against [Chartist.js](https://github.com/gionkunz/chartist-js)

Feel free to file an issue / PR if you feel that the directive can be improved in some way though.

[npm-url]: https://npmjs.org/package/angular-chartist.js
[npm-image]: https://img.shields.io/npm/v/angular-chartist.js.svg?style=flat-square

[travis-url]: https://travis-ci.org/paradox41/angular-chartist.js
[travis-image]: https://img.shields.io/travis/paradox41/angular-chartist.js.svg?style=flat-square

[coveralls-url]: https://coveralls.io/r/paradox41/angular-chartist.js
[coveralls-image]: https://img.shields.io/coveralls/paradox41/angular-chartist.js.svg?style=flat-square

[depstat-url]: https://david-dm.org/paradox41/angular-chartist.js
[depstat-image]: https://david-dm.org/paradox41/angular-chartist.js.svg?style=flat-square

[devstat-url]: https://david-dm.org/paradox41/angular-chartist.js#info=devDependencies
[devstat-image]: https://david-dm.org/paradox41/angular-chartist.js/dev-status.svg

[download-badge]: http://img.shields.io/npm/dm/angular-chartist.js.svg?style=flat-square