text:
package org.ehcache.core;

import java.util.Map;

import org.ehcache.UserManagedCache;
import org.ehcache.core.spi.LifeCycled;
import org.ehcache.spi.loaderwriter.CacheLoaderWriter;
import org.ehcache.core.statistics.BulkOps;
import org.terracotta.statistics.jsr166e.LongAdder;

/**
 * Extension of the {@link org.ehcache.Cache} and {@link UserManagedCache} interfaces defining common methods used by
 * collaborators of {@link org.ehcache.Cache} implementations.
 * <P>
 *   {@code Ehcache} users should not have to depend on this type but rely exclusively on the api types in package
 *   {@code org.ehcache}.
 * </P>
 */
public interface InternalCache<K, V> extends UserManagedCache<K, V> {

  /**
   * BulkMethodEntries
   *
   * @return BulkMethodEntries
   */
  Map<BulkOps, LongAdder> getBulkMethodEntries();

  /**
   * Jsr107Cache
   *
   * @return Jsr107Cache
   */
  Jsr107Cache<K, V> getJsr107Cache();

  /**
   * CacheLoaderWriter
   *
   * @return CacheLoaderWriter
   */
  CacheLoaderWriter<? super K, V> getCacheLoaderWriter();

  /**
   * Add lifecycle hooks
   *
   * @param hook hook it to lifecycle
   */
  void addHook(LifeCycled hook);

}


text:
/*
** initialisation lib SDL & FMOD
*/

#include "game.h"

void        init_screen()
{
    if (SDL_Init(SDL_INIT_VIDEO) < 0)
    {
        fprintf(stderr, "Could not initialize SDL : %s\n", SDL_GetError());
        exit(1);
    }
    if ((screen.screen = SDL_SetVideoMode(400, 100, 32, SDL_HWSURFACE | SDL_DOUBLEBUF)) == NULL)
    {
        fprintf(stderr, "Couldn't set screen mode : %s", SDL_GetError());
        exit(1);
    }
    if (TTF_Init() == -1)
    {
        fprintf(stderr, "Erreur d'initialisation de TTF_Init : %s\n", TTF_GetError());
        exit(EXIT_FAILURE);
    }
}

void        cleanup()
{
    TTF_Quit();

    SDL_FreeSurface(screen.barre);
    SDL_FreeSurface(screen.charge);
    SDL_FreeSurface(screen.gear);
    SDL_FreeSurface(screen.gear_c);
    SDL_FreeSurface(screen.home);
    SDL_FreeSurface(screen.home_c);
    SDL_FreeSurface(screen.next);
    SDL_FreeSurface(screen.next_c);
    SDL_FreeSurface(screen.prev);
    SDL_FreeSurface(screen.prev_c);
    SDL_FreeSurface(screen.reload);
    SDL_FreeSurface(screen.reload_c);
    SDL_FreeSurface(screen.texte);

    SDL_Quit();
}

redpajama_set_name: RedPajamaGithub


text:
<?php namespace Troward\SugarAPI;

/**
 * Class Task
 * @package Troward\SugarAPI
 */
class Task extends BaseModule {
    /**
     * @var string
     */
    protected $module = "Tasks";
}


text:
<component name="libraryTable">
  <library name="Gradle: org.springframework.cloud:spring-cloud-spring-service-connector:1.2.4.RELEASE">
    <CLASSES>
      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-spring-service-connector/1.2.4.RELEASE/e37e2b4336d067e157500b4f1840756a484cf8cc/spring-cloud-spring-service-connector-1.2.4.RELEASE.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-spring-service-connector/1.2.4.RELEASE/cdc95486064333fbaff42381c9ce32e1ef241c0d/spring-cloud-spring-service-connector-1.2.4.RELEASE-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/compute/v1/compute.proto

package com.google.cloud.compute.v1;

/**
 *
 *
 *

 *

 *
 * Protobuf type {@code google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest}
 */
