text:
package aws_test

import (
	"errors"
	"testing"

	"github.com/Sirupsen/logrus"
	awssdk "github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/ec2"
	"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
	"github.com/aws/aws-sdk-go/service/elb"
	"github.com/aws/aws-sdk-go/service/elb/elbiface"
	"github.com/aws/aws-sdk-go/service/s3"
	"github.com/aws/aws-sdk-go/service/s3/s3iface"
	"github.com/supergiant/supergiant/pkg/core"
	"github.com/supergiant/supergiant/pkg/kubernetes"
	"github.com/supergiant/supergiant/pkg/model"
	"github.com/supergiant/supergiant/pkg/provider/aws"
	"github.com/supergiant/supergiant/test/fake_aws_provider"
	"github.com/supergiant/supergiant/test/fake_core"

	. "github.com/smartystreets/goconvey/convey"
)

//------------------------------------------------------------------------------

func TestAWSProviderDeleteKube(t *testing.T) {
	Convey("AWS Provider DeleteKube works correctly", t, func() {
		table := []struct {
			// Input
			kube *model.Kube
			// Mocks
			mockDeleteKeyPairError          error
			mockDeleteVpcError              error
			mockDeleteInternetGatewayError  error
			mockDeleteSubnetError           error
			mockDeleteRouteTableError       error
			mockDisassociateRouteTableError error
			mockDeleteSecurityGroupError    error
			mockTerminateInstancesError     error
			mockDescribeInstancesError      error
			mockCreateBucketError           error
			mockPutBucketPolicyError        error
			mockListObjectsError            error
			mockDeleteObjectError           error
			mockPutObjectError              error
			mockDeleteBucketError           error
			mockDeleteLoadBalancerError     error
			// Expectations
			err error
		}{
			// A successful example
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
					},
				},
			},

			// A successful example (where there's nothing to delete)
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{},
				},
			},

			// On TerminateInstances error
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
						MasterNodes:                   []string{"MasterNode"},
					},
				},
				mockTerminateInstancesError: errors.New("TerminateInstances ERROR"),
				err: errors.New("TerminateInstances ERROR"),
			},

			// On DescribeInstances error
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
						MasterNodes:                   []string{"MasterNode"},
					},
				},
				mockDescribeInstancesError: errors.New("DescribeInstances ERROR"),
				err: errors.New("DescribeInstances ERROR"),
			},

			// On DisassociateRouteTable error
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
						MasterNodes:                   []string{"MasterNode"},
					},
				},
				mockDisassociateRouteTableError: errors.New("DisassociateRouteTable ERROR"),
				err: errors.New("DisassociateRouteTable ERROR"),
			},

			// On DescribeInstances error
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
						MasterNodes:                   []string{"MasterNode"},
					},
				},
				mockDescribeInstancesError: errors.New("DescribeInstances ERROR"),
				err: errors.New("DescribeInstances ERROR"),
			},

			// On DeleteInternetGateway error
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
						MasterNodes:                   []string{"MasterNode"},
					},
				},
				mockDeleteInternetGatewayError: errors.New("DeleteInternetGateway ERROR"),
				err: errors.New("DeleteInternetGateway ERROR"),
			},

			// On DeleteRouteTable error
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
						MasterNodes:                   []string{"MasterNode"},
					},
				},
				mockDeleteRouteTableError: errors.New("DeleteRouteTable ERROR"),
				err: errors.New("DeleteRouteTable ERROR"),
			},

			// On DeleteSecurityGroup error
			{
				// Input
				kube: &model.Kube{
					NodeSizes: []string{"m4.large"},
					AWSConfig: &model.AWSKubeConfig{
						VPCID:                         "VPCID",
						InternetGatewayID:             "InternetGatewayID",
						PublicSubnetID:                "PublicSubnetID",
						RouteTableID:                  "RouteTableID",
						RouteTableSubnetAssociationID: []string{"RouteTableSubnetAssociationID"},
						ELBSecurityGroupID:            "ELBSecurityGroupID",
						NodeSecurityGroupID:           "NodeSecurityGroupID",
						MasterID:                      "MasterID",
						MasterNodes:                   []string{"MasterNode"},
					},
				},
				mockDeleteSecurityGroupError: errors.New("DeleteSecurityGroup ERROR"),
				err: errors.New("DeleteSecurityGroup ERROR"),
			},
		}

		for _, item := range table {

			c := &core.Core{
				DB:  new(fake_core.DB),
				Log: logrus.New(),

				K8S: func(*model.Kube) kubernetes.ClientInterface {
					return &fake_core.KubernetesClient{
						ListNodesFn: func(query string) ([]*kubernetes.Node, error) {
							return []*kubernetes.Node{
								{
									Metadata: kubernetes.Metadata{
										Name: "created-node",
									},
								},
							}, nil
						},
					}
				},

				Nodes: new(fake_core.Nodes),
			}

			provider := &aws.Provider{
				Core: c,
				EC2: func(kube *model.Kube) ec2iface.EC2API {
					return &fake_aws_provider.EC2{
						DeleteKeyPairFn: func(input *ec2.DeleteKeyPairInput) (*ec2.DeleteKeyPairOutput, error) {
							output := &ec2.DeleteKeyPairOutput{}
							return output, item.mockDeleteKeyPairError
						},
						DeleteVpcFn: func(input *ec2.DeleteVpcInput) (*ec2.DeleteVpcOutput, error) {
							output := &ec2.DeleteVpcOutput{}
							return output, item.mockDeleteVpcError
						},
						DeleteInternetGatewayFn: func(input *ec2.DeleteInternetGatewayInput) (*ec2.DeleteInternetGatewayOutput, error) {
							output := &ec2.DeleteInternetGatewayOutput{}
							return output, item.mockDeleteInternetGatewayError
						},
						DeleteSubnetFn: func(input *ec2.DeleteSubnetInput) (*ec2.DeleteSubnetOutput, error) {
							output := &ec2.DeleteSubnetOutput{}
							return output, item.mockDeleteSubnetError
						},
						DeleteRouteTableFn: func(input *ec2.DeleteRouteTableInput) (*ec2.DeleteRouteTableOutput, error) {
							output := &ec2.DeleteRouteTableOutput{}
							return output, item.mockDeleteRouteTableError
						},
						DisassociateRouteTableFn: func(input *ec2.DisassociateRouteTableInput) (*ec2.DisassociateRouteTableOutput, error) {
							output := &ec2.DisassociateRouteTableOutput{}
							return output, item.mockDisassociateRouteTableError
						},
						DeleteSecurityGroupFn: func(input *ec2.DeleteSecurityGroupInput) (*ec2.DeleteSecurityGroupOutput, error) {
							output := &ec2.DeleteSecurityGroupOutput{}
							return output, item.mockDeleteSecurityGroupError
						},
						TerminateInstancesFn: func(input *ec2.TerminateInstancesInput) (*ec2.TerminateInstancesOutput, error) {
							output := &ec2.TerminateInstancesOutput{}
							return output, item.mockTerminateInstancesError
						},
						DescribeInstancesFn: func(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) {
							output := &ec2.DescribeInstancesOutput{
								Reservations: []*ec2.Reservation{
									{
										Instances: []*ec2.Instance{
											{
												InstanceId: awssdk.String("instance-id"),
												State: &ec2.InstanceState{
													Name: awssdk.String("terminated"),
												},
											},
										},
									},
								},
							}
							return output, item.mockDescribeInstancesError
						},
					}
				},
				S3: func(kube *model.Kube) s3iface.S3API {
					return &fake_aws_provider.S3{
						CreateBucketFn: func(input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error) {
							output := &s3.CreateBucketOutput{
								Location: awssdk.String("test"),
							}
							return output, item.mockCreateBucketError
						},
						PutBucketPolicyFn: func(input *s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error) {
							output := &s3.PutBucketPolicyOutput{}
							return output, item.mockPutBucketPolicyError
						},
						PutObjectFn: func(input *s3.PutObjectInput) (*s3.PutObjectOutput, error) {
							output := &s3.PutObjectOutput{}
							return output, item.mockPutObjectError
						},
						ListObjectsFn: func(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) {
							output := &s3.ListObjectsOutput{}
							return output, item.mockListObjectsError
						},
						DeleteObjectFn: func(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) {
							output := &s3.DeleteObjectOutput{}
							return output, item.mockDeleteObjectError
						},
						DeleteBucketFn: func(input *s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error) {
							output := &s3.DeleteBucketOutput{}
							return output, item.mockDeleteBucketError
						},
					}
				},
				ELB: func(kube *model.Kube) elbiface.ELBAPI {
					return &fake_aws_provider.ELB{
						DeleteLoadBalancerFn: func(input *elb.DeleteLoadBalancerInput) (*elb.DeleteLoadBalancerOutput, error) {
							output := &elb.DeleteLoadBalancerOutput{}
							return output, item.mockDeleteLoadBalancerError
						},
					}
				},
			}

			action := &core.Action{Status: new(model.ActionStatus)}
			err := provider.DeleteKube(item.kube, action)

			So(err, ShouldResemble, item.err)
		}
	})
}


text:
#ifndef PALETTE_HPP
#define PALETTE_HPP

#include <Magick++.h>
#include <map>
#include <set>
#include <vector>

#include "color.hpp"
#include "exportable.hpp"

struct PaletteEntryStats
{
    PaletteEntryStats() : used_count(0), perfect_count(0), error(0) {}
    int used_count;
    int perfect_count;
    unsigned long error;
};

struct ColorEntryStats
{
    ColorEntryStats() : index(0), count(0), error(0) {}
    int index;
    int count;
    unsigned long error;
};

/** Base class for palettes/palette banks.  Represents a set of colors. */
class ColorArray
{
    public:
        ColorArray(const std::vector<Color16>& _colors = std::vector<Color16>());
        /** Clears the color array */
        void Clear();
        /** Sets array to contain colors passed in */
        void Set(const std::vector<Color16>& _colors);
        /** Sets a color in the array */
        bool Set(unsigned int index, const Color16& color);
        /** Gets color at palette index */
        const Color16& At(int index) const {return colors[index];}
        /** Search palette for color passed in returns the closest palette index that matches the color */
        int Search(const Color16& color) const;
        /** Are all colors contained in the palette? */
        bool Contains(const ColorArray& palette) const;
        /** Adds a color to the palette */
        void Add(const Color16& c);
        /** Gets size of this palette */
        unsigned int Size() const {return colors.size();}
        /** Gets colors in palette */
        const std::vector<Color16> GetColors() const {return colors;}
        mutable std::map<int, PaletteEntryStats> paletteEntryStats;
        /** Cache to speed up repeatedly hit colors */
        mutable std::map<Color16, ColorEntryStats> colorEntryStats;
    protected:
        /** Colors contained in palette with set to prevent duplicates */
        std::vector<Color16> colors;
        std::vector<ColorLAB> labColors;
        std::set<Color16> colorSet;
};

/** Palette class, just an exportable color array */
class Palette : public ColorArray, public Exportable
{
    public:
        Palette(const std::string& name = "") : Exportable(name) {} // Used by Tile constructor
        Palette(const std::vector<Color16>& _colors, const std::string& _name);
        void WriteData(std::ostream& file) const;
        void WriteExport(std::ostream& file) const;
        Magick::Image ToMagick() const;
};

/** Represents a palette bank for 4 bpp exports. */
class PaletteBank : public ColorArray
{
    public:
        PaletteBank(int _id = -1) : id(_id) {};
        PaletteBank(const std::vector<Color16>& _colors, int id);
        void CanMerge(const ColorArray& palette, int& colors_left, int& delta) const;
        void Merge(const ColorArray& palette);
        void BestMerge(const ColorArray& palette);
        unsigned long CalculateError(const ColorArray& palette) const;
        unsigned long CalculateError(const Color16& color) const;

        bool Used() const
        {
            // Account for transparent color.
            return colors.size() > 1;
        }
        int id;
};

/** Represents 16 palette banks for 4 bpp exports. */
class PaletteBankManager : public Exportable
{
    public:
        PaletteBankManager(const std::string& _name);
        PaletteBankManager(const std::string& _name, const std::vector<PaletteBank>& paletteBanks);
        void Copy(const Palette& palette);
        PaletteBank& operator[](int i) {return banks[i];}
        const PaletteBank& operator[](int i) const {return banks[i];}
        unsigned int Size() const {return banks.size();}
        unsigned int NumEntries() const;
        int FindBestMatch(const ColorArray& palette) const;
        void WriteData(std::ostream& file) const;
        void WriteExport(std::ostream& file) const;
        std::vector<PaletteBank> banks;
};

#endif

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Cache\Driver;

use Cache\Driver;
use A;
use Exception;
use S;

class Session extends Driver {

  /**
   * Make sure the session is started within the constructor
   */
  public function __construct() {
    s::start();
    if(!isset($_SESSION['_cache'])) {
      $_SESSION['_cache'] = array();
    }
  }

  /**
   * Write an item to the cache for a given number of minutes.
   *
   * <code>
   *    // Put an item in the cache for 15 minutes
   *    Cache::set('value', 'my value', 15);
   * </code>
   *
   * @param  string  $key
   * @param  mixed   $value
   * @param  int     $minutes
   * @return void
   */
  public function set($key, $value, $minutes = null) {
    return $_SESSION['_cache'][$key] = $this->value($value, $minutes);
  }

  /**
   * Retrieve an item from the cache.
   *
   * @param  string  $key
   * @return object CacheValue
   */
  public function retrieve($key) {
    return a::get($_SESSION['_cache'], $key);
  }

  /**
   * Remove an item from the cache
   *
   * @param string $key
   * @return boolean
   */
  public function remove($key) {
    unset($_SESSION['_cache'][$key]);
  }