public final class RegionInstanceGroupManagersDeleteInstancesRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest)
    RegionInstanceGroupManagersDeleteInstancesRequestOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder() to construct.
  private RegionInstanceGroupManagersDeleteInstancesRequest(
      com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private RegionInstanceGroupManagersDeleteInstancesRequest() {
    instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new RegionInstanceGroupManagersDeleteInstancesRequest();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.compute.v1.Compute
        .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.compute.v1.Compute
        .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest.class,
            com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest.Builder
                .class);
  }

  private int bitField0_;
  public static final int INSTANCES_FIELD_NUMBER = 29097598;
  private com.google.protobuf.LazyStringList instances_;
  /**
   *
   *
   *

   * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
   *

   *
   * repeated string instances = 29097598;
   *
   * @return A list containing the instances.
   */
  public com.google.protobuf.ProtocolStringList getInstancesList() {
    return instances_;
  }
  /**
   *
   *
   *

   * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
   *

   *
   * repeated string instances = 29097598;
   *
   * @return The count of instances.
   */
  public int getInstancesCount() {
    return instances_.size();
  }
  /**
   *
   *
   *

   * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
   *

   *
   * repeated string instances = 29097598;
   *
   * @param index The index of the element to return.
   * @return The instances at the given index.
   */
  public java.lang.String getInstances(int index) {
    return instances_.get(index);
  }
  /**
   *
   *
   *

   * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
   *

   *
   * repeated string instances = 29097598;
   *
   * @param index The index of the value to return.
   * @return The bytes of the instances at the given index.
   */
  public com.google.protobuf.ByteString getInstancesBytes(int index) {
    return instances_.getByteString(index);
  }

  public static final int SKIP_INSTANCES_ON_VALIDATION_ERROR_FIELD_NUMBER = 40631073;
  private boolean skipInstancesOnValidationError_;
  /**
   *
   *
   *

   * Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region.
   *

   *
   * optional bool skip_instances_on_validation_error = 40631073;
   *
   * @return Whether the skipInstancesOnValidationError field is set.
   */
  @java.lang.Override
  public boolean hasSkipInstancesOnValidationError() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   *
   *
   *

   * Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region.
   *

   *
   * optional bool skip_instances_on_validation_error = 40631073;
   *
   * @return The skipInstancesOnValidationError.
   */
  @java.lang.Override
  public boolean getSkipInstancesOnValidationError() {
    return skipInstancesOnValidationError_;
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < instances_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 29097598, instances_.getRaw(i));
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeBool(40631073, skipInstancesOnValidationError_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    {
      int dataSize = 0;
      for (int i = 0; i < instances_.size(); i++) {
        dataSize += computeStringSizeNoTag(instances_.getRaw(i));
      }
      size += dataSize;
      size += 4 * getInstancesList().size();
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size +=
          com.google.protobuf.CodedOutputStream.computeBoolSize(
              40631073, skipInstancesOnValidationError_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj
        instanceof com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest)) {
      return super.equals(obj);
    }
    com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest other =
        (com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest) obj;

    if (!getInstancesList().equals(other.getInstancesList())) return false;
    if (hasSkipInstancesOnValidationError() != other.hasSkipInstancesOnValidationError())
      return false;
    if (hasSkipInstancesOnValidationError()) {
      if (getSkipInstancesOnValidationError() != other.getSkipInstancesOnValidationError())
        return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getInstancesCount() > 0) {
      hash = (37 * hash) + INSTANCES_FIELD_NUMBER;
      hash = (53 * hash) + getInstancesList().hashCode();
    }
    if (hasSkipInstancesOnValidationError()) {
      hash = (37 * hash) + SKIP_INSTANCES_ON_VALIDATION_ERROR_FIELD_NUMBER;
      hash =
          (53 * hash)
              + com.google.protobuf.Internal.hashBoolean(getSkipInstancesOnValidationError());
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(
          java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(
          java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseDelimitedFrom(
          java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(
      com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   *

   *

   *
   * Protobuf type {@code google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest)
      com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest.class,
              com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest.Builder
                  .class);
    }

    // Construct using
    // com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      skipInstancesOnValidationError_ = false;
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
        getDefaultInstanceForType() {
      return com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
          .getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest build() {
      com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest result =
          buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
        buildPartial() {
      com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest result =
          new com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((bitField0_ & 0x00000001) != 0)) {
        instances_ = instances_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.instances_ = instances_;
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.skipInstancesOnValidationError_ = skipInstancesOnValidationError_;
        to_bitField0_ |= 0x00000001;
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other
          instanceof
          com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest) {
        return mergeFrom(
            (com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(
        com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest other) {
      if (other
          == com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
              .getDefaultInstance()) return this;
      if (!other.instances_.isEmpty()) {
        if (instances_.isEmpty()) {
          instances_ = other.instances_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureInstancesIsMutable();
          instances_.addAll(other.instances_);
        }
        onChanged();
      }
      if (other.hasSkipInstancesOnValidationError()) {
        setSkipInstancesOnValidationError(other.getSkipInstancesOnValidationError());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 232780786:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureInstancesIsMutable();
                instances_.add(s);
                break;
              } // case 232780786
            case 325048584:
              {
                skipInstancesOnValidationError_ = input.readBool();
                bitField0_ |= 0x00000002;
                break;
              } // case 325048584
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.LazyStringList instances_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureInstancesIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        instances_ = new com.google.protobuf.LazyStringArrayList(instances_);
        bitField0_ |= 0x00000001;
      }
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @return A list containing the instances.
     */
    public com.google.protobuf.ProtocolStringList getInstancesList() {
      return instances_.getUnmodifiableView();
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @return The count of instances.
     */
    public int getInstancesCount() {
      return instances_.size();
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @param index The index of the element to return.
     * @return The instances at the given index.
     */
    public java.lang.String getInstances(int index) {
      return instances_.get(index);
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @param index The index of the value to return.
     * @return The bytes of the instances at the given index.
     */
    public com.google.protobuf.ByteString getInstancesBytes(int index) {
      return instances_.getByteString(index);
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @param index The index to set the value at.
     * @param value The instances to set.
     * @return This builder for chaining.
     */
    public Builder setInstances(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureInstancesIsMutable();
      instances_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @param value The instances to add.
     * @return This builder for chaining.
     */
    public Builder addInstances(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureInstancesIsMutable();
      instances_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @param values The instances to add.
     * @return This builder for chaining.
     */
    public Builder addAllInstances(java.lang.Iterable<java.lang.String> values) {
      ensureInstancesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @return This builder for chaining.
     */
    public Builder clearInstances() {
      instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *

     *
     * repeated string instances = 29097598;
     *
     * @param value The bytes of the instances to add.
     * @return This builder for chaining.
     */
    public Builder addInstancesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureInstancesIsMutable();
      instances_.add(value);
      onChanged();
      return this;
    }

    private boolean skipInstancesOnValidationError_;
    /**
     *
     *
     *

     * Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region.
     *

     *
     * optional bool skip_instances_on_validation_error = 40631073;
     *
     * @return Whether the skipInstancesOnValidationError field is set.
     */
    @java.lang.Override
    public boolean hasSkipInstancesOnValidationError() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     *

     * Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region.
     *

     *
     * optional bool skip_instances_on_validation_error = 40631073;
     *
     * @return The skipInstancesOnValidationError.
     */
    @java.lang.Override
    public boolean getSkipInstancesOnValidationError() {
      return skipInstancesOnValidationError_;
    }
    /**
     *
     *
     *

     * Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region.
     *

     *
     * optional bool skip_instances_on_validation_error = 40631073;
     *
     * @param value The skipInstancesOnValidationError to set.
     * @return This builder for chaining.
     */
    public Builder setSkipInstancesOnValidationError(boolean value) {
      bitField0_ |= 0x00000002;
      skipInstancesOnValidationError_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Specifies whether the request should proceed despite the inclusion of instances that are not members of the group or that are already in the process of being deleted or abandoned. If this field is set to `false` and such an instance is specified in the request, the operation fails. The operation always fails if the request contains a malformed instance URL or a reference to an instance that exists in a zone or region other than the group's zone or region.
     *

     *
     * optional bool skip_instances_on_validation_error = 40631073;
     *
     * @return This builder for chaining.
     */
    public Builder clearSkipInstancesOnValidationError() {
      bitField0_ = (bitField0_ & ~0x00000002);
      skipInstancesOnValidationError_ = false;
      onChanged();
      return this;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest)
  private static final com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE =
        new com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest();
  }

  public static com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<RegionInstanceGroupManagersDeleteInstancesRequest>
      PARSER =
          new com.google.protobuf.AbstractParser<
              RegionInstanceGroupManagersDeleteInstancesRequest>() {
            @java.lang.Override
            public RegionInstanceGroupManagersDeleteInstancesRequest parsePartialFrom(
                com.google.protobuf.CodedInputStream input,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws com.google.protobuf.InvalidProtocolBufferException {
              Builder builder = newBuilder();
              try {
                builder.mergeFrom(input, extensionRegistry);
              } catch (com.google.protobuf.InvalidProtocolBufferException e) {
                throw e.setUnfinishedMessage(builder.buildPartial());
              } catch (com.google.protobuf.UninitializedMessageException e) {
                throw e.asInvalidProtocolBufferException()
                    .setUnfinishedMessage(builder.buildPartial());
              } catch (java.io.IOException e) {
                throw new com.google.protobuf.InvalidProtocolBufferException(e)
                    .setUnfinishedMessage(builder.buildPartial());
              }
              return builder.buildPartial();
            }
          };

  public static com.google.protobuf.Parser<RegionInstanceGroupManagersDeleteInstancesRequest>
      parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<RegionInstanceGroupManagersDeleteInstancesRequest>
      getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest
      getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
@interface UITextField (Placeholder)
@property (nonatomic, assign) UIColor *placeholderColor;
@end


text:
#include "mitkGeometryClipImageFilter.h"
#include "mitkImageTimeSelector.h"
#include "mitkProperties.h"
#include "mitkTimeHelper.h"

#include "mitkImageToItk.h"

#include "itkImageRegionConstIterator.h"
#include "itkImageRegionIteratorWithIndex.h"

#include <limits>

mitk::GeometryClipImageFilter::GeometryClipImageFilter()
  : m_ClippingGeometry(nullptr),
    m_ClipPartAboveGeometry(true),
    m_OutsideValue(0),
    m_AutoOutsideValue(false),
    m_LabelBothSides(false),
    m_AutoOrientLabels(false),
    m_AboveGeometryLabel(1),
    m_BelowGeometryLabel(2)
{
  this->SetNumberOfIndexedInputs(2);
  this->SetNumberOfRequiredInputs(2);
  m_InputTimeSelector = mitk::ImageTimeSelector::New();
  m_OutputTimeSelector = mitk::ImageTimeSelector::New();
  m_ClippingGeometryData = mitk::GeometryData::New();
}

mitk::GeometryClipImageFilter::~GeometryClipImageFilter()
{
}

void mitk::GeometryClipImageFilter::SetClippingGeometry(const mitk::TimeGeometry *timeClippingGeometry)
{
  m_TimeClippingGeometry = timeClippingGeometry;
  SetClippingGeometry(timeClippingGeometry->GetGeometryForTimeStep(0));
}

void mitk::GeometryClipImageFilter::SetClippingGeometry(const mitk::BaseGeometry *aClippingGeometry)
{
  if (aClippingGeometry != m_ClippingGeometry.GetPointer())
  {
    m_ClippingGeometry = aClippingGeometry;
    m_ClippingGeometryData->SetGeometry(const_cast<mitk::BaseGeometry *>(aClippingGeometry));
    SetNthInput(1, m_ClippingGeometryData);
    Modified();
  }
}

const mitk::BaseGeometry *mitk::GeometryClipImageFilter::GetClippingGeometry() const
{
  return m_ClippingGeometry;
}

const mitk::TimeGeometry *mitk::GeometryClipImageFilter::GetClippingTimeGeometry() const
{
  return m_TimeClippingGeometry;
}

void mitk::GeometryClipImageFilter::GenerateInputRequestedRegion()
{
  Superclass::GenerateInputRequestedRegion();

  mitk::Image *output = this->GetOutput();
  mitk::Image *input = const_cast<mitk::Image *>(this->GetInput());
  if ((output->IsInitialized() == false) || (m_ClippingGeometry.IsNull()))
    return;

  input->SetRequestedRegionToLargestPossibleRegion();

  GenerateTimeInInputRegion(output, input);
}

void mitk::GeometryClipImageFilter::GenerateOutputInformation()
{
  mitk::Image::ConstPointer input = this->GetInput();
  mitk::Image::Pointer output = this->GetOutput();

  if ((output->IsInitialized()) && (this->GetMTime() <= m_TimeOfHeaderInitialization.GetMTime()))
    return;

  itkDebugMacro(<< "GenerateOutputInformation()");

  unsigned int i;
  auto tmpDimensions = new unsigned int[input->GetDimension()];

  for (i = 0; i < input->GetDimension(); ++i)
    tmpDimensions[i] = input->GetDimension(i);

  output->Initialize(input->GetPixelType(), input->GetDimension(), tmpDimensions, input->GetNumberOfChannels());

  delete[] tmpDimensions;

  output->SetGeometry(static_cast<mitk::BaseGeometry *>(input->GetGeometry()->Clone().GetPointer()));

  output->SetPropertyList(input->GetPropertyList()->Clone());

  m_TimeOfHeaderInitialization.Modified();
}

template <typename TPixel, unsigned int VImageDimension>
void mitk::_InternalComputeClippedImage(itk::Image<TPixel, VImageDimension> *inputItkImage,
                                        mitk::GeometryClipImageFilter *geometryClipper,
                                        const mitk::PlaneGeometry *clippingPlaneGeometry)
{
  typedef itk::Image<TPixel, VImageDimension> ItkInputImageType;
  typedef itk::Image<TPixel, VImageDimension> ItkOutputImageType;

  typedef itk::ImageRegionConstIteratorWithIndex<ItkInputImageType> ItkInputImageIteratorType;
  typedef itk::ImageRegionIteratorWithIndex<ItkOutputImageType> ItkOutputImageIteratorType;

  typename mitk::ImageToItk<ItkOutputImageType>::Pointer outputimagetoitk = mitk::ImageToItk<ItkOutputImageType>::New();
  outputimagetoitk->SetInput(geometryClipper->m_OutputTimeSelector->GetOutput());
  outputimagetoitk->Update();
  typename ItkOutputImageType::Pointer outputItkImage = outputimagetoitk->GetOutput();

  // create the iterators
  typename ItkInputImageType::RegionType inputRegionOfInterest = inputItkImage->GetLargestPossibleRegion();
  ItkInputImageIteratorType inputIt(inputItkImage, inputRegionOfInterest);
  ItkOutputImageIteratorType outputIt(outputItkImage, inputRegionOfInterest);

  typename ItkOutputImageType::PixelType outsideValue;
  if (geometryClipper->m_AutoOutsideValue)
    outsideValue = itk::NumericTraits<typename ItkOutputImageType::PixelType>::min();
  else
    outsideValue = (typename ItkOutputImageType::PixelType)geometryClipper->m_OutsideValue;

  mitk::BaseGeometry *inputGeometry = geometryClipper->m_InputTimeSelector->GetOutput()->GetGeometry();
  typedef itk::Index<VImageDimension> IndexType;
  Point3D indexPt;
  indexPt.Fill(0);
  int i, dim = IndexType::GetIndexDimension();
  Point3D pointInMM;
  bool above = geometryClipper->m_ClipPartAboveGeometry;
  bool labelBothSides = geometryClipper->GetLabelBothSides();

  if (geometryClipper->GetAutoOrientLabels())
  {
    Point3D leftMostPoint;
    leftMostPoint.Fill(std::numeric_limits<float>::min() / 2.0);
    if (clippingPlaneGeometry->IsAbove(pointInMM) != above)
    {
      // invert meaning of above --> left is always the "above" side
      above = !above;
      MITK_INFO << leftMostPoint << " is BELOW geometry. Inverting meaning of above" << std::endl;
    }
    else
      MITK_INFO << leftMostPoint << " is above geometry" << std::endl;
  }

  typename ItkOutputImageType::PixelType aboveLabel =
    (typename ItkOutputImageType::PixelType)geometryClipper->GetAboveGeometryLabel();
  typename ItkOutputImageType::PixelType belowLabel =
    (typename ItkOutputImageType::PixelType)geometryClipper->GetBelowGeometryLabel();

  for (inputIt.GoToBegin(), outputIt.GoToBegin(); !inputIt.IsAtEnd(); ++inputIt, ++outputIt)
  {
    if ((typename ItkOutputImageType::PixelType)inputIt.Get() == outsideValue)
    {
      outputIt.Set(outsideValue);
    }
    else
    {
      for (i = 0; i < dim; ++i)
        indexPt[i] = (mitk::ScalarType)inputIt.GetIndex()[i];
      inputGeometry->IndexToWorld(indexPt, pointInMM);
      if (clippingPlaneGeometry->IsAbove(pointInMM) == above)
      {
        if (labelBothSides)
          outputIt.Set(aboveLabel);
        else
          outputIt.Set(outsideValue);
      }
      else
      {
        if (labelBothSides)
          outputIt.Set(belowLabel);
        else
          outputIt.Set(inputIt.Get());
      }
    }
  }
}

#include "mitkImageAccessByItk.h"

void mitk::GeometryClipImageFilter::GenerateData()
{
  Image::ConstPointer input = this->GetInput();
  Image::Pointer output = this->GetOutput();

  if ((output->IsInitialized() == false) || (m_ClippingGeometry.IsNull()))
    return;

  const PlaneGeometry *clippingGeometryOfCurrentTimeStep = nullptr;

  if (m_TimeClippingGeometry.IsNull())
  {
    clippingGeometryOfCurrentTimeStep = dynamic_cast<const PlaneGeometry *>(m_ClippingGeometry.GetPointer());
  }
  else
  {
    clippingGeometryOfCurrentTimeStep =
      dynamic_cast<const PlaneGeometry *>(m_TimeClippingGeometry->GetGeometryForTimeStep(0).GetPointer());
  }

  if (clippingGeometryOfCurrentTimeStep == nullptr)
    return;

  m_InputTimeSelector->SetInput(input);
  m_OutputTimeSelector->SetInput(this->GetOutput());

  mitk::Image::RegionType outputRegion = output->GetRequestedRegion();
  const mitk::TimeGeometry *outputTimeGeometry = output->GetTimeGeometry();
  const mitk::TimeGeometry *inputTimeGeometry = input->GetTimeGeometry();
  ScalarType timeInMS;

  int timestep = 0;
  int tstart = outputRegion.GetIndex(3);
  int tmax = tstart + outputRegion.GetSize(3);

  int t;
  for (t = tstart; t < tmax; ++t)
  {
    timeInMS = outputTimeGeometry->TimeStepToTimePoint(t);
    timestep = inputTimeGeometry->TimePointToTimeStep(timeInMS);

    m_InputTimeSelector->SetTimeNr(timestep);
    m_InputTimeSelector->UpdateLargestPossibleRegion();
    m_OutputTimeSelector->SetTimeNr(t);
    m_OutputTimeSelector->UpdateLargestPossibleRegion();

    if (m_TimeClippingGeometry.IsNotNull())
    {
      timestep = m_TimeClippingGeometry->TimePointToTimeStep(timeInMS);
      if (m_TimeClippingGeometry->IsValidTimeStep(timestep) == false)
        continue;

      clippingGeometryOfCurrentTimeStep =
        dynamic_cast<const PlaneGeometry *>(m_TimeClippingGeometry->GetGeometryForTimeStep(timestep).GetPointer());
    }

    AccessByItk_2(
      m_InputTimeSelector->GetOutput(), _InternalComputeClippedImage, this, clippingGeometryOfCurrentTimeStep);
  }

  m_TimeOfHeaderInitialization.Modified();
}


text:
package com.amazonaws.services.ec2.model;

/**
 *
 */
public enum ReportInstanceReasonCodes {

    InstanceStuckInState("instance-stuck-in-state"),
    Unresponsive("unresponsive"),
    NotAcceptingCredentials("not-accepting-credentials"),
    PasswordNotAvailable("password-not-available"),
    PerformanceNetwork("performance-network"),
    PerformanceInstanceStore("performance-instance-store"),
    PerformanceEbsVolume("performance-ebs-volume"),
    PerformanceOther("performance-other"),
    Other("other");

    private String value;

    private ReportInstanceReasonCodes(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * Use this in place of valueOf.
     *
     * @param value
     *        real value
     * @return ReportInstanceReasonCodes corresponding to the value
     */
    public static ReportInstanceReasonCodes fromValue(String value) {
        if (value == null || "".equals(value)) {
            throw new IllegalArgumentException("Value cannot be null or empty!");
        }

        for (ReportInstanceReasonCodes enumEntry : ReportInstanceReasonCodes
                .values()) {
            if (enumEntry.toString().equals(value)) {
                return enumEntry;
            }
        }

        throw new IllegalArgumentException("Cannot create enum from " + value
                + " value!");
    }
}


text: from microcosm_postgres.temporary.context import transient  # noqa: F401


text:
package com.sayar.requests.impl;

import com.sayar.requests.RequestArguments;
import com.sayar.requests.Response;

public class HttpUrlConnectionRequestHandler implements RequestHandler {

	/*
	 * (non-Javadoc)
	 *
	 * @see com.sayar.requests.impl.RequestHandler#execute(com.sayar.requests.
	 * RequestArguments)
	 */
	public Response execute(final RequestArguments args) {
		// TODO
		// http://developer.android.com/reference/java/net/HttpURLConnection.html
		// TODO
		// http://android-developers.blogspot.com/2011/09/androids-http-clients.html
		return null;
	}

	public void shutdown() {
		// TODO Auto-generated method stub

	}

}


text:
using System;
using System.Composition;

namespace Wrox.ProCSharp.Composition
{
    public class CalculatorImport
    {
        public event EventHandler<ImportEventArgs> ImportsSatisfied;

        [Import]
        public Lazy<ICalculator> Calculator { get; set; }

        [OnImportsSatisfied]
        public void OnImportsSatisfied() =>
            ImportsSatisfied?.Invoke(this, new ImportEventArgs { StatusMessage = "ICalculator import successful" });
    }
}


text:
package nsqadmin

import (
	"bytes"
	"crypto/tls"
	"crypto/x509"
	"encoding/json"
	"io/ioutil"
	"log"
	"net"
	"net/http"
	"net/url"
	"os"
	"sync"
	"sync/atomic"

	"github.com/nsqio/nsq/internal/http_api"
	"github.com/nsqio/nsq/internal/lg"
	"github.com/nsqio/nsq/internal/util"
	"github.com/nsqio/nsq/internal/version"
)

type NSQAdmin struct {
	sync.RWMutex
	opts                atomic.Value
	httpListener        net.Listener
	waitGroup           util.WaitGroupWrapper
	notifications       chan *AdminAction
	graphiteURL         *url.URL
	httpClientTLSConfig *tls.Config
}

func New(opts *Options) *NSQAdmin {
	if opts.Logger == nil {
		opts.Logger = log.New(os.Stderr, opts.LogPrefix, log.Ldate|log.Ltime|log.Lmicroseconds)
	}

	n := &NSQAdmin{
		notifications: make(chan *AdminAction),
	}
	n.swapOpts(opts)

	var err error
	opts.logLevel, err = lg.ParseLogLevel(opts.LogLevel, opts.Verbose)
	if err != nil {
		n.logf(LOG_FATAL, "%s", err)
		os.Exit(1)
	}

	if len(opts.NSQDHTTPAddresses) == 0 && len(opts.NSQLookupdHTTPAddresses) == 0 {
		n.logf(LOG_FATAL, "--nsqd-http-address or --lookupd-http-address required.")
		os.Exit(1)
	}

	if len(opts.NSQDHTTPAddresses) != 0 && len(opts.NSQLookupdHTTPAddresses) != 0 {
		n.logf(LOG_FATAL, "use --nsqd-http-address or --lookupd-http-address not both")
		os.Exit(1)
	}

	// verify that the supplied address is valid
	verifyAddress := func(arg string, address string) *net.TCPAddr {
		addr, err := net.ResolveTCPAddr("tcp", address)
		if err != nil {
			n.logf(LOG_FATAL, "failed to resolve %s address (%s) - %s", arg, address, err)
			os.Exit(1)
		}
		return addr
	}

	if opts.HTTPClientTLSCert != "" && opts.HTTPClientTLSKey == "" {
		n.logf(LOG_FATAL, "--http-client-tls-key must be specified with --http-client-tls-cert")
		os.Exit(1)
	}

	if opts.HTTPClientTLSKey != "" && opts.HTTPClientTLSCert == "" {
		n.logf(LOG_FATAL, "--http-client-tls-cert must be specified with --http-client-tls-key")
		os.Exit(1)
	}

	n.httpClientTLSConfig = &tls.Config{
		InsecureSkipVerify: opts.HTTPClientTLSInsecureSkipVerify,
	}
	if opts.HTTPClientTLSCert != "" && opts.HTTPClientTLSKey != "" {
		cert, err := tls.LoadX509KeyPair(opts.HTTPClientTLSCert, opts.HTTPClientTLSKey)
		if err != nil {
			n.logf(LOG_FATAL, "failed to LoadX509KeyPair %s, %s - %s",
				opts.HTTPClientTLSCert, opts.HTTPClientTLSKey, err)
			os.Exit(1)
		}
		n.httpClientTLSConfig.Certificates = []tls.Certificate{cert}
	}
	if opts.HTTPClientTLSRootCAFile != "" {
		tlsCertPool := x509.NewCertPool()
		caCertFile, err := ioutil.ReadFile(opts.HTTPClientTLSRootCAFile)
		if err != nil {
			n.logf(LOG_FATAL, "failed to read TLS root CA file %s - %s",
				opts.HTTPClientTLSRootCAFile, err)
			os.Exit(1)
		}
		if !tlsCertPool.AppendCertsFromPEM(caCertFile) {
			n.logf(LOG_FATAL, "failed to AppendCertsFromPEM %s", opts.HTTPClientTLSRootCAFile)
			os.Exit(1)
		}
		n.httpClientTLSConfig.RootCAs = tlsCertPool
	}

	// require that both the hostname and port be specified
	for _, address := range opts.NSQLookupdHTTPAddresses {
		verifyAddress("--lookupd-http-address", address)
	}

	for _, address := range opts.NSQDHTTPAddresses {
		verifyAddress("--nsqd-http-address", address)
	}

	if opts.ProxyGraphite {
		url, err := url.Parse(opts.GraphiteURL)
		if err != nil {
			n.logf(LOG_FATAL, "failed to parse --graphite-url='%s' - %s", opts.GraphiteURL, err)
			os.Exit(1)
		}
		n.graphiteURL = url
	}

	if opts.AllowConfigFromCIDR != "" {
		_, _, err := net.ParseCIDR(opts.AllowConfigFromCIDR)
		if err != nil {
			n.logf(LOG_FATAL, "failed to parse --allow-config-from-cidr='%s' - %s", opts.AllowConfigFromCIDR, err)
			os.Exit(1)
		}
	}

	n.logf(LOG_INFO, version.String("nsqadmin"))

	return n
}

func (n *NSQAdmin) getOpts() *Options {
	return n.opts.Load().(*Options)
}

func (n *NSQAdmin) swapOpts(opts *Options) {
	n.opts.Store(opts)
}

func (n *NSQAdmin) RealHTTPAddr() *net.TCPAddr {
	n.RLock()
	defer n.RUnlock()
	return n.httpListener.Addr().(*net.TCPAddr)
}

func (n *NSQAdmin) handleAdminActions() {
	for action := range n.notifications {
		content, err := json.Marshal(action)
		if err != nil {
			n.logf(LOG_ERROR, "failed to serialize admin action - %s", err)
		}
		httpclient := &http.Client{
			Transport: http_api.NewDeadlineTransport(n.getOpts().HTTPClientConnectTimeout, n.getOpts().HTTPClientRequestTimeout),
		}
		n.logf(LOG_INFO, "POSTing notification to %s", n.getOpts().NotificationHTTPEndpoint)
		resp, err := httpclient.Post(n.getOpts().NotificationHTTPEndpoint,
			"application/json", bytes.NewBuffer(content))
		if err != nil {
			n.logf(LOG_ERROR, "failed to POST notification - %s", err)
		}
		resp.Body.Close()
	}
}

func (n *NSQAdmin) Main() {
	httpListener, err := net.Listen("tcp", n.getOpts().HTTPAddress)
	if err != nil {
		n.logf(LOG_FATAL, "listen (%s) failed - %s", n.getOpts().HTTPAddress, err)
		os.Exit(1)
	}
	n.Lock()
	n.httpListener = httpListener
	n.Unlock()
	httpServer := NewHTTPServer(&Context{n})
	n.waitGroup.Wrap(func() {
		http_api.Serve(n.httpListener, http_api.CompressHandler(httpServer), "HTTP", n.logf)
	})
	n.waitGroup.Wrap(func() { n.handleAdminActions() })
}

func (n *NSQAdmin) Exit() {
	n.httpListener.Close()
	close(n.notifications)
	n.waitGroup.Wait()
}


text:
#pragma once

#include "CWindowManager.h"
#include "CTimeManager.h"
#include "CGamePad.h"


text:
package code
package snippet

import config.Site
import model.{User, LoginCredentials}

import scala.xml._

import net.liftweb._
import common._
import http.{DispatchSnippet, S, SHtml, StatefulSnippet}
import http.js.JsCmd
import http.js.JsCmds._
import util._
import Helpers._

import net.liftmodules.extras.{Gravatar, SnippetHelper}
import net.liftmodules.mongoauth.LoginRedirect
import net.liftmodules.mongoauth.model.ExtSession

sealed trait UserSnippet extends SnippetHelper with Loggable {

  protected def user: Box[User]

  protected def serve(snip: User => NodeSeq): NodeSeq =
    (for {
      u <- user ?~ "User not found"
    } yield {
      snip(u)
    }): NodeSeq

  protected def serve(html: NodeSeq)(snip: User => CssSel): NodeSeq =
    (for {
      u <- user ?~ "User not found"
    } yield {
      snip(u)(html)
    }): NodeSeq

  def header(xhtml: NodeSeq): NodeSeq = serve { user =>

      {gravatar(xhtml)}

{name(xhtml)}

  }

  def gravatar(xhtml: NodeSeq): NodeSeq = {
    val size = S.attr("size").map(toInt) openOr Gravatar.defaultSize.vend

    serve { user =>
      Gravatar.imgTag(user.email.get, size)
    }
  }

  def username(xhtml: NodeSeq): NodeSeq = serve { user =>
    Text(user.username.get)
  }

  def name(xhtml: NodeSeq): NodeSeq = serve { user =>
    if (user.name.get.length > 0)
      Text("%s (%s)".format(user.name.get, user.username.get))
    else
      Text(user.username.get)
  }

  def title(xhtml: NodeSeq): NodeSeq = serve { user =>
    <lift:head>
      <title lift="Menu.title">{"lift-poly-example: %*% - "+user.username.get}</title>
    </lift:head>
  }
}

object CurrentUser extends UserSnippet {
  protected def user = User.currentUser
}

object ProfileLocUser extends UserSnippet {

  protected def user = Site.profileLoc.currentValue

  import java.text.SimpleDateFormat

  val df = new SimpleDateFormat("MMM d, yyyy")

  def profile(html: NodeSeq): NodeSeq = serve(html) { user =>
    val editLink: NodeSeq =
      if (User.currentUser.filter(_.id.get == user.id.get).isDefined)
         Edit Your Profile
      else
        NodeSeq.Empty

    "#id_avatar *" #> Gravatar.imgTag(user.email.get) &
    "#id_name *" #>
{user.name.get}
 &
    "#id_location *" #> user.location.get &
    "#id_whencreated" #> df.format(user.whenCreated.toDate).toString &
    "#id_bio *" #> user.bio.get &
    "#id_editlink *" #> editLink
  }
}

object UserLogin extends Loggable {

  def render = {
    // form vars
    var password = ""
    var hasPassword = false
    var remember = User.loginCredentials.is.isRememberMe

    val radios = SHtml.radioElem[Boolean](
      Seq(false, true),
      Full(hasPassword)
    )(it => it.foreach(hasPassword = _))

    def doSubmit(): JsCmd = {
      S.param("email").map(e => {
        val email = e.toLowerCase.trim
        // save the email and remember entered in the session var
        User.loginCredentials(LoginCredentials(email, remember))

        if (hasPassword && email.length > 0 && password.length > 0) {
          User.findByEmail(email) match {
            case Full(user) if (user.password.isMatch(password)) =>
              logger.debug("pwd matched")
              User.logUserIn(user, true)
              if (remember) User.createExtSession(user.id.get)
              else ExtSession.deleteExtCookie()
              RedirectTo(LoginRedirect.openOr(Site.home.url))
            case _ =>
              S.error("Invalid credentials")
              Noop
          }
        }
        else if (hasPassword && email.length <= 0 && password.length > 0) {
          S.error("id_email_err", "Please enter an email")
          Noop
        }
        else if (hasPassword && password.length <= 0 && email.length > 0) {
          S.error("id_password_err", "Please enter a password")
          Noop
        }
        else if (hasPassword) {
          S.error("id_email_err", "Please enter an email")
          S.error("id_password_err", "Please enter a password")
          Noop
        }
        else if (email.length > 0) {
          // see if email exists in the database
          User.findByEmail(email) match {
            case Full(user) =>
              User.sendLoginToken(user)
              User.loginCredentials.remove()
              S.notice("An email has been sent to you with instructions for accessing your account")
              Noop
            case _ =>
              RedirectTo(Site.register.url)
          }
        }
        else {
          S.error("id_email_err", "Please enter an email address")
          Noop
        }
      }) openOr {
        S.error("id_email_err", "Please enter an email address")
        Noop
      }
    }

    "#id_email [value]" #> User.loginCredentials.is.email &
    "#id_password" #> SHtml.password(password, password = _) &
    "#no_password" #> radios(0) &
    "#yes_password" #> radios(1) &
    "name=remember" #> SHtml.checkbox(remember, remember = _) &
    "#id_submit" #> SHtml.hidden(doSubmit)
  }
}

object UserTopbar {
  def render = {
    User.currentUser match {
      case Full(user) =>

              {Gravatar.imgTag(user.email.get, 20)}
              {user.username.get}

 Profile

<lift:Menu.item name="Account" donthide="true" linktoself="true"> Settings</lift:Menu.item>

<lift:Menu.item name="Logout" donthide="true"> Log Out</lift:Menu.item>

      case _ if (S.request.flatMap(_.location).map(_.name).filterNot(it => List("Login", "Register").contains(it)).isDefined) =>
        Sign In
      case _ => NodeSeq.Empty
    }
  }
}


text:
/**
 */
package isostdisois_13584_32ed_1techxmlschemaontomlSimplified.impl;

import org.eclipse.emf.ecore.EClass;

import isostdisois_13584_32ed_1techxmlschemaontomlSimplified.CONDITIONDET;
import isostdisois_13584_32ed_1techxmlschemaontomlSimplified.Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage;

/**
 *
 * An implementation of the model object 'CONDITIONDET'.
 *
 *
 * @generated
 */
public class CONDITIONDETImpl extends PROPERTYImpl implements CONDITIONDET {
	/**
	 *
	 *
	 * @generated
	 */
	protected CONDITIONDETImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.Literals.CONDITIONDET;
	}

} //CONDITIONDETImpl


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
 ~ Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ Licensed under the Apache License, Version 2.0 (the "License");
 ~ you may not use this file except in compliance with the License.
 ~ You may obtain a copy of the License at
 ~
 ~      http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing, software
 ~ distributed under the License is distributed on an "AS IS" BASIS,
 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ~ See the License for the specific language governing permissions and
 ~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>org.wso2.carbon.business-process</groupId>
        <artifactId>carbon-business-process</artifactId>
        <version>4.4.3-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>application-mgt-features</artifactId>
    <packaging>pom</packaging>
    <name>WSO2 Carbon - Application Management Feature Aggregator Module</name>
    <url>http://wso2.org</url>

            <modules>
                <module>org.wso2.carbon.application.mgt.bpel.server.feature</module>
                <module>org.wso2.carbon.application.mgt.bpel.ui.feature</module>
                <module>org.wso2.carbon.application.mgt.bpel.feature</module>
                <module>org.wso2.carbon.application.mgt.humantask.server.feature</module>
                <module>org.wso2.carbon.application.mgt.humantask.ui.feature</module>
                <module>org.wso2.carbon.application.mgt.humantask.feature</module>
            </modules>

        <dependencies>
	    	<dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.bpel.skeleton</artifactId>
            </dependency>
	    	<dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.humantask.skeleton</artifactId>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.application.mgt.bpel</artifactId>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.application.mgt.bpel.ui</artifactId>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.application.mgt.bpel.stub</artifactId>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.application.mgt.humantask</artifactId>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.application.mgt.humantask.ui</artifactId>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.business-process</groupId>
                <artifactId>org.wso2.carbon.application.mgt.humantask.stub</artifactId>
            </dependency>
        </dependencies>

</project>


text:
static NSString *CRMarkedUpHashtag(PKTokenizer *t, PKToken *inTok, PKToken *poundTok);
static NSString *CRMarkedUpUsername(PKTokenizer *t, PKToken *inTok, PKToken *atTok, NSString **outUsername);
static NSString *CRMarkedUpURL(PKTokenizer *t, PKToken *inTok, PKToken *colonSlashSlashTok);

NSString *CRMarkedUpStatus(NSString *inStatus, NSArray **outMentions) {
    NSMutableArray *mentions = nil;
    NSMutableString *ms = [NSMutableString stringWithCapacity:[inStatus length]];

    static PKTokenizer *t = nil;
    static PKToken *ltTok = nil;
    static PKToken *atTok = nil;
    static PKToken *poundTok = nil;
    static PKToken *httpTok = nil;
    static PKToken *httpsTok = nil;
    static PKToken *colonSlashSlashTok = nil;
    if (!t) {
        //PKToken *wwwTok = [PKToken tokenWithTokenType:PKTokenTypeSymbol stringValue:@"www." floatValue:0];
        ltTok = [[PKToken alloc] initWithTokenType:PKTokenTypeSymbol stringValue:@"<" floatValue:0];
        atTok = [[PKToken alloc] initWithTokenType:PKTokenTypeSymbol stringValue:@"@" floatValue:0];
        poundTok = [[PKToken alloc] initWithTokenType:PKTokenTypeSymbol stringValue:@"#" floatValue:0];
        httpTok = [[PKToken alloc] initWithTokenType:PKTokenTypeWord stringValue:@"http" floatValue:0];
        httpsTok = [[PKToken alloc] initWithTokenType:PKTokenTypeWord stringValue:@"https" floatValue:0];
        colonSlashSlashTok = [[PKToken alloc] initWithTokenType:PKTokenTypeSymbol stringValue:@"://" floatValue:0];

        t = [[PKTokenizer alloc] init];
        [t.symbolState remove:@"<="];
        [t.symbolState remove:@">="];
        [t.symbolState remove:@"!="];
        [t.symbolState remove:@"=="];

        // no comments
        [t setTokenizerState:t.symbolState from:'/' to:'/'];
        [t setTokenizerState:t.symbolState from:'#' to:'#'];

        // no quotes
        [t.wordState setWordChars:NO from:'\'' to:'\''];
        [t setTokenizerState:t.whitespaceState from:'"' to:'"'];
        [t.whitespaceState setWhitespaceChars:YES from:'"' to:'"'];
        [t setTokenizerState:t.whitespaceState from:'\'' to:'\''];
        [t.whitespaceState setWhitespaceChars:YES from:'\'' to:'\''];

        t.whitespaceState.reportsWhitespaceTokens = YES;
        [t setTokenizerState:t.whitespaceState from:'(' to:')'];
        [t.whitespaceState setWhitespaceChars:YES from:'(' to:')'];

        [t.symbolState add:[colonSlashSlashTok stringValue]];
        //[t.symbolState add:[wwwTok stringValue]];

        [t setTokenizerState:t.wordState from:'0' to:'9'];
   }

    t.string = inStatus;

    PKToken *eof = [PKToken EOFToken];
    PKToken *tok = nil;
    NSString *s = nil;

    while ((tok = [t nextToken]) != eof) {
        if ([atTok isEqual:tok]) {
            NSString *uname = nil;
            s = CRMarkedUpUsername(t, tok, atTok, &uname);
            if (uname && [uname length]) {
                if (!mentions) {
                    mentions = [NSMutableArray array];
                }
                [mentions addObject:uname];
            }
        } else if ([poundTok isEqual:tok]) {
            s = CRMarkedUpHashtag(t, tok, poundTok);
        } else if ([httpTok isEqual:tok] || [httpsTok isEqual:tok]) {
            s = CRMarkedUpURL(t, tok, colonSlashSlashTok);
        } else if ([ltTok isEqual:tok]) {
            s = @"<";
        } else {
            s = [tok stringValue];
        }

        [ms appendString:s];
    }

    if (mentions) {
        *outMentions = mentions;
    }
    return [[ms copy] autorelease];
}

static NSString *CRMarkedUpHashtag(PKTokenizer *t, PKToken *inTok, PKToken *poundTok) {
    PKToken *eof = [PKToken EOFToken];
    NSMutableString *ms = [NSMutableString stringWithString:[inTok stringValue]];

    PKToken *tok = nil;
    while (tok = [t nextToken]) {
        NSString *s = [tok stringValue];

        if (eof == tok) {
            break;
        } else if ([poundTok isEqual:tok]) {
            [ms appendString:s];
            continue;
        } else if (tok.isWord) {
            [ms setString:@""];
            [ms appendFormat:@"#%@", s, s, s];
            break;
        } else {
            [ms appendString:s];
            break;
        }
    }
    return ms;
}

static NSString *CRMarkedUpUsername(PKTokenizer *t, PKToken *inTok, PKToken *atTok, NSString **outUsername) {
    PKToken *eof = [PKToken EOFToken];
    NSMutableString *ms = [NSMutableString stringWithString:[inTok stringValue]];

    PKToken *tok = nil;
    while (tok = [t nextToken]) {
        NSString *s = [tok stringValue];

        if (eof == tok) {
            break;
        } else if ([atTok isEqual:tok]) {
            [ms appendString:s];
            continue;
        } else if (tok.isWord) {
            [ms setString:@""];
            [ms appendFormat:@"@%@", s, s, s];
            if (outUsername) {
                *outUsername = s;
            }
            break;
        } else {
            [ms appendString:s];
            break;
        }
    }
    return ms;
}

static NSString *CRMarkedUpURL(PKTokenizer *t, PKToken *inTok, PKToken *colonSlashSlashTok) {
    PKToken *tok = [t nextToken];
    if (![colonSlashSlashTok isEqual:tok]) {
        return [NSString stringWithFormat:@"%@%@", [inTok stringValue], [tok stringValue]];
    }

    PKToken *eof = [PKToken EOFToken];
    NSMutableString *ms = [NSMutableString string];

    NSString *s = nil;
    while (tok = [t nextToken]) {
        s = [tok stringValue];

        if (eof == tok || tok.isWhitespace) {
            break;
        } else if ([s length] && ((PKUniChar)[s characterAtIndex:0]) > 255) { // no non-ascii chars plz
            break;
        } else {
            [ms appendString:s];
        }
    }

    NSString *display = [[ms copy] autorelease];
    NSInteger maxLen = 32;
    if ([display length] > maxLen) {
        display = [NSString stringWithFormat:@"%@%C", [display substringToIndex:maxLen], 0x2026];
    }

    if ([display hasSuffix:@"/"]) {
        display = [display substringToIndex:[display length] - 1];
    }

    ms = [NSMutableString stringWithFormat:@"%@", ms, ms, display];
    if (s) [ms appendString:s];
    return ms;
}

NSString *CRDefaultProfileImageURLString() {
    static NSString *sDefaultProfileImageURLString = nil;

    if (!sDefaultProfileImageURLString) {
        sDefaultProfileImageURLString = [[[NSBundle bundleForClass:[CRTwitterPlugIn class]] pathForResource:@"default_profile_pic" ofType:@"png"] retain];
    }

    return sDefaultProfileImageURLString;
}

NSURL *CRDefaultProfileImageURL() {
    static NSURL *sDefaultProfileImageURL = nil;

    if (!sDefaultProfileImageURL) {
        sDefaultProfileImageURL = [[NSURL alloc] initFileURLWithPath:CRDefaultProfileImageURLString()];
    }

    return sDefaultProfileImageURL;
}

NSImage *CRDefaultProfileImage() {
    static NSImage *sDefaultProfileImage = nil;

    if (!sDefaultProfileImage) {
        sDefaultProfileImage = [[NSImage alloc] initWithContentsOfURL:CRDefaultProfileImageURL()];
    }

    return sDefaultProfileImage;
}

NSString *CRFormatDateString(NSString *inStr) {
    static NSDateFormatter *fmt = nil;
    if (!fmt) {
        fmt = [[NSDateFormatter alloc] init];
        [fmt setDateFormat:@"yyyy-MM-dd HH:mm:SS zzzz"]; // 2009-10-17 17:31:01 -0700
    }

    NSDate *date = [fmt dateFromString:inStr];
    return CRFormatDate(date);
}

NSString *CRFormatDate(NSDate *inDate) {
    NSTimeInterval secs = abs([inDate timeIntervalSinceNow]);

    NSString *s = nil;
    if (secs < 60) {
        float seconds = (float)round((float)secs);
        if (1 == seconds) {
            s = [NSString stringWithFormat:NSLocalizedString(@"%2.0f sec ago", @""), seconds];
        } else {
            s = [NSString stringWithFormat:NSLocalizedString(@"%2.0f secs ago", @""), seconds];
        }
    } else if (secs < 120) {
        s = NSLocalizedString(@"1 min ago", @"");
    } else if (secs < 60 * 60) {
        s = [NSString stringWithFormat:NSLocalizedString(@"%1.0f mins ago", @""), (float)round((float)secs/(float)60.0)];
    } else if (secs < 60 * 60 * 24) {
        float hours = (float)round((float)secs /(float)(60. * 60.));
        if (1 == hours) {
            s = [NSString stringWithFormat:NSLocalizedString(@"%1.0f hour ago", @""), hours];
        } else {
            s = [NSString stringWithFormat:NSLocalizedString(@"%1.0f hours ago", @""), hours];
        }
    } else {
        static NSDateFormatter *fmt = nil;
        if (!fmt) {
            fmt = [[NSDateFormatter alloc] init];
            //            [fmt setDateFormat:@"HH:mm 'on' EEEE MMMM d"]; // 2009-07-08T:02:08:14Z
            [fmt setDateFormat:@"MMM d"]; // 2009-07-08T:02:08:14Z
        }
        s = [fmt stringFromDate:inDate];
    }

    return s;
}

NSString *CRStringByTrimmingCruzPrefixFromString(NSString *inStr) {
    static NSString *prefix = nil;
    if (!prefix) {
        prefix = [[NSString alloc] initWithString:@"cruz:"];
    }

    if ([inStr hasPrefix:prefix]) {
        return [inStr substringFromIndex:5];
    } else {
        return inStr;
    }
}

NSString *CRStringByTrimmingCruzPrefixFromURL(NSURL *URL) {
    return CRStringByTrimmingCruzPrefixFromString([URL absoluteString]);
}


text:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] glFlushRasterSGIX: Binding for glFlushRasterSGIX.
		/// </summary>
		[RequiredByFeature("GL_SGIX_flush_raster")]
		public static void FlushRasterSGIX()
		{
			Debug.Assert(Delegates.pglFlushRasterSGIX != null, "pglFlushRasterSGIX not implemented");
			Delegates.pglFlushRasterSGIX();
			LogCommand("glFlushRasterSGIX", null			);
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_SGIX_flush_raster")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glFlushRasterSGIX();

			[RequiredByFeature("GL_SGIX_flush_raster")]
			[ThreadStatic]
			internal static glFlushRasterSGIX pglFlushRasterSGIX;

		}
	}

}


text:
import sys

# Simple python version test
major,minor = sys.version_info[:2]
py_version = sys.version.split()[0]
if major != 2 or minor < 4:
  print "You are using python %s, but version 2.4 or greater is required" % py_version
  raise SystemExit(1)

fatal = 0
warning = 0

# Test for whisper
try:
  import whisper
except:
  print "[FATAL] Unable to import the 'whisper' module, please download this package from the Graphite project page and install it."
  fatal += 1

# Test for pycairo
try:
  import cairo
except:
  print "[FATAL] Unable to import the 'cairo' module, do you have pycairo installed for python %s?" % py_version
  cairo = None
  fatal += 1

# Test that pycairo has the PNG backend
try:
  if cairo:
    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 10, 10)
    del surface
except:
  print "[FATAL] Failed to create an ImageSurface with cairo, you probably need to recompile cairo with PNG support"
  fatal += 1

# Test for django
try:
  import django
except:
  print "[FATAL] Unable to import the 'django' module, do you have Django installed for python %s?" % py_version
  django = None
  fatal += 1

# Test for django-tagging
try:
  import tagging
except:
  print "[FATAL] Unable to import the 'tagging' module, do you have django-tagging installed for python %s?" % py_version
  fatal += 1

# Verify django version
if django and django.VERSION[0] < 1:
  version = '.'.join([str(v) for v in django.VERSION if v is not None])
  print "[FATAL] You have django version %s installed, but version 1.0 or greater is required" % version
  fatal += 1

# Test for a json module
try:
  import json
except ImportError:
  try:
    import simplejson
  except ImportError:
    print "[FATAL] Unable to import either the 'json' or 'simplejson' module, at least one is required."
    fatal += 1

# Test for zope.interface
try:
  from zope.interface import Interface
except ImportError:
  print "[WARNING] Unable to import Interface from zope.interface."
  print "Without it, you will be unable to run carbon on this server."
  warning +=1

# Test for mod_python
try:
  import mod_python
except:
  print "[WARNING] Unable to import the 'mod_python' module, do you have mod_python installed for python %s?" % py_version
  print "mod_python is one of the most common ways to run graphite-web under apache."
  print "Without mod_python you will still be able to use the built in development server; which is not"
  print "recommended for production use."
  print "wsgi or other approaches for production scale use are also possible without mod_python"
  warning += 1

# Test for python-memcached
try:
  import memcache
except:
  print "[WARNING]"
  print "Unable to import the 'memcache' module, do you have python-memcached installed for python %s?" % py_version
  print "This feature is not required but greatly improves performance.\n"
  warning += 1

# Test for sqlite
try:
  try:
    import sqlite3 #python 2.5+
  except:
    from pysqlite2 import dbapi2 #python 2.4
except:
  print "[WARNING]"
  print "Unable to import the sqlite module, do you have python-sqlite2 installed for python %s?" % py_version
  print "If you plan on using another database backend that Django supports (such as mysql or postgres)"
  print "then don't worry about this. However if you do not want to setup the database yourself, you will"
  print "need to install sqlite2 and python-sqlite2.\n"
  warning += 1

# Test for python-ldap
try:
  import ldap
except:
  print "[WARNING]"
  print "Unable to import the 'ldap' module, do you have python-ldap installed for python %s?" % py_version
  print "Without python-ldap, you will not be able to use LDAP authentication in the graphite webapp.\n"
  warning += 1

# Test for Twisted python
try:
  import twisted
except:
  print "[WARNING]"
  print "Unable to import the 'twisted' package, do you have Twisted installed for python %s?" % py_version
  print "Without Twisted, you cannot run carbon on this server."
  warning += 1

# Test for txamqp
try:
  import txamqp
except:
  print "[WARNING]"
  print "Unable to import the 'txamqp' module, this is required if you want to use AMQP."
  print "Note that txamqp requires python 2.5 or greater."
  warning += 1

if fatal:
  print "%d necessary dependencies not met. Graphite will not function until these dependencies are fulfilled." % fatal

else:
  print "All necessary dependencies are met."

if warning:
  print "%d optional dependencies not met. Please consider the warning messages before proceeding." % warning

else:
  print "All optional dependencies are met."


text:
package com.cezarykluczynski.stapi.etl.occupation.creation.service;

import com.cezarykluczynski.stapi.etl.common.processor.CategoryTitlesExtractingProcessor;
import com.cezarykluczynski.stapi.etl.common.service.CategorySortingService;
import com.cezarykluczynski.stapi.etl.template.common.service.MediaWikiPageFilter;
import com.cezarykluczynski.stapi.etl.util.constant.CategoryTitle;
import com.cezarykluczynski.stapi.sources.mediawiki.dto.Page;
import com.google.common.collect.Sets;
import org.springframework.stereotype.Service;

import java.util.Set;

@Service
public class OccupationPageFilter implements MediaWikiPageFilter {

	private static final Set<String> INVALID_TITLES = Sets.newHashSet("Commando", "Occupational hazard", "Prostitution", "Public relations");
	private static final Set<String> INVALID_SUFFIXES = Sets.newHashSet(" crew", " line", " organization", " team");

	private final CategorySortingService categorySortingService;

	private final CategoryTitlesExtractingProcessor categoryTitlesExtractingProcessor;

	public OccupationPageFilter(CategorySortingService categorySortingService, CategoryTitlesExtractingProcessor categoryTitlesExtractingProcessor) {
		this.categorySortingService = categorySortingService;
		this.categoryTitlesExtractingProcessor = categoryTitlesExtractingProcessor;
	}

	@Override
	public boolean shouldBeFilteredOut(Page page) {
		String title = page.getTitle();
		return categorySortingService.isSortedOnTopOfAnyCategory(page)
				|| INVALID_TITLES.contains(title)
				|| INVALID_SUFFIXES.stream().anyMatch(title::endsWith)
				|| categoryTitlesExtractingProcessor.process(page.getCategories()).contains(CategoryTitle.LISTS);
	}

}


text: assert(Number.POSITIVE_INFINITY * Number.NEGATIVE_INFINITY === Number.NEGATIVE_INFINITY)


text:
package com.google.cloud.pubsublite;

/** BacklogLocation refers to a location with respect to the message backlog. */
public enum BacklogLocation {
  /** BEGINNING refers to the location of the oldest retained message. */
  BEGINNING,
  /**
   * END refers to the location past all currently published messages, skipping the entire message
   * backlog.
   */
  END
}


text:
package com.google.zxing.client.android.result;

import android.app.Activity;
import com.google.zxing.client.android.R;
import com.google.zxing.client.result.ParsedResult;
import com.google.zxing.client.result.URIParsedResult;

public final class URIResultHandler extends ResultHandler {

  private static final int[] mButtons = {
      R.string.button_open_browser,
      R.string.button_share_by_email,
      R.string.button_share_by_sms
  };

  public URIResultHandler(Activity activity, ParsedResult result) {
    super(activity, result);
  }

  public int getButtonCount() {
    return mButtons.length;
  }

  public int getButtonText(int index) {
    return mButtons[index];
  }

  public void handleButtonPress(int index) {
    URIParsedResult uriResult = (URIParsedResult) mResult;
    switch (index) {
      case 0:
        openURL(uriResult.getURI());
        break;
      case 1:
        shareByEmail(uriResult.getURI());
        break;
      case 2:
        shareBySMS(uriResult.getURI());
        break;
    }
  }

  public int getDisplayTitle() {
    return R.string.result_uri;
  }

}


text:
<?php

namespace Omnipay\Cocard\Message;

use LSS\XML2Array;
use Omnipay\Common\Exception\InvalidResponseException;
use Omnipay\Common\Message\RequestInterface;

/**
 * Cocard Response
 */
class Response extends AbstractResponse
{
    public function __construct(RequestInterface $request, $data)
    {
        parent::__construct($request, $data);
        $this->request = $request;
        $array = XML2Array::createArray($data);

        if (!isset($array['response'])) {
            throw new InvalidResponseException;
        }
        $this->data = $array['response'];
        unset($array);
    }
}


text:
namespace Atlas.Forms.Interfaces.Managers
{
    public interface ITabbedPageProvider : IMultiPageProvider
    {
    }
}


text:
PROPERTY_STORE
Constant

Module
import { PROPERTY_STORE } from "@tsed/core"

Source	/core/class/Store.ts

### Overview

const PROPERTY_STORE = "tsed:property:store";


text:
package com.opengamma.analytics.financial.horizon;

import javax.time.calendar.ZonedDateTime;

import com.opengamma.analytics.financial.forex.calculator.PresentValueBlackSmileForexCalculator;
import com.opengamma.analytics.financial.forex.definition.ForexOptionVanillaDefinition;
import com.opengamma.analytics.financial.interestrate.InstrumentDerivative;
import com.opengamma.analytics.financial.interestrate.TodayPaymentCalculator;
import com.opengamma.analytics.financial.interestrate.YieldCurveBundle;
import com.opengamma.analytics.financial.model.option.definition.SmileDeltaTermStructureDataBundle;
import com.opengamma.analytics.util.time.TimeCalculator;
import com.opengamma.util.ArgumentChecker;
import com.opengamma.util.money.MultipleCurrencyAmount;

/**
 *
 */
public final class YieldCurvesForwardSlideThetaCalculator {
  private static final ConstantSpreadYieldCurveBundleRolldownFunction CURVES_ROLLDOWN = ConstantSpreadYieldCurveBundleRolldownFunction.getInstance();

  private static final YieldCurvesForwardSlideThetaCalculator INSTANCE = new YieldCurvesForwardSlideThetaCalculator();

  public static YieldCurvesForwardSlideThetaCalculator getInstance() {
    return INSTANCE;
  }

  private YieldCurvesForwardSlideThetaCalculator() {
  }

  public MultipleCurrencyAmount getTheta(final ForexOptionVanillaDefinition definition, final ZonedDateTime date, final String[] yieldCurveNames,
      final SmileDeltaTermStructureDataBundle data, final int daysForward) {
    ArgumentChecker.isTrue(daysForward == 1 || daysForward == -1, "daysForward must be either 1 or -1"); // TODO: Update signature of function to take ForwardOrBack
    final InstrumentDerivative instrumentToday = definition.toDerivative(date, yieldCurveNames);
    final ZonedDateTime horizonDate = date.plusDays(daysForward);
    final double shiftTime = TimeCalculator.getTimeBetween(date, horizonDate);
    final TodayPaymentCalculator paymentCalculator = TodayPaymentCalculator.getInstance(shiftTime);
    final InstrumentDerivative instrumentTomorrow = definition.toDerivative(horizonDate, yieldCurveNames);
    final MultipleCurrencyAmount paymentToday = instrumentToday.accept(paymentCalculator);
    final YieldCurveBundle shiftedCurves = CURVES_ROLLDOWN.rollDown(data, shiftTime);
    final SmileDeltaTermStructureDataBundle tomorrowData = data.with(shiftedCurves);
    final PresentValueBlackSmileForexCalculator pvCalculator = PresentValueBlackSmileForexCalculator.getInstance();
    return subtract(instrumentTomorrow.accept(pvCalculator, tomorrowData), instrumentToday.accept(pvCalculator, data)).plus(paymentToday);
  }

  private MultipleCurrencyAmount subtract(final MultipleCurrencyAmount a, final MultipleCurrencyAmount b) {
    return a.plus(b.multipliedBy(-1));
  }
}


text:
/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package com.github.quartzweb.utils;

/**
 * java基本类型工具类
 * @author quxiucheng [quxiuchengdev@gmail.com]
 */
public class BasicTypeUtils {

    public final static Class byteClass = byte.class;
    public final static Class shortClass = short.class;
    public final static Class intClass = int.class;
    public final static Class longClass = long.class;

    public final static Class floatClass = float.class;
    public final static Class doubleClass = double.class;

    public final static Class charClass = char.class;

    public final static Class boolenClass = boolean.class;

    public final static Class byteObjClass = Byte.class;
    public final static Class shortObjClass = Short.class;
    public final static Class intObjClass = Integer.class;
    public final static Class longObjClass = Long.class;

    public final static Class floatObjClass = Float.class;
    public final static Class doubleObjClass = Double.class;

    public final static Class charObjClass = Character.class;

    public final static Class boolenObjClass = Boolean.class;

    /**
     * 判断某个类型是否为基本类型
     * @param clazz
     * @return
     */
    public static boolean checkBasicType(Class clazz){
        if (byteClass.isAssignableFrom(clazz)
                || shortClass.isAssignableFrom(clazz)
                || intClass.isAssignableFrom(clazz)
                || longClass.isAssignableFrom(clazz)
                || floatClass.isAssignableFrom(clazz)
                || doubleClass.isAssignableFrom(clazz)
                || charClass.isAssignableFrom(clazz)
                || boolenClass.isAssignableFrom(clazz)) {
            return true;
        }
        return false;
    }

    /**
     * 判断某个类型是否为基本类型
     * @param className
     * @return
     */
    public static boolean checkBasicType(String className) {
        if (byteClass.getName().equals(className)
                || shortClass.getName().equals(className)
                || intClass.getName().equals(className)
                || longClass.getName().equals(className)
                || floatClass.getName().equals(className)
                || doubleClass.getName().equals(className)
                || charClass.getName().equals(className)
                || boolenClass.getName().equals(className)) {
            return true;
        }
        return false;
    }

    public static boolean checkBasicTypeObj(String className) {
        if (byteObjClass.toString().equals(className)
                || shortObjClass.getName().equals(className)
                || intObjClass.getName().equals(className)
                || longObjClass.getName().equals(className)
                || floatObjClass.getName().equals(className)
                || doubleObjClass.getName().equals(className)
                || charObjClass.getName().equals(className)
                || boolenObjClass.getName().equals(className)) {
            return true;
        }
        return false;
    }
    /**
     * 判断某个类型是否为基本类型的包装类型
     * @param clazz 某个类的class
     * @return
     */
    public static boolean checkBasicObjectType(Class clazz) {
        if (byteObjClass.isAssignableFrom(clazz)
                || shortObjClass.isAssignableFrom(clazz)
                || intObjClass.isAssignableFrom(clazz)
                || longObjClass.isAssignableFrom(clazz)
                || floatObjClass.isAssignableFrom(clazz)
                || doubleObjClass.isAssignableFrom(clazz)
                || charObjClass.isAssignableFrom(clazz)
                || boolenObjClass.isAssignableFrom(clazz)) {
            return true;
        }
        return false;
    }

    /**
     * 比较基础类型和包装类型是否相等
     * @param basicTypeClass 基础类型的class
     * @param basicObjTypeClass 包装类型的class
     * @return
     */
    public static boolean compareBasicType(Class basicTypeClass, Class basicObjTypeClass) {
        if (byteClass.isAssignableFrom(basicTypeClass)
                && byteObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        if (shortClass.isAssignableFrom(basicTypeClass)
                && shortObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        if (intClass.isAssignableFrom(basicTypeClass)
                && intObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        if (longClass.isAssignableFrom(basicTypeClass)
                && longObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        if (floatClass.isAssignableFrom(basicTypeClass)
                && floatObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        if (doubleClass.isAssignableFrom(basicTypeClass)
                && doubleObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        if (charClass.isAssignableFrom(basicTypeClass)
                && charObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        if (boolenClass.isAssignableFrom(basicTypeClass)
                && boolenObjClass.isAssignableFrom(basicObjTypeClass)) {
            return true;
        }
        return false;
    }

    public static Class getClass(String className) {
        if (byteClass.getName().equals(className)) {
            return byteClass;
        }
        if (shortClass.getName().equals(className)) {
            return shortClass;
        }
        if (intClass.getName().equals(className)) {
            return intClass;
        }
        if (longClass.getName().equals(className)) {
            return longClass;
        }
        if (floatClass.getName().equals(className)) {
            return floatClass;
        }
        if (doubleClass.getName().equals(className)) {
            return doubleClass;
        }
        if (charClass.getName().equals(className)) {
            return charClass;
        }
        if (boolenClass.getName().equals(className)) {
            return boolenClass;
        }
        // 基本类型的转换类
        if (byteObjClass.getName().equals(className)) {
            return byteClass;
        }
        if (shortObjClass.getName().equals(className)) {
            return shortObjClass;
        }
        if (intObjClass.getName().equals(className)) {
            return intObjClass;
        }
        if (longObjClass.getName().equals(className)) {
            return longObjClass;
        }
        if (floatObjClass.getName().equals(className)) {
            return floatObjClass;
        }
        if (doubleObjClass.getName().equals(className)) {
            return doubleObjClass;
        }
        if (charObjClass.getName().equals(className)) {
            return charObjClass;
        }
        if (boolenObjClass.getName().equals(className)) {
            return boolenObjClass;
        }
        return null;
    }

}


text:
<?php

declare(strict_types=1);

namespace Lwf\Http;

use Lwf\Http\Exception\LogicException;
use Lwf\Http\Exception\RuntimeException;
use Lwf\Http\Exception\OutOfBoundsException;

/**
 * Represent a session.
 */
class Session
{
    const AUTO_START = true;
    const NOTIFICATION_ERROR = 'error';
    const NOTIFICATION_INFO = 'info';
    const NOTIFICATION_WARNING = 'warning';
    const NOTIFICATION_SUCCESS = 'success';
    const NOTIFICATION_LEVEL = [
        self::NOTIFICATION_INFO,
        self::NOTIFICATION_ERROR,
        self::NOTIFICATION_SUCCESS,
        self::NOTIFICATION_WARNING
    ];

    /** @var bool  */
    private $started;
    /** @var mixed  */
    private $default;

    /**
     * Constructor
     *
     * @param bool $autoStart True if the session has to start immediately
     */
    public function __construct(bool $autoStart = false)
    {
        $this->started = false;
        $this->setDefault(null);

        if ($autoStart) {
            $this->start();
        }
    }

    /**
     * Start the session
     *
     * @throws RuntimeException If the session fails to start
     */
    public function start()
    {
        if ($this->started) {
            return;
        }

        if (!session_start()) {
            throw new RuntimeException("Session start has failed");
        }

        $this->started = true;
    }

    /**
     * Set the default value which will be returned if a key does not exist
     *
     * @param mixed $default
     */
    public function setDefault($default)
    {
        $this->default = $default;
    }

    /**
     * Get the default value which will be returned if a key does not exists
     *
     * @return mixed
     */
    public function getDefault()
    {
        return $this->default;
    }

    /**
     * Get every data in the session
     *
     * @return mixed[]
     *
     * @throws LogicException If the session isn't running
     */
    public function getAll(): array
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        return $_SESSION;
    }

    /**
     * Get an item from the session
     *
     * @param string $key The key of the item.
     *
     * @return mixed The item or the default value if the item does not exist
     *
     * @throws LogicException If the session isn't running
     */
    public function get(string $key)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        return $_SESSION[$key] ?? $this->default;
    }

    /**
     * Set or modify an item in the session
     *
     * @param string $key   The key of the item
     * @param mixed  $value The value of the item
     *
     * @throws LogicException If the session isn't running
     */
    public function set(string $key, $value)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        $_SESSION[$key] = $value;
    }

    /**
     * Remove an item from the session
     *
     * @param string $key The key of the item
     *
     * @throws LogicException If the session isn't running
     */
    public function remove(string $key)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        if(isset($_SESSION[$key])) {
            unset($_SESSION[$key]);
        }
    }

    /**
     * Remove every items in the session
     *
     * @throws LogicException If the session isn't running
     */
    public function clear()
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }
        $_SESSION = [];
    }

    /**
     * test if a key is defined in the session
     *
     * @param string $key The key to test
     *
     * @return bool
     *
     * @throws LogicException If the session isn't running
     */
    public function has(string $key): bool
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        return isset($_SESSION[$key]);
    }

    /**
     * Get the session id
     *
     * @return string
     *
     * @throws LogicException If the session isn't running
     */
    public function getId(): string
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }
        return session_id();
    }

    /**
     * Set the session id
     *
     * @param string $sid The new session id
     *
     * @throws LogicException If the session is already running
     */
    public function setId(string $sid)
    {
        if ($this->started) {
            throw new LogicException(
                "Impossible de définir l'identifiant de session, la session a déjà démarrée"
            );
        }

        session_id($sid);
    }

    /**
     * Regenerate the session id
     *
     * @throws LogicException If the session isn't running
     */
    public function regenerateId()
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        session_regenerate_id();
    }

    /**
     * Add a notification
     *
     * @param string $type    The type of notification
     * @param string $message The message of notification
     *
     * @throws LogicException If the session isn't running
     * @throws OutOfBoundsException If the type of notification is invalid
     */
    public function addNotification(string $type, string $message)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }
        if (!in_array($type, self::NOTIFICATION_LEVEL)) {
            throw new OutOfBoundsException(sprintf("type %s is invalid", $type));
        }

        $_SESSION['http.session.notification'][] = [$type, $message];
    }

    /**
     * Get all the notifications
     *
     * @param bool $purge True if you want to delete notification from the session when getting them, false otherwise
     *
     * @return array[]
     *
     * @throws LogicException If the session isn't running
     */
    public function getNotifications(bool $purge = true): array
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        $notification = [];

        if (!empty($_SESSION['http.session.notification'])) {
            $notification = $_SESSION['http.session.notification'];
            if ($purge) {
                $_SESSION['http.session.notification'] = [];
            }
        }

        return $notification;
    }

    /**
     * Test if there's at least one notification
     *
     * @return bool
     *
     * @throws LogicException If the session isn't running
     */
    public function hasNotification()
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        return !empty($_SESSION['http.session.notification']);
    }

    /**
     * Add a "success" notification
     *
     * @param string $message The message of the notification
     *
     * @throws LogicException If the session isn't running
     */
    public function addSuccessNotification(string $message)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        $_SESSION['http.session.notification'][] = [self::NOTIFICATION_SUCCESS, $message];
    }

    /**
     * Add a "warning" notification
     *
     * @param string $message The message of the notification
     *
     * @throws LogicException If the session isn't running
     */
    public function addWarningNotification(string $message)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        $_SESSION['http.session.notification'][] = [self::NOTIFICATION_WARNING, $message];
    }

    /**
     * Add an "error" notification
     *
     * @param string $message The message of the notification
     *
     * @throws LogicException If the session isn't running
     */
    public function addErrorNotification(string $message)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        $_SESSION['http.session.notification'][] = [self::NOTIFICATION_ERROR, $message];
    }

    /**
     * Add an "informatique" notification
     *
     * @param string $message The message of the notification
     *
     * @throws LogicException If the session isn't running
     */
    public function addInfoNotification(string $message)
    {
        if (!$this->started) {
            throw new LogicException("Session has to be started");
        }

        $_SESSION['http.session.notification'][] = [self::NOTIFICATION_INFO, $message];
    }
}