  /**
   * Flush the entire cache directory
   *
   * @return boolean
   */
  public function flush() {
    $_SESSION['_cache'] = array();
    return true;
  }

}


text:
// +k8s:deepcopy-gen=package
// +groupName=rbac.authorization.k8s.io

package rbac // import "k8s.io/kubernetes/pkg/apis/rbac"


text:
require 'minitest/autorun'

require File.expand_path('../../fixtures/classes', __FILE__)

require 'archive/zip/codec/traditional_encryption'
require 'archive/support/binary_stringio'

describe "Archive::Zip::Codec::TraditionalEncryption::Decrypt.new" do
  it "returns a new instance" do
    d = Archive::Zip::Codec::TraditionalEncryption::Decrypt.new(
      BinaryStringIO.new("\000" * 12),
      TraditionalEncryptionSpecs.password,
      TraditionalEncryptionSpecs.mtime
    )
    d.must_be_instance_of(Archive::Zip::Codec::TraditionalEncryption::Decrypt)
    d.close
  end
end


text:
Installation
============

## Getting Composer package

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist yiisoft/yii2-debug
```

or add

```
"yiisoft/yii2-debug": "~2.0.0"
```

to the require section of your `composer.json` file.

## Configuring application

To enable extension, add these lines to your configuration file to enable the debug module:

```php
'bootstrap' => ['debug'],
'modules' => [
    'debug' => [
        'class' => 'yii\debug\Module',
    ],
]
```

By default, the debug module only works when browsing the website from localhost. If you want to use it on a remote (staging)
server, add the parameter `allowedIPs` to the configuration to whitelist your IP:

```php
'bootstrap' => ['debug'],
'modules' => [
    'debug' => [
        'class' => 'yii\debug\Module',
        'allowedIPs' => ['1.2.3.4', '127.0.0.1', '::1']
    ]
]
```

If you are using `enableStrictParsing` URL manager option, add the following to your `rules`:

```php
'urlManager' => [
    'enableStrictParsing' => true,
    'rules' => [
        // ...
        'debug/<controller>/<action>' => 'debug/<controller>/<action>',
    ],
],
```

> Note: the debugger stores information about each request in the `@runtime/debug` directory. If you have problems using
> the debugger, such as weird error messages when using it, or the toolbar not showing up or not showing any requests, check
> whether the web server has enough permissions to access this directory and the files located inside.

### Extra configuration for logging and profiling

Logging and profiling are simple but powerful tools that may help you to understand the execution flow of both the
framework and the application. These tools are useful for development and production environments alike.

While in a production environment, you should log only significantly important  messages manually, as described in
[logging guide section](https://github.com/yiisoft/yii2/blob/master/docs/guide/runtime-logging.md). It hurts performance too much to continue to log all messages in production.

In a development environment, the more logging the better, and it's especially useful to record the execution trace.

In order to see the trace messages that will help you to understand what happens under the hood of the framework, you
need to set the trace level in the configuration file:

```php
return [
    // ...
    'components' => [
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0, // <-- here
```

By default, the trace level is automatically set to `3` if Yii is running in debug mode, as determined by the presence of
the following line in your `index.php` file:

```php
defined('YII_DEBUG') or define('YII_DEBUG', true);
```

> Note: Make sure to disable debug mode in production environments since it may have a significant and adverse performance
effect. Further, the debug mode may expose sensitive information to end users.

### Configuring Database panel

Database panel default sorting and filtering can be configured like the following:

```php
$config['modules']['debug'] = [
    'class' => 'yii\debug\Module',
    'panels' => [
        'db' => [
            'class' => 'yii\debug\panels\DbPanel',
            'defaultOrder' => [
                'seq' => SORT_ASC
            ],
            'defaultFilter' => [
                'type' => 'SELECT'
            ]
        ],
    ],
];
```

### Extra configuration for opening in IDE's

Wouldn't it be nice to be able to open files directly from the debug trace?

Well, you can!
With a few settings you're ready to go!

#### Windows

##### 1) Create a WScript file open_phpstorm.js:
Create a file `C:\Program Files (x86)\JetBrains\open_phpstorm.js` (example for PhpStorm)
with the following content:

```js

var settings = {
	// Set to 'true' (without quotes) if run on Windows 64bit. Set to 'false' (without quotes) otherwise.
	x64: true,

	// Set to folder name, where PhpStorm was installed to (e.g. 'PhpStorm')
	folder_name: 'PhpStorm 2016.2.1',

	// Set to window title (only text after dash sign), that you see, when switching to running PhpStorm instance
	window_title: 'PhpStorm 2016.2.1',

	// In case your file is mapped via a network share and paths do not match.
	// eg. /var/www will can replaced with Y:/
	projects_basepath: '',
	projects_path_alias: ''
};

// don't change anything below this line, unless you know what you're doing
var	url = WScript.Arguments(0),
	match = /^ide:\/\/(?:.+)file:\/\/(.+)&line=(\d+)$/.exec(url),
	project = '',
	editor = '"C:\\' + (settings.x64 ? 'Program Files' : 'Program Files (x86)') + '\\JetBrains\\' + settings.folder_name + '\\bin\\PhpStorm.exe"';

if (match) {

	var	shell = new ActiveXObject('WScript.Shell'),
		file_system = new ActiveXObject('Scripting.FileSystemObject'),
		file = decodeURIComponent(match[1]).replace(/\+/g, ' '),
		search_path = file.replace(/\//g, '\\');

	if (settings.projects_basepath != '' && settings.projects_path_alias != '') {
		file = file.replace(new RegExp('^' + settings.projects_basepath), settings.projects_path_alias);
	}

	while (search_path.lastIndexOf('\\') != -1) {
		search_path = search_path.substring(0, search_path.lastIndexOf('\\'));

		if(file_system.FileExists(search_path+'\\.idea\\.name')) {
			project = search_path;
			break;
		}
	}

	if (project != '') {
		editor += ' "%project%"';
	}

	editor += ' --line %line% "%file%"';

	var command = editor.replace(/%line%/g, match[2])
						.replace(/%file%/g, file)
						.replace(/%project%/g, project)
						.replace(/\//g, '\\');

	shell.Exec(command);
	shell.AppActivate(settings.window_title);
}
```

##### 2) Create a registry file and execute this file

Create a registry file `C:\Program Files (x86)\JetBrains\open_phpstorm.reg` (example for PhpStorm)
with the following content and make sure the paths are correct:

```windows.reg
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ide]
@="\"URL:ide Protocol\""
"URL Protocol"=""

[HKEY_CLASSES_ROOT\ide\shell\open\command]
@="wscript \"C:\\Program Files (x86)\\JetBrains\\open_phpstorm.js\" %1"
```

Now you are able to use the ide:// protocol in your browser.

When you click such a link, the IDE will automatically open the file and move the cursor to the corresponding line.

##### Disable links
IDE links for traces are created by default. You have to set the property `yii\debug\Module::traceLink` to
 false to render a textual line only.

```php
<?php

...
'modules' => [
    'debug' => [
        'class' => 'yii\debug\Module',
        'traceLink' => false
    ]
]

...
```


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OptimalPayments.Common;

namespace OptimalPayments.ThreeDSecure
{
    //Created by Tushar.Sukhiya on 03.05.2016. This is Error Class.
    public class Error : JSONObject
    {
        /// <summary>
        /// Initialize the Error object with some set of properties
        /// </summary>
        /// <param name="properties">Dictionary<string, object></param>
        public Error(Dictionary<string, object> properties = null)
            : base(fieldTypes, properties)
        {
        }

        private static new Dictionary<string, object> fieldTypes = new Dictionary<string, object>
        {
            {ThreeDSecureConstants.code, STRING_TYPE},
            {ThreeDSecureConstants.message, STRING_TYPE}
        };

        /// <summary>
        /// Get the code
        /// </summary>
        /// <returns>String</returns>
        public string code()
        {
            return this.getProperty(ThreeDSecureConstants.code);
        }

        /// <summary>
        /// Set the code
        /// </summary>
        /// <returns>void</returns>
        public void code(String data)
        {
            this.setProperty(ThreeDSecureConstants.code, data);
        }

        /// <summary>
        /// Get the message
        /// </summary>
        /// <returns>String</returns>
        public string message()
        {
            return this.getProperty(ThreeDSecureConstants.message);
        }

        /// <summary>
        /// Set the message
        /// </summary>
        /// <returns>void</returns>
        public void message(String data)
        {
            this.setProperty(ThreeDSecureConstants.message, data);
        }

        /// <summary>
        /// ErrorBuilder<typeparam name="TBLDR"></typeparam> will allow an Error to be initialized
        /// within another builder. Set properties and subpropeties, then trigger .Done() to
        /// get back tot he parent builder
        /// </summary>
        public class ErrorBuilder<TBLDR> : NestedJSONBuilder<Error, TBLDR>
            where TBLDR : GenericJSONBuilder
        {
            /// <summary>
            /// Initialize the Error builder within the context of a parent builder
            /// </summary>
            /// <param name="parent">TBLDR</param>
            public ErrorBuilder(TBLDR parent)
                : base(parent)
            {
                this.parent = parent;
            }

            /// <summary>
            /// Set the code
            /// </summary>
            /// <param name=data>string</param>
            /// <returns>ErrorBuilder<TBLDR></returns>
            public ErrorBuilder<TBLDR> code(string data)
            {
                this.properties[ThreeDSecureConstants.code] = data;
                return this;
            }

            /// <summary>
            /// Set the message
            /// </summary>
            /// <param name=data>string</param>
            /// <returns>ErrorBuilder<TBLDR></returns>
            public ErrorBuilder<TBLDR> message(string data)
            {
                this.properties[ThreeDSecureConstants.message] = data;
                return this;
            }
        }
    }
}


text:
#ifndef CGFUNCTION_H_
#define CGFUNCTION_H_

/* A CGFunction is a general floating-point function evaluator which uses a
   user-specified callback to map an arbitrary number of inputs to an
   arbitrary number of outputs. */

typedef struct CGFunction *CGFunctionRef;

#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFBase.h>

CF_IMPLICIT_BRIDGING_ENABLED

/* This callback evaluates a function, using `in' as inputs, and places the
   result in `out'. `info' is the info parameter passed to the CGFunction
   creation functions. */

typedef void (*CGFunctionEvaluateCallback)(void *info, const CGFloat *in,
  CGFloat *out);

/* When a function is deallocated, this callback releases `info', the info
   parameter passed to the CGFunction creation functions. */

typedef void (*CGFunctionReleaseInfoCallback)(void *info);

/* Callbacks for a CGFunction.
     `version' is the version number of this structure. This structure is
       version 0.
     `evaluate' is the callback used to evaluate the function.
     `releaseInfo', if non-NULL, is the callback used to release the info
       parameter passed to the CGFunction creation functions when the
       function is deallocated. */

struct CGFunctionCallbacks {
  unsigned int version;
  CGFunctionEvaluateCallback evaluate;
  CGFunctionReleaseInfoCallback releaseInfo;
};
typedef struct CGFunctionCallbacks CGFunctionCallbacks;

/* Return the CFTypeID for CGFunctionRefs. */

CG_EXTERN CFTypeID CGFunctionGetTypeID(void)
  CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);

/* Create a CGFunction using `callbacks' to evaluate the function. `info' is
   passed to each of the callback functions. `domainDimension' is the number
   of input values to the function; `rangeDimension' is the number of output
   values from the function.

   `domain' is an array of 2M values, where M is the number of input values.
   For each k from 0 to M-1, domain[2*k] must be less than or equal to
   domain[2*k+1]. The k'th input value (in[k]) will be clipped to lie in
   this interval, so that domain[2*k] <= in[k] <= domain[2*k+1]. If `domain'
   is NULL, then the input values will not be clipped. However, it's
   strongly recommended that `domain' be specified; each domain interval
   should specify reasonable values for the minimum and maximum in that
   dimension.

   `range' is an array of 2N values, where N is the number of output values.
   For each k from 0 to N-1, range[2*k] must be less than or equal to
   range[2*k+1]. The k'th output value (out[k]) will be clipped to lie in
   this interval, so that range[2*k] <= out[k] <= range[2*k+1]. If `range'
   is NULL, then the output values will not be clipped. However, it's
   strongly recommended that `range' be specified; each range interval
   should specify reasonable values for the minimum and maximum in that
   dimension.

   The contents of the callbacks structure is copied, so, for example, a
   pointer to a structure on the stack can be passed to this function. */

CG_EXTERN CGFunctionRef CGFunctionCreate(void *info, size_t domainDimension,
  const CGFloat *domain, size_t rangeDimension, const CGFloat *range,
  const CGFunctionCallbacks *callbacks)
  CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);

/* Equivalent to `CFRetain(function)', except it doesn't crash (as CFRetain
   does) if `function' is NULL. */

CG_EXTERN CGFunctionRef CGFunctionRetain(CGFunctionRef function)
  CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);

/* Equivalent to `CFRelease(function)', except it doesn't crash (as
   CFRelease does) if `function' is NULL. */

CG_EXTERN void CGFunctionRelease(CGFunctionRef function)
  CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);

CF_IMPLICIT_BRIDGING_DISABLED

#endif /* CGFUNCTION_H_ */


text:
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using Microsoft.Azure.Storage.Blob;

namespace FakeStorage
{
    internal class FakeStorageBlobProperties
    {
        public string ETag { get; set; }

        public DateTimeOffset? LastModified { get; set; }

        public LeaseState LeaseState { get; set; }

        public LeaseStatus LeaseStatus { get; set; }

        public BlobProperties SdkObject { get; set; }

        public BlobProperties GetRealProperties()
        {
            var props = new BlobProperties();
            props.SetInternalProperty(nameof(BlobProperties.LastModified), this.LastModified);
            props.SetEtag(this.ETag);
            return props;
        }
    }
}


text:
struct MSA_HEADER
{
    uint8_t abSig[2];           // should be 0x0e,0x0f
    uint8_t abSectors[2];       // MSB/LSB of sectors/track
    uint8_t abSides[2];         // MSB/LSB of sides-1
    uint8_t abStartTrack[2];    // MSB/LSB of start track (0-based)
    uint8_t abEndTrack[2];      // MSB/LSB of start track (0-based)
};

struct MSA_TRACK
{
    uint8_t abLength[2];        // LSB/MSB track length
};

struct MSA_RLE
{
    uint8_t bMarker;            // RLE start marker (0xE5)
    uint8_t bFill;              // Repeated byte
    uint8_t abLength[2];        // Length of repeated block
};

bool ReadMSA(MemFile& file, std::shared_ptr<Disk>& disk)
{
    MSA_HEADER dh;
    if (!file.rewind() || !file.read(&dh, sizeof(dh)))
        return false;
    else if (memcmp(dh.abSig, MSA_SIGNATURE, sizeof(dh.abSig)))
        return false;
    else if (dh.abSectors[0] || dh.abSides[0] || dh.abStartTrack[0] || dh.abEndTrack[0])
        return false;
    else if (dh.abStartTrack[1] > dh.abEndTrack[1] || dh.abSides[1] >= MAX_SIDES || dh.abSectors[1] > MAX_SECTORS)
        return false;

    auto bSectors = dh.abSectors[1];
    auto bSides = dh.abSides[1] + 1;
    auto bStartTrack = dh.abStartTrack[1];
    auto bEndTrack = dh.abEndTrack[1];

    Format fmt{ RegularFormat::AtariST };
    fmt.cyls = bEndTrack + 1;
    fmt.heads = bSides;
    fmt.sectors = bSectors;
    fmt.gap3 = 0;   // auto, based on sector count
    fmt.datarate = (fmt.track_size() < 6000) ? DataRate::_250K : DataRate::_500K;
    fmt.Override();

    auto track_size = fmt.track_size();
    Data mem(track_size);
    Data mem2(track_size);

    for (uint8_t cyl = bStartTrack; cyl <= bEndTrack; ++cyl)
    {
        for (uint8_t head = 0; head < bSides; ++head)
        {
            CylHead cylhead(cyl, head);

            MSA_TRACK dt;
            if (!file.read(&dt, sizeof(dt)))
                throw util::exception("short file reading ", cylhead, " header");

            uint16_t wLength = (dt.abLength[0] << 8) | dt.abLength[1];
            if (!wLength || wLength > track_size)
                throw util::exception("invalid track length (", wLength, ") on ", cylhead);
            else if (wLength == track_size)
            {
                // Read uncompressed track data
                if (!file.read(mem))
                    throw util::exception("short file reading raw data for ", cylhead);
            }
            else // Compressed track
            {
                mem.clear();

                if (!file.read(mem2.data(), wLength))
                    throw util::exception("short file reading compressed data for ", cylhead);

                uint8_t* pb = mem2.data();

                while (wLength)
                {
                    // Not run-byte?
                    if (*pb != MSA_RLESTART)
                    {
                        mem.push_back(*pb++);
                        wLength--;
                    }
                    else if (wLength < 4)
                        throw util::exception("invalid RLE block on ", cylhead);
                    else
                    {
                        // RLE block to expand
                        auto prle = reinterpret_cast<MSA_RLE*>(pb);
                        uint8_t fill = prle->bFill;
                        auto wLen = (prle->abLength[0] << 8) | prle->abLength[1];

                        // Ensure the length is non-zero and fits
                        if (!wLen || mem.size() + wLen > track_size)
                            throw util::exception("invalid RLE data on ", cylhead);

                        // Write the uncompressed block
                        while (wLen--)
                            mem.push_back(fill);

                        pb += sizeof(MSA_RLE);
                        wLength -= sizeof(MSA_RLE);
                    }
                }

                // Ensure we've expanded the exact track size
                if (mem.size() != track_size)
                    throw util::exception("expanded data doesn't match track size on ", cylhead);
            }

            Track track;
            track.format(cylhead, fmt);
            track.populate(mem.begin(), mem.end());
            disk->write(cylhead, std::move(track));
        }
    }

    disk->fmt = fmt;
    disk->strType = "MSA";

    return true;
}


text:
package org.apache.airavata.sharing.registry.db.entities;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class SharingPK implements Serializable {
    private final static Logger logger = LoggerFactory.getLogger(SharingPK.class);
    private String permissionTypeId;
    private String entityId;
    private String groupId;
    private String inheritedParentId;
    private String domainId;

    @Column(name = "PERMISSION_TYPE_ID")
    @Id
    public String getPermissionTypeId() {
        return permissionTypeId;
    }

    public void setPermissionTypeId(String permissionTypeId) {
        this.permissionTypeId = permissionTypeId;
    }

    @Column(name = "ENTITY_ID")
    @Id
    public String getEntityId() {
        return entityId;
    }

    public void setEntityId(String entityId) {
        this.entityId = entityId;
    }

    @Column(name = "GROUP_ID")
    @Id
    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    @Column(name = "INHERITED_PARENT_ID")
    @Id
    public String getInheritedParentId() {
        return inheritedParentId;
    }

    public void setInheritedParentId(String inheritedParentId) {
        this.inheritedParentId = inheritedParentId;
    }

    @Column(name = "DOMAIN_ID")
    @Id
    public String getDomainId() {
        return domainId;
    }

    public void setDomainId(String domainId) {
        this.domainId = domainId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SharingPK that = (SharingPK) o;

        if (getPermissionTypeId() != null ? !getPermissionTypeId().equals(that.getPermissionTypeId()) : that.getPermissionTypeId() != null)
            return false;
        if (getEntityId() != null ? !getEntityId().equals(that.getEntityId()) : that.getEntityId() != null)
            return false;
        if (getGroupId() != null ? !getGroupId().equals(that.getGroupId()) : that.getGroupId() != null) return false;
        if (getInheritedParentId() != null ? !getInheritedParentId().equals(that.getInheritedParentId()) : that.getInheritedParentId() != null)
            return false;
        if (getDomainId() != null ? !getDomainId().equals(that.getDomainId()) : that.getDomainId() != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = getPermissionTypeId() != null ? getPermissionTypeId().hashCode() : 0;
        result = 31 * result + (getEntityId() != null ? getEntityId().hashCode() : 0);
        result = 31 * result + (getGroupId() != null ? getGroupId().hashCode() : 0);
        result = 31 * result + (getInheritedParentId() != null ? getInheritedParentId().hashCode() : 0);
        result = 31 * result + (getDomainId() != null ? getDomainId().hashCode() : 0);
        return result;
    }
}


text:
layout: post
title: GF Can Ride
titleinfo: pornvd
desc: Watch GF Can Ride. Pornhub is the ultimate xxx porn and sex site.
---

GF Can Ride

Watch GF Can Ride. Pornhub is the ultimate xxx porn and sex site.


text:
/**
 * Keypress Agent Module
 * DOCS @ https://avivcarmis.github.io/reaction-agent/getting-started/keypress-agent
 */
;(function($) {

        /**
         * @class KeypressAgent
         */

        /**
         * Constructs a new KeypressAgent object
         * @returns {KeypressAgent}
         */
        function KeypressAgent() {
                this.stack = [];
                this.pressedKeys = {};
                this.initialized = false;
        }

        /**
         * Binds the document keydown listener to handle the module functionality
         * @returns {undefined}
         */
        KeypressAgent.prototype.init = function() {
                if (this.initialized) return;
                this.initialized = true;
                var thisPtr = this;
                document.addEventListener('keydown', function(event) {
                        var layer = thisPtr.getActiveLayer();
                        if (layer === null) return;
                        var handlerCalled = layer.callHandlerByKeyCode(event);
                        if (handlerCalled) {
                                event.preventDefault();
                        }
                }, true);
        };

        /**
         * Creates a fresh KeypressLayer object to be the currently active layer, and returns it's usage key
         * @returns {KeypressLayer}
         */
        KeypressAgent.prototype.createLayer = function() {
                this.init();
                var layer = new KeypressLayer();
                this.stack.push(layer);
                return layer;
        };

        /**
         * Receive a KeypressLayer usage key and removed the matching layer. returns true upon success or false if layer was not found.
         * @param {Number} key
         * @returns {Boolean}
         */
        KeypressAgent.prototype.removeLayer = function(key) {
                var layerIndex = this.getLayerIndex(key);
                if (layerIndex == -1) return false;
                this.stack.splice(layerIndex, 1);
                return true;
        };

        /**
         * Returns the currently active KeypressLayer object or null if agent is empty
         * @returns {KeypressLayer}
         */
        KeypressAgent.prototype.getActiveLayer = function() {
                return this.stack.length == 0 ? null : this.stack[this.stack.length - 1];
        };

        /**
         * Receive a KeypressLayer usage key and returns the KeypressLayer object or null if not found
         * @param {Number} key
         * @returns {KeypressLayer}
         */
        KeypressAgent.prototype.getLayer = function(key) {
                var layerIndex = this.getLayerIndex(key);
                return layerIndex == -1 ? null : this.stack[layerIndex];
        };

        /**
         * Receive a KeypressLayer usage key and returns the KeypressLayer index in the agent stack, or -1 if not found
         * @param {Number} key
         * @returns {Number}
         */
        KeypressAgent.prototype.getLayerIndex = function(key) {
                for (var i = 0; i < this.stack.length; i++) {
                        var layer = this.stack[i];
                        if (layer.getKey() == key) return i;
                }
                return -1;
        };

        /**
         * If called, prints keyCode value to console on every keypress event
         */
        KeypressAgent.prototype.mapToConsole = function() {
                document.addEventListener('keydown', function(event) {
                        console.log(event.which || event.keyCode);
                });
        };

        /**
         * End of class KeypressAgent
         */

        /**
         * @class KeypressLayer
         */

        /**
         * Constructs a new Keypress Layer object
         * @returns {KeypressLayer}
         */
        function KeypressLayer() {
                this.key = KeypressLayer.freeKey++;
                this.data = {};
        }

        /**
         * @static
         * Holds the next free layer key
         */
        KeypressLayer.freeKey = 0;

        /**
         * @static
         * Default combination key settings
         */
        KeypressLayer.defaultCombination = {
                ctrl: false,
                alt: false,
                shift: false
        };

        /**
         * @static
         * Receive a key value either as a key code value, or as a char, returns its key code value
         * @param {Mixed} value
         * @returns {Number}
         */
        KeypressLayer.normalizeKeyValue = function(value) {
                if (value === 'ctrl') return 17;
                if (value === 'alt') return 18;
                if (value === 'shift') return 16;
                return value.charCodeAt(0);
        };

        /**
         * Returns the layer key
         * @returns {Number}
         */
        KeypressLayer.prototype.getKey = function() {
                return this.key;
        };

        /**
         * Receive keyCode as a char or a keyCode value, a handler function and a combination object and add them to the layer
         * Returns the keypress layer object to enable method chaining
         * @param {Mixed} key
         * @param {Function} handler
         * @param {Object} combinations
         * @returns {KeypressLayer}
         */
        KeypressLayer.prototype.add = function(key, handler, combinations) {
                if (typeof key === "string") {
                        var upperCaseKeyCode = KeypressLayer.normalizeKeyValue(key.toUpperCase());
                        var lowerCaseKeyCode = KeypressLayer.normalizeKeyValue(key.toLowerCase());
                        this.add(upperCaseKeyCode, handler, combinations);
                        if (lowerCaseKeyCode != upperCaseKeyCode) this.add(lowerCaseKeyCode, handler, combinations);
                        return;
                }
                var combination = $.extend({}, KeypressLayer.defaultCombination, combinations);
                if (typeof handler !== "function") throw "Keypress Layer handler must be a function. Received value was " + typeof handler;
                if (!this.data[key]) this.data[key] = [];
                this.data[key].push({combination: combination, handler: handler});
                return this;
        };

        /**
         * Receive a keypress event object and call the handler with the given keyCode and combination. Returns true if a matching handler was found, false otherwise.
         * @param {Object} jqEventObject
         * @returns {Boolean}
         */
        KeypressLayer.prototype.callHandlerByKeyCode = function(eventObject) {
                var keyCode = eventObject.which || eventObject.keyCode;
                var handlerList = this.data[keyCode];
                if (notDefined(handlerList)) return false;
                for (var i = 0; i < handlerList.length; i++) {
                        var combination = handlerList[i].combination;
                        if (combination.ctrl != eventObject.ctrlKey) continue;
                        if (combination.alt != eventObject.altKey) continue;
                        if (combination.shift != eventObject.shiftKey) continue;
                        handlerList[i].handler(keyCode);
                        return true;
                }
                return false;
        };

        /**
         * Removes the layer from the KeypressAgent
         * @returns {undefined}
         */
        KeypressLayer.prototype.destroy = function() {
                window.KeypressAgent.removeLayer(this.key);
        };

        /**
         * End of class KeypressLayer
         */

        // export KeypressAgent instance
        window.KeypressAgent = new KeypressAgent();

})(jQuery);

/**
 * CSS Agent Module
 */
(function($) {

        /**
         * @class CSSAgent
         */

        /**
         * Constructs a new CSSAgent object
         * @returns {CSSAgent}
         */
        function CSSAgent() {}

        /**
         * @static
         * An array of default reflectors for the CSS Agent.
         * Matching the bootstrap default breakpoints according to version 3.3.2
         */
        CSSAgent.defaultReflectors = [
                {name: 'xs',            min: null,      max: 768},
                {name: 'sm',            min: 768,       max: 992},
                {name: 'below-sm',      min: null,      max: 992},
                {name: 'above-sm',      min: 768,       max: null},
                {name: 'md',            min: 992,       max: 1200},
                {name: 'below-md',      min: null,      max: 1200},
                {name: 'above-md',      min: 992,       max: null},
                {name: 'lg',            min: 1200,      max: null}
        ];

        /**
         * @static
         * An array of supported css pseudo selectors for the module
         */
        CSSAgent.pseudoSelectors = [
                'hover',
                'active'
        ];

        /**
         * @static
         * Statically holds the next free ID to uniquely identify an element in the DOM
         */
        CSSAgent.uniqueElementID = 0;

        /**
         * @static
         * Returns a control style element in the head section, create it if needed
         * @returns {jQuery}
         */
        CSSAgent.getStyleElement = function() {
                var element = $("style#css-agent-rules");
                if (element.length == 0) element = $('


text:
import React from 'react';
import {DatePicker, Button, MonthPicker, Input, IconInput} from '../../../src';
import DemoWithSnippet from '../../layout/DemoWithSnippet';

export default class DatePickerDemo extends React.Component {
    constructor(props) {
        super(props);

        this.state = {
            controlledValue: '01.01.2015',
            hi: '22.03.2015'
        };
    }

    render() {
        return (

                <DemoWithSnippet>

                         The selected date is:
                        <DatePicker className="btn--inline"/>

                </DemoWithSnippet>

Date picker can be controlled

                <Input type="text" value={this.state.controlledValue}
                       onChange={(value) => this.setState({controlledValue: value})}/>

                <DemoWithSnippet>
                    <DatePicker value={this.state.controlledValue}
                                format="DD.MM.YYYY"
                                onChange={(value) => this.setState({controlledValue: value})}/>
                </DemoWithSnippet>

Date Picker with Input

                <DatePicker
                    value={this.state.hi}
                    targetType={DatePicker.Types.INPUT}
                    format="DD.MM.YYYY"
                    onChange={(value) => this.setState({
                        hi: value
                    })}
                />

Dates can be limited

                <DemoWithSnippet>
                    <DatePicker format="DD.MM.YYYY"
                                minDate="01.10.2015"
                                maxDate="31.03.2017"/>
                </DemoWithSnippet>

Month picker:

                <MonthPicker>
                    <Button className="btn-link"/>
                </MonthPicker>

                <MonthPicker>
                    <IconInput iconClassName="im icon-calendar-from"
                               position="right"
                               readOnly/>
                </MonthPicker>

        );
    }
}


text:
import abc
from .device_info import DeviceInfo

class AbstractDevice(metaclass=abc.ABCMeta):

    @abc.abstractmethod
    def __init__(self, info):

        if not isinstance(info, DeviceInfo):
            raise TypeError('Must initialize with a {} object'.format(DeviceInfo.__name__))

        self._info = info

    @property
    def info(self):
        return self._info


text:
package azkaban.execapp;

import java.util.ArrayList;
import java.util.Collections;
import org.junit.Assert;
import org.junit.Test;

public class ProjectVersionsTest {

  @Test
  public void testVersionOrdering() {
    final ArrayList<ProjectVersion> pversion = new ArrayList<>();
    pversion.add(new ProjectVersion(1, 2));
    pversion.add(new ProjectVersion(1, 3));
    pversion.add(new ProjectVersion(1, 1));

    Collections.sort(pversion);

    int i = 0;
    for (final ProjectVersion version : pversion) {
      Assert.assertTrue(i < version.getVersion());
      i = version.getVersion();
    }
  }
}


text:
require 'spec_helper'

describe Chewy::Search::Parameters::SearchAfter do
  subject { described_class.new([:foo, 42]) }

  describe '#initialize' do
    specify { expect(described_class.new.value).to be_nil }
    specify { expect(described_class.new(:foo).value).to eq([:foo]) }
    specify { expect(described_class.new(nil).value).to be_nil }
  end

  describe '#replace!' do
    specify { expect { subject.replace!(:baz) }.to change { subject.value }.from([:foo, 42]).to([:baz]) }
    specify { expect { subject.replace!(nil) }.to change { subject.value }.from([:foo, 42]).to(nil) }
  end

  describe '#update!' do
    specify { expect { subject.update!(:baz) }.to change { subject.value }.from([:foo, 42]).to([:baz]) }
    specify { expect { subject.update!(nil) }.not_to change { subject.value }.from([:foo, 42]) }
  end

  describe '#merge!' do
    specify do
      expect { subject.merge!(described_class.new(:baz)) }
        .to change { subject.value }.from([:foo, 42]).to([:baz])
    end
    specify { expect { subject.merge!(described_class.new) }.not_to change { subject.value }.from([:foo, 42]) }
  end

  describe '#render' do
    specify { expect(described_class.new.render).to be_nil }
    specify { expect(described_class.new(:baz).render).to eq(search_after: [:baz]) }
    specify { expect(subject.render).to eq(search_after: [:foo, 42]) }
  end
end


text:
class EmailTemplate < ActiveRecord::Base

  belongs_to :farm
  ### Validation
  validates_presence_of :subject, :from, :body, :name, :identifier

  # http://code.dunae.ca/validates_email_format_of.html
  # validates_email_format_of :from, :allow_nil => true, :allow_blank => true
  validates_email_format_of :cc, :allow_nil => true, :allow_blank => true
  validates_email_format_of :bcc, :allow_nil => true, :allow_blank => true

  validate :body_must_be_valid_liquid_format, :subject_must_be_valid_liquid_format

  liquid_methods :name, :body, :subject

  #
  # Puts the parse error from Liquid on the error list if parsing failed
  #
  def body_must_be_valid_liquid_format
    errors.add :body, @syntax_error unless @syntax_error.nil?
  end

  def subject_must_be_valid_liquid_format
    errors.add :subject, @subject_syntax_error unless @subject_syntax_error.nil?
  end

  ### Attributes
  attr_protected :template

  #
  # body contains the raw template. When updating this attribute, the
  # email_template parses the template and stores the serialized object
  # for quicker rendering.
  #
  def body=(text)
    self[:body] = text

    begin
      @template = Liquid::Template.parse(text)
    rescue Liquid::SyntaxError => error
      @syntax_error = error.message
    end
  end

  def subject=(text)
    self[:subject] = text

    begin
      @subject_template = Liquid::Template.parse(text)
    rescue Liquid::SyntaxError => error
      @subject_syntax_error = error.message
    end
  end

  ### Methods

  #
  # Delivers the email
  #
  def deliver_to(address, options = {})
    options[:cc] ||= cc unless cc.blank?
    options[:bcc] ||= bcc unless bcc.blank?

    # Liquid doesn't like symbols as keys
    options.stringify_keys!
    ApplicationMailer.deliver_email_template(address, self, options)
  end

  #
  # Renders body as Liquid Markup template
  #
  def render_body(options = {})
    template.render options
  end

  def render_subject(options = {})
    subject_template.render options
  end

  #
  # Usable string representation
  #
  def to_s
    "[EmailTemplate] From: #{from}, '#{subject}': #{body}"
  end

 private
  #
  # Returns a usable Liquid:Template instance
  #
  def template
    return @template unless @template.nil?

    @template = Liquid::Template.parse body
    @template
  end

  def subject_template
    return @subject_template unless @subject_template.nil?

    @subject_template = Liquid::Template.parse subject
    @subject_template
  end

end


text:
package org.jacp.test.components;

/**
 * Created by Andy Moncsek on 06.01.14.
 */
public class ComponentIds {

    public static final String TestOneView                                      ="id002";
    public static final String TestTwoView                                      ="id003";
    public static final String ComponentMissingViewAnnotation                   ="id004";
    public static final String ComponentMissingDeclarativeViewAnnotation        ="id005";
    public static final String ComponentMissingInitialTargetId                  ="id006";
    public static final String ComponentMessagingTest1Component1                ="id007";
    public static final String ComponentMessagingTest1Component2                ="id008";
    public static final String CallbackComponentMessagingTest1Component1        ="id009";
    public static final String CallbackComponentMessagingTest1Component2        ="id010";
    public static final String AsyncCallbackComponentMessagingTest1Component1   ="id011";
    public static final String AsyncCallbackComponentMessagingTest1Component2   ="id012";
    public static final String ComponentToCallbackMessagingTest1Component1      ="id013";
    public static final String ComponentToCallbackMessagingTest1Component2      ="id014";

    public static final String PredestroyTestComponentOne                       ="id016";
    public static final String PredestroyTestComponentTwo                       ="id017";
    public static final String PredestroyTestComponentThree                     ="id018";
    public static final String PredestroyTestComponentFour                      ="id019";
    public static final String ComponentShutdownAndRestartComponentsTests1      ="id020";
    public static final String ComponentShutdownAndRestartComponentsTests2      ="id021";
    public static final String ComponentShutdownAndRestartComponentsTests3      ="id022";
    public static final String ComponentMoveComponentsBetweenPerspectives1      ="id023";
    public static final String ComponentMoveComponentsBetweenPerspectives2      ="id024";
    public static final String ComponentHandleToolBarBetweenPerspectives1       ="id025";
    public static final String ComponentHandleToolBarBetweenPerspectives2       ="id026";
    public static final String ComponentDialogInPerspective                     ="id033";
    public static final String ComponentMessagingTests1                     ="id034";
    public static final String ComponentMessagingTests2                     ="id035";
    public static final String ComponentMessagingTests3                     ="id036";
    public static final String CallbackComponentMessagingTest1       ="id037";
    public static final String CallbackComponentMessagingTest1_1       ="id038";
    public static final String CallbackComponentMessagingTest2       ="id039";
    public static final String ComponentManagedFragmentMessage       ="id040";
    public static final String CallbackComponentManagedFragmentMessage       ="id041";
    public static final String ComponentOneVersion3                     ="id042";
    public static final String ComponentTwoVersion3                     ="id043";
}


text:
<?php

/* @FOSUser/Resetting/request_content.html.twig */
class __TwigTemplate_bdc283f57506db4a78e145775ef4cf261cf6e8093c13ac13235a325a67aef8bc extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $__internal_708c80815ed92b8e35f14279c5d5e0e359c2c4cd9ee2550fa5a7f7085f3ff99d = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_708c80815ed92b8e35f14279c5d5e0e359c2c4cd9ee2550fa5a7f7085f3ff99d->enter($__internal_708c80815ed92b8e35f14279c5d5e0e359c2c4cd9ee2550fa5a7f7085f3ff99d_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@FOSUser/Resetting/request_content.html.twig"));

        // line 2
        echo "

Mot de passe perdu

Vous avez perdu votre mot de passe ?

                        Compléter le formulaire, un email vous seras envoyé.

                        Il contiendra la procèdure à suivre pour récupérer votre mot de passe.

                    <form action=\"";
        // line 17
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath("fos_user_resetting_send_email");
        echo "\" method=\"POST\" class=\"fos_user_resetting_request\">
                        ";
        // line 18
        echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("resetting.request.username", array(), "FOSUserBundle"), "html", null, true);
        echo "
                        <input type=\"text\" id=\"username\" name=\"username\" required=\"required\" />

                        <input class=\"btn btn-primary\" type=\"submit\" value=\"";
        // line 21
        echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("resetting.request.submit", array(), "FOSUserBundle"), "html", null, true);
        echo "\" />
                    </form>

";

        $__internal_708c80815ed92b8e35f14279c5d5e0e359c2c4cd9ee2550fa5a7f7085f3ff99d->leave($__internal_708c80815ed92b8e35f14279c5d5e0e359c2c4cd9ee2550fa5a7f7085f3ff99d_prof);

    }

    public function getTemplateName()
    {
        return "@FOSUser/Resetting/request_content.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  49 => 21,  43 => 18,  39 => 17,  22 => 2,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("{% trans_default_domain 'FOSUserBundle' %}

Mot de passe perdu

Vous avez perdu votre mot de passe ?

                        Compléter le formulaire, un email vous seras envoyé.

                        Il contiendra la procèdure à suivre pour récupérer votre mot de passe.

                    <form action=\"{{ path('fos_user_resetting_send_email') }}\" method=\"POST\" class=\"fos_user_resetting_request\">
                        {{ 'resetting.request.username'|trans }}
                        <input type=\"text\" id=\"username\" name=\"username\" required=\"required\" />

                        <input class=\"btn btn-primary\" type=\"submit\" value=\"{{ 'resetting.request.submit'|trans }}\" />
                    </form>

", "@FOSUser/Resetting/request_content.html.twig", "C:\\wamp\\www\\ecommerce\\app\\Resources\\FOSUserBundle\\views\\Resetting\\request_content.html.twig");
    }
}


text:
package websocket;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.springframework.web.socket.WebSocketSession;

public class WebSocketContextImpl implements WebSocketContext {

    protected final Map<String, WebSocketSession> sessions = new LinkedHashMap<>();
    protected final Map<String, List<WebSocketSession>> groups = new LinkedHashMap<>();

    @Override
    public boolean addSession(final WebSocketSession session) {
        return sessions.put(session.getId(), session) == null;
    }

    @Override
    public boolean addSessionToGroup(final String group, final WebSocketSession session) {
        if (!groups.containsKey(group))
            groups.put(group, new ArrayList<>());
        return groups.get(group).add(session);
    }

    @Override
    public WebSocketSession getSession(final String id) {
        return sessions.get(id);
    }

    @Override
    public List<WebSocketSession> getSessionsFromGroup(final String group) {
        return groups.getOrDefault(group, new ArrayList<>());
    }

    @Override
    public List<WebSocketSession> getSessions() {
        return new ArrayList<>(sessions.values());
    }

    @Override
    public boolean removeSession(final WebSocketSession session) {
        groups.values().forEach(g -> g.remove(session));
        return sessions.remove(session.getId()) != null;
    }

}