text:
// <copyright file="TeamExplorerBaseSection.cs" company="Microsoft Corporation">Copyright Microsoft Corporation. All Rights Reserved. This code released under the terms of the Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.) This is sample code only, do not use in production environments.</copyright>
namespace JosePedroSilva.TFSScrumExtensions.Base
{
    using Microsoft.TeamFoundation.Controls;
    using System;

    /// <summary>
    /// Team Explorer base section class.
    /// </summary>
    public class TeamExplorerBaseSection : TeamExplorerBase, ITeamExplorerSection
    {
        private string title;
        private bool isExpanded = true;
        private bool isVisible = true;
        private bool isBusy;
        private object sectionContent;

        public string Title
        {
            get
            {
                return this.title;
            }

            set
            {
                this.title = value;
                this.RaisePropertyChanged("Title");
            }
        }

        public object SectionContent
        {
            get
            {
                return this.sectionContent;
            }

            set
            {
                this.sectionContent = value;
                this.RaisePropertyChanged("SectionContent");
            }
        }

        public bool IsVisible
        {
            get
            {
                return this.isVisible;
            }

            set
            {
                this.isVisible = value;
                this.RaisePropertyChanged("IsVisible");
            }
        }

        public bool IsExpanded
        {
            get
            {
                return this.isExpanded;
            }

            set
            {
                this.isExpanded = value;
                this.RaisePropertyChanged("IsExpanded");
            }
        }

        public bool IsBusy
        {
            get
            {
                return this.isBusy;
            }

            set
            {
                this.isBusy = value;
                this.RaisePropertyChanged("IsBusy");
            }
        }

        public virtual void Initialize(object sender, SectionInitializeEventArgs e)
        {
            this.ServiceProvider = e.ServiceProvider;
        }

        public virtual void SaveContext(object sender, SectionSaveContextEventArgs e)
        {
        }

        public virtual void Loaded(object sender, SectionLoadedEventArgs e)
        {
        }

        public virtual void Refresh()
        {
        }

        public virtual void Cancel()
        {
        }

        public virtual object GetExtensibilityService(Type serviceType)
        {
            return null;
        }
    }
}


text:
require "uri"

module BitmexApi
  class SchemaApi
    attr_accessor :api_client

    def initialize(api_client = nil)
      @api_client = api_client || Configuration.api_client
    end

    # Get model schemata for data objects returned by this API.
    #
    # @param [Hash] opts the optional parameters
    # @option opts [String] :model Optional model filter. If omitted, will return all models.
    # @return [inline_response_200]
    def schema_find(opts = {})
      if Configuration.debugging
        Configuration.logger.debug "Calling API: SchemaApi#schema_find ..."
      end

      # resource path
      path = "/schema".sub('{format}','json')

      # query parameters
      query_params = {}
      query_params[:'model'] = opts[:'model'] if opts[:'model']

      # header parameters
      header_params = {}

      # HTTP header 'Accept' (if needed)
      _header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
      _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

      # HTTP header 'Content-Type'
      _header_content_type = ['application/json', 'application/x-www-form-urlencoded']
      header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil

      auth_names = []
      result = @api_client.call_api(:GET, path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'inline_response_200')
      if Configuration.debugging
        Configuration.logger.debug "API called: SchemaApi#schema_find. Result: #{result.inspect}"
      end
      return result
    end

    # Returns help text & subject list for websocket usage.
    #
    # @param [Hash] opts the optional parameters
    # @return [inline_response_200]
    def schema_websocket_help(opts = {})
      if Configuration.debugging
        Configuration.logger.debug "Calling API: SchemaApi#schema_websocket_help ..."
      end

      # resource path
      path = "/schema/websocketHelp".sub('{format}','json')

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}

      # HTTP header 'Accept' (if needed)
      _header_accept = ['application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript']
      _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

      # HTTP header 'Content-Type'
      _header_content_type = ['application/json', 'application/x-www-form-urlencoded']
      header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil

      auth_names = []
      result = @api_client.call_api(:GET, path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'inline_response_200')
      if Configuration.debugging
        Configuration.logger.debug "API called: SchemaApi#schema_websocket_help. Result: #{result.inspect}"
      end
      return result
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace SPR.Blog.Models
{
    public enum CommentStatus
    {
        Draft, //Not used at the moment. May be used to recover a comment "lost" after a wrong browser close action.
        WaitingForValidation, //Not used at the moment. May be used for comment moderation
        Published,
        InTrash
    }
}


text:
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Metadata;

namespace MvcTemplate.Components.Mvc
{
    public class DisplayNameMetadataProvider : DefaultModelMetadataProvider
    {
        public DisplayNameMetadataProvider(ICompositeMetadataDetailsProvider detailsProvider)
            : base(detailsProvider)
        {
        }

        protected override ModelMetadata CreateModelMetadata(DefaultMetadataDetails entry)
        {
            return new LocalizedModelMetadata(this, DetailsProvider, entry);
        }
    }
}


text:
A small and simple countdown app for iOS.

## Installation

Once you clone this project, you will want to `cd` into the project directory and run `pod install` in order to install the necessary dependencies.

## License

See [LICENSE.md](https://github.com/akeaswaran/Countr/blob/master/LICENSE.md) for more details.


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <updateDate>2017-09-19T07:12:21Z</updateDate>
    <subjects>
      <billSubjects>
        <policyArea>
          <name>Agriculture and Food</name>
        </policyArea>
        <legislativeSubjects />
      </billSubjects>
    </subjects>
    <committees>
      <billCommittees>
        <item>
          <name>Agriculture Committee</name>
          <activities>
            <item>
              <date>2017-08-29T16:00:08Z</date>
              <name>Referred to</name>
            </item>
          </activities>
          <type>Standing</type>
          <subcommittees>
            <item>
              <name>Commodity Exchanges, Energy, and Credit Subcommittee</name>
              <activities>
                <item>
                  <date>2017-09-15T13:45:23Z</date>
                  <name>Referred to</name>
                </item>
              </activities>
              <systemCode>hsag22</systemCode>
            </item>
          </subcommittees>
          <chamber>House</chamber>
          <systemCode>hsag00</systemCode>
        </item>
      </billCommittees>
    </committees>
    <laws />
    <titles>
      <item>
        <chamberName />
        <titleType>Short Titles as Introduced</titleType>
        <parentTitleType />
        <chamberCode />
        <title>Veteran and Beginning Farmers Assistance Act</title>
      </item>
      <item>
        <chamberName />
        <titleType>Official Title as Introduced</titleType>
        <parentTitleType />
        <chamberCode />
        <title>To amend the Consolidated Farm and Rural Development Act to provide for a 5-year extension of the appropriate technology transfer for rural areas program.</title>
      </item>
      <item>
        <chamberName />
        <titleType>Display Title</titleType>
        <parentTitleType />
        <chamberCode />
        <title>Veteran and Beginning Farmers Assistance Act</title>
      </item>
      <item>
        <chamberName />
        <titleType>(Extracted from GPO) Short Titles as Introduced</titleType>
        <parentTitleType />
        <chamberCode />
        <title>Veteran and Beginning Farmers Assistance Act</title>
      </item>
    </titles>
    <sponsors>
      <item>
        <party>R</party>
        <state>NY</state>
        <bioguideId>F000464</bioguideId>
        <fullName>Rep. Faso, John J. [R-NY-19]</fullName>
        <middleName>J.</middleName>
        <district>19</district>
        <firstName>John</firstName>
        <lastName>Faso</lastName>
        <identifiers>
          <lisID>2343</lisID>
          <bioguideId>F000464</bioguideId>
          <gpoId />
        </identifiers>
        <byRequestType />
      </item>
    </sponsors>
    <committeeReports />
    <latestAction>
      <links />
      <actionDate>2017-09-15</actionDate>
      <text>Referred to the Subcommittee on Commodity Exchanges, Energy, and Credit.</text>
    </latestAction>
    <summaries>
      <billSummaries />
    </summaries>
    <relatedBills />
    <title>Veteran and Beginning Farmers Assistance Act</title>
    <createDate>2017-08-30T03:11:31Z</createDate>
    <congress>115</congress>
    <cosponsors>
      <item>
        <party>D</party>
        <sponsorshipDate>2017-08-29</sponsorshipDate>
        <sponsorshipWithdrawnDate />
        <lastName>Kuster</lastName>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>M.</middleName>
        <firstName>Ann</firstName>
        <state>NH</state>
        <bioguideId>K000382</bioguideId>
        <identifiers>
          <lisID>2145</lisID>
          <bioguideId>K000382</bioguideId>
          <gpoId />
        </identifiers>
        <fullName>Rep. Kuster, Ann M. [D-NH-2]</fullName>
        <district>2</district>
      </item>
    </cosponsors>
    <constitutionalAuthorityStatementText />
    <version>1.0.0</version>
    <introducedDate>2017-08-29</introducedDate>
    <recordedVotes />
    <originChamber>House</originChamber>
    <notes />
    <cboCostEstimates />
    <billType>HR</billType>
    <amendments />
    <billNumber>3667</billNumber>
    <calendarNumbers />
    <policyArea>
      <name>Agriculture and Food</name>
    </policyArea>
    <actions>
      <actionTypeCounts>
        <billReferrals>1</billReferrals>
        <introducedInTheHouse>1</introducedInTheHouse>
        <placeholderTextForH>1</placeholderTextForH>
        <introducedInHouse>1</introducedInHouse>
      </actionTypeCounts>
      <actionByCounts>
        <houseOfRepresentatives>4</houseOfRepresentatives>
      </actionByCounts>
      <item>
        <actionDate>2017-09-15</actionDate>
        <committee>
          <systemCode>hsag22</systemCode>
          <name>Commodity Exchanges, Energy, and Credit Subcommittee</name>
        </committee>
        <links />
        <sourceSystem>
          1
          <name>House committee actions</name>
        </sourceSystem>
        <text>Referred to the Subcommittee on Commodity Exchanges, Energy, and Credit.</text>
        <type>Committee</type>
      </item>
      <item>
        <actionCode>H11100</actionCode>
        <links />
        <text>Referred to the House Committee on Agriculture.</text>
        <actionDate>2017-08-29</actionDate>
        <sourceSystem>
          2
          <name>House floor actions</name>
        </sourceSystem>
        <committee>
          <systemCode>hsag00</systemCode>
          <name>Agriculture Committee</name>
        </committee>
        <type>IntroReferral</type>
      </item>
      <item>
        <actionCode>Intro-H</actionCode>
        <links />
        <text>Introduced in House</text>
        <actionDate>2017-08-29</actionDate>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <committee />
        <type>IntroReferral</type>
      </item>
      <item>
        <actionCode>1000</actionCode>
        <links />
        <text>Introduced in House</text>
        <actionDate>2017-08-29</actionDate>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <committee />
        <type>IntroReferral</type>
      </item>
    </actions>
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../assets/ico/favicon.png">

    <title>Justified Nav Template for Bootstrap</title>

    <link href="../../dist/css/bootstrap.css" rel="stylesheet">

    <link href="justified-nav.css" rel="stylesheet">

Project name

Home

Projects

Services

Downloads

About

Contact

Marketing stuff!

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus
            commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet.

Get started today

Heading

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
                condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis
                euismod. Donec sed odio dui.

View details »

Heading

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
                condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis
                euismod. Donec sed odio dui.

View details »

Heading

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula
                porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
                fermentum massa.

View details »

© Company 2013


text:
#import "TGImageDataSource.h"

@interface TGImageManagerTask : NSObject
{
    @public bool _isCancelled;
}

@property (nonatomic, strong) TGImageDataSource *dataSource;
@property (nonatomic, strong) id childTaskId;

@end


text:
package io.shardingsphere.shardingjdbc.jdbc.adapter.executor;

import java.sql.SQLException;

/**
 * Force execute callback.
 *
 * @author zhangliang
 *
 * @param <T> type of target to be executed
 */
public interface ForceExecuteCallback<T> {

    /**
     * Execute.
     *
     * @param target target to be executed
     * @throws SQLException SQL exception
     */
    void execute(T target) throws SQLException;
}


text:
package ro.ase.cts.seminar7.flyweight;

public abstract class ModelSuperErou {

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using FluentSpotifyApi.Core.Utils;
using FluentSpotifyApi.Serialization;

namespace FluentSpotifyApi.Builder
{
    internal abstract class BuilderBase
    {
        private static readonly JsonSerializerOptions JsonOptions;

        private readonly ContextData contextData;

        private readonly IList<object> routeValues;

        static BuilderBase()
        {
            JsonOptions = new JsonSerializerOptions
            {
                DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
            };
            JsonOptions.Converters.Add(new EntityConverter());
        }

        public BuilderBase(BuilderBase parent)
            : this(parent, Enumerable.Empty<object>())
        {
        }

        public BuilderBase(BuilderBase parent, IEnumerable<object> routeValues)
        {
            SpotifyArgumentAssertUtils.ThrowIfNull(parent, nameof(parent));
            SpotifyArgumentAssertUtils.ThrowIfNull(routeValues, nameof(routeValues));

            this.contextData = parent.contextData;
            this.routeValues = parent.routeValues.Concat(routeValues).ToList();
        }

        private BuilderBase(ContextData contextData)
        {
            this.contextData = contextData;
            this.routeValues = Array.Empty<object>();
        }

        protected RootBuilder CreateRootBuilder() => new RootBuilder(this.contextData);

        protected async Task<TResult> GetAsync<TResult>(
            CancellationToken cancellationToken,
            IEnumerable<object> additionalRouteValues = null,
            object queryParams = null)
        {
            var relativeUri = await this.GetRelativeUriAsync(additionalRouteValues, queryParams, cancellationToken).ConfigureAwait(false);

            return await SpotifyHttpUtils.HandleTimeoutAsync<IFluentSpotifyClient, TResult>(
                async innerCt => await this.contextData.HttpClientFactory.CreateClient().GetFromJsonAsync<TResult>(relativeUri, JsonOptions, innerCt).ConfigureAwait(false),
                cancellationToken).ConfigureAwait(false);
        }

        protected async Task SendAsync(
            HttpMethod httpMethod,
            CancellationToken cancellationToken,
            IEnumerable<object> additionalRouteValues = null,
            object queryParams = null)
        {
            var relativeUri = await this.GetRelativeUriAsync(additionalRouteValues, queryParams, cancellationToken).ConfigureAwait(false);
            using (var request = new HttpRequestMessage(httpMethod, relativeUri))
            {
                await SpotifyHttpUtils.HandleTimeoutAsync<IFluentSpotifyClient>(
                    async innerCt => (await this.contextData.HttpClientFactory.CreateClient().SendAsync(request, innerCt).ConfigureAwait(false)).Dispose(),
                    cancellationToken).ConfigureAwait(false);
            }
        }

        protected async Task<TResult> SendBodyAsync<TRequestBody, TResult>(
            HttpMethod httpMethod,
            TRequestBody requestBody,
            CancellationToken cancellationToken,
            IEnumerable<object> additionalRouteValues = null,
            object queryParams = null)
        {
            var relativeUri = await this.GetRelativeUriAsync(additionalRouteValues, queryParams, cancellationToken).ConfigureAwait(false);
            var content = JsonContent.Create(requestBody, options: JsonOptions);

            using (var request = new HttpRequestMessage(httpMethod, relativeUri))
            {
                request.Content = content;

                return await SpotifyHttpUtils.HandleTimeoutAsync<IFluentSpotifyClient, TResult>(
                    async innerCt =>
                    {
                        using (var response = await this.contextData.HttpClientFactory.CreateClient().SendAsync(request, innerCt).ConfigureAwait(false))
                        {
                            return await response.Content.ReadFromJsonAsync<TResult>(JsonOptions, innerCt).ConfigureAwait(false);
                        }
                    },
                    cancellationToken).ConfigureAwait(false);
            }
        }

        protected async Task SendBodyAsync<TRequestBody>(
            HttpMethod httpMethod,
            TRequestBody requestBody,
            CancellationToken cancellationToken,
            IEnumerable<object> additionalRouteValues = null,
            object queryParams = null)
        {
            var relativeUri = await this.GetRelativeUriAsync(additionalRouteValues, queryParams, cancellationToken).ConfigureAwait(false);
            var content = JsonContent.Create(requestBody, options: JsonOptions);

            using (var request = new HttpRequestMessage(httpMethod, relativeUri))
            {
                request.Content = content;

                await SpotifyHttpUtils.HandleTimeoutAsync<IFluentSpotifyClient>(
                    async innerCt => (await this.contextData.HttpClientFactory.CreateClient().SendAsync(request, innerCt).ConfigureAwait(false)).Dispose(),
                    cancellationToken).ConfigureAwait(false);
            }
        }

        protected async Task SendJpegAsync(
            HttpMethod httpMethod,
            byte[] jpeg,
            CancellationToken cancellationToken,
            IEnumerable<object> additionalRouteValues = null,
            object queryParams = null)
        {
            var relativeUri = await this.GetRelativeUriAsync(additionalRouteValues, queryParams, cancellationToken).ConfigureAwait(false);
            var content = new StringContent(Convert.ToBase64String(jpeg));
            content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("image/jpeg");

            using (var request = new HttpRequestMessage(httpMethod, relativeUri))
            {
                request.Content = content;

                await SpotifyHttpUtils.HandleTimeoutAsync<IFluentSpotifyClient>(
                    async innerCt => (await this.contextData.HttpClientFactory.CreateClient().SendAsync(request, innerCt).ConfigureAwait(false)).Dispose(),
                    cancellationToken).ConfigureAwait(false);
            }
        }

        private async Task<Uri> GetRelativeUriAsync(IEnumerable<object> additionalRouteValues, object queryParams, CancellationToken cancellationToken)
        {
            var routeValues = this.routeValues.Concat(additionalRouteValues ?? Enumerable.Empty<object>()).ToList();
            var destructuredQueryParams = this.DestructureQueryParamsObjectRecursively(queryParams).Where(item => item.Value != null).ToList();

            bool transformRouteValues = false;
            bool transformQueryParamters = false;
            if ((transformRouteValues = routeValues.Any(x => x is CurrentUserIdPlaceholder)) || (transformQueryParamters = destructuredQueryParams.Any(x => x.Value is CurrentUserIdPlaceholder)))
            {
                var currentUser = await this.contextData.CurrentUserProvider.GetAsync(cancellationToken).ConfigureAwait(false);

                if (transformRouteValues)
                {
                    routeValues = routeValues.Select(x => x is CurrentUserIdPlaceholder ? currentUser.Id : x).ToList();
                }

                if (transformQueryParamters)
                {
                    destructuredQueryParams = destructuredQueryParams
                        .Select(x => x.Value is CurrentUserIdPlaceholder ? new KeyValuePair<string, object>(x.Key, currentUser.Id) : x)
                        .ToList();
                }
            }

            var result = SpotifyUriUtils.GetRelativeUri(routeValues, destructuredQueryParams);
            return result;
        }

        private IEnumerable<KeyValuePair<string, object>> DestructureQueryParamsObjectRecursively(object value)
        {
            if (value == null)
            {
                yield break;
            }

            var type = value.GetType();

            foreach (var property in type.GetProperties())
            {
                var propertyValue = property.GetValue(value);

                if (typeof(IEnumerable<KeyValuePair<string, object>>).GetTypeInfo().IsAssignableFrom(property.PropertyType))
                {
                    foreach (var item in (IEnumerable<KeyValuePair<string, object>>)propertyValue)
                    {
                        yield return item;
                    }
                }
                else if (typeof(KeyValuePair<string, object>).GetTypeInfo().IsAssignableFrom(property.PropertyType))
                {
                    yield return (KeyValuePair<string, object>)propertyValue;
                }
                else if (property.PropertyType == typeof(string) ||
                        property.PropertyType.IsValueType ||
                        property.PropertyType == typeof(Uri) ||
                        property.PropertyType == typeof(CurrentUserIdPlaceholder))
                {
                    yield return new KeyValuePair<string, object>(property.Name, propertyValue);
                }
                else
                {
                    foreach (var item in this.DestructureQueryParamsObjectRecursively(propertyValue))
                    {
                        yield return item;
                    }
                }
            }
        }

        public sealed class RootBuilder : BuilderBase
        {
            public RootBuilder(ContextData contextData)
                : base(contextData)
            {
            }
        }
    }
}


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

// THIS CLASS IS PROCEDURALLY MODIFIED DO NOT CHANTE THE CONTENT ENUM OR THE LOADTEXTURES REGION
namespace _2HourGame.View.GameServices
{
    public enum Content
    {
        BoatHitByCannonAnimation,
        BoundingCircle,
        CannonAnimation,
        CannonBall,
        CannonSmokeAnimation,
        CutterGunwale,
        CutterHull,
        CutterRigging,
        Dig,
        FloatingCrate,
        Gold,
        GoldGetAnimation,
        GoldLoseAnimation,
        HealthBar,
        House,
        Island,
        ProgressBar,
        Repair,
        ShipSinking,
        SloopGunwale,
        SloopHull,
        SloopRigging,
        SmallFort,
        SplashAnimation,
        Tower,
        XboxControllerBack,
        XboxControllerButtonA,
        XboxControllerButtonB,
        XboxControllerButtonGuide,
        XboxControllerButtonX,
        XboxControllerButtonY,
        XboxControllerDPad,
        XboxControllerLeftShoulder,
        XboxControllerLeftThumbstick,
        XboxControllerLeftTrigger,
        XboxControllerRightShoulder,
        XboxControllerRightThumbstick,
        XboxControllerRightTrigger,
        XboxControllerSpriteFont,
        XboxControllerStart
    }

    static class TextureReference
    {
        static public void LoadTextures(TextureManager textureManager)
        {
            #region LoadTextures
            textureManager.LoadTexture(Content.BoatHitByCannonAnimation, "ShipImages\\boatHitByCannonAnimation");
            textureManager.LoadTexture(Content.BoundingCircle, "boundingCircle");
            textureManager.LoadTexture(Content.CannonAnimation, "cannonAnimation");
            textureManager.LoadTexture(Content.CannonBall, "cannonBall");
            textureManager.LoadTexture(Content.CannonSmokeAnimation, "cannonSmokeAnimation");
            textureManager.LoadTexture(Content.CutterGunwale, "ShipImages\\Cutter\\cutterGunwale");
            textureManager.LoadTexture(Content.CutterHull, "ShipImages\\Cutter\\cutterHull");
            textureManager.LoadTexture(Content.CutterRigging, "ShipImages\\Cutter\\cutterRigging");
            textureManager.LoadTexture(Content.Dig, "dig");
            textureManager.LoadTexture(Content.FloatingCrate, "floatingCrate");
            textureManager.LoadTexture(Content.Gold, "gold");
            textureManager.LoadTexture(Content.GoldGetAnimation, "goldGetAnimation");
            textureManager.LoadTexture(Content.GoldLoseAnimation, "goldLoseAnimation");
            textureManager.LoadTexture(Content.HealthBar, "healthBar");
            textureManager.LoadTexture(Content.House, "house");
            textureManager.LoadTexture(Content.Island, "island");
            textureManager.LoadTexture(Content.ProgressBar, "progressBar");
            textureManager.LoadTexture(Content.Repair, "repair");
            textureManager.LoadTexture(Content.ShipSinking, "ShipImages\\shipSinking");
            textureManager.LoadTexture(Content.SloopGunwale, "ShipImages\\Sloop\\sloopGunwale");
            textureManager.LoadTexture(Content.SloopHull, "ShipImages\\Sloop\\sloopHull");
            textureManager.LoadTexture(Content.SloopRigging, "ShipImages\\Sloop\\sloopRigging");
            textureManager.LoadTexture(Content.SmallFort, "smallFort");
            textureManager.LoadTexture(Content.SplashAnimation, "splashAnimation");
            textureManager.LoadTexture(Content.Tower, "tower");
            textureManager.LoadTexture(Content.XboxControllerBack, "ControllerImages\\xboxControllerBack");
            textureManager.LoadTexture(Content.XboxControllerButtonA, "ControllerImages\\xboxControllerButtonA");
            textureManager.LoadTexture(Content.XboxControllerButtonB, "ControllerImages\\xboxControllerButtonB");
            textureManager.LoadTexture(Content.XboxControllerButtonGuide, "ControllerImages\\xboxControllerButtonGuide");
            textureManager.LoadTexture(Content.XboxControllerButtonX, "ControllerImages\\xboxControllerButtonX");
            textureManager.LoadTexture(Content.XboxControllerButtonY, "ControllerImages\\xboxControllerButtonY");
            textureManager.LoadTexture(Content.XboxControllerDPad, "ControllerImages\\xboxControllerDPad");
            textureManager.LoadTexture(Content.XboxControllerLeftShoulder, "ControllerImages\\xboxControllerLeftShoulder");
            textureManager.LoadTexture(Content.XboxControllerLeftThumbstick, "ControllerImages\\xboxControllerLeftThumbstick");
            textureManager.LoadTexture(Content.XboxControllerLeftTrigger, "ControllerImages\\xboxControllerLeftTrigger");
            textureManager.LoadTexture(Content.XboxControllerRightShoulder, "ControllerImages\\xboxControllerRightShoulder");
            textureManager.LoadTexture(Content.XboxControllerRightThumbstick, "ControllerImages\\xboxControllerRightThumbstick");
            textureManager.LoadTexture(Content.XboxControllerRightTrigger, "ControllerImages\\xboxControllerRightTrigger");
            textureManager.LoadTexture(Content.XboxControllerSpriteFont, "ControllerImages\\xboxControllerSpriteFont");
            textureManager.LoadTexture(Content.XboxControllerStart, "ControllerImages\\xboxControllerStart");
            #endregion
        }
    }
}


text:
/**
 * This package contains the public library classes for downloading, caching and setting bitmaps
 * into {@link ImageView}s.
 *
 * @author Marco Salis
 */
package com.github.marcosalis.kraken.cache.bitmap;


text:
#pragma once

INT_PTR CALLBACK PreviewDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);


text:
import os
import os.path
from pathlib import Path
from vint.linting.file_filter import find_vim_script

def build_environment(cmdargs):
    return {
        'cmdargs': cmdargs,
        'home_path': _get_home_path(),
        'xdg_config_home': _get_xdg_config_home(),
        'cwd': _get_cwd(),
        'file_paths': _get_file_paths(cmdargs),
    }

def _get_cwd():
    return Path(os.getcwd())

def _get_home_path():
    return Path(os.path.expanduser('~'))

def _get_file_paths(cmdargs):
    if 'files' not in cmdargs:
        return []

    found_file_paths = find_vim_script(map(Path, cmdargs['files']))

    return found_file_paths

def _get_xdg_config_home():
    return Path(os.environ.get(
        "XDG_CONFIG_HOME",
        str(_get_home_path().joinpath(".config"))
    ))


text:
package org.ros.internal.node.response;

import com.google.common.collect.Lists;

import org.ros.internal.message.topic.TopicDescription;

import org.ros.internal.node.topic.TopicDeclaration;
import org.ros.namespace.GraphName;

import java.util.Arrays;
import java.util.List;

/**
 * A {@link ResultFactory} to take an object and turn it into a list of
 * {@link TopicDeclaration} instances.
 *
 * @author damonkohler@google.com (Damon Kohler)
 */
public class TopicListResultFactory implements ResultFactory<List<TopicDeclaration>> {

  @Override
  public List<TopicDeclaration> newFromValue(Object value) {
    List<TopicDeclaration> descriptions = Lists.newArrayList();
    List<Object> topics = Arrays.asList((Object[]) value);
    for (Object topic : topics) {
      String name = (String) ((Object[]) topic)[0];
      String type = (String) ((Object[]) topic)[1];
      descriptions.add(TopicDeclaration.newFromTopicName(GraphName.of(name), new TopicDescription(type, null,
          null)));
    }
    return descriptions;
  }
}


text:
#include "bsp_common.h"
#include "stm32_bluenrg_ble.h"
#include "bluenrg_sdk_api.h"
#include "bluenrg_sdk_host_api.h"
#include "dispatch.h"
#include "stm32f401_lp_mode.h"

ADC_HandleTypeDef    AdcHandle;
/* Variable used to get converted value */
__IO uint16_t uhADCxConvertedValue = 0;
uint16_t result_array[100];

#define ADCx                            ADC1	// circuit show ADC0 for MIC?

#define ADCx_CLK_ENABLE()               __HAL_RCC_ADC1_CLK_ENABLE()
#define ADCx_CHANNEL_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOC_CLK_ENABLE()

#define ADCx_FORCE_RESET()              __HAL_RCC_ADC_FORCE_RESET()
#define ADCx_RELEASE_RESET()            __HAL_RCC_ADC_RELEASE_RESET()

/* Definition for ADCx Channel Pin */
#define ADCx_CHANNEL_PIN                GPIO_PIN_0
#define ADCx_CHANNEL_GPIO_PORT          GPIOC

/* Definition for ADCx's Channel */
#define ADCx_CHANNEL                    ADC_CHANNEL_10

/* Definition for ADCx's NVIC */
#define ADCx_IRQn                       ADC_IRQn

/* Definition for ADCx clock resources */

#define DMAx_CLK_ENABLE()               __HAL_RCC_DMA2_CLK_ENABLE()

/* Definition for ADCx's DMA */
#define ADCx_DMA_CHANNEL                DMA_CHANNEL_0
#define ADCx_DMA_STREAM                 DMA2_Stream0

/* Definition for ADCx's NVIC */
#define ADCx_DMA_IRQn                   DMA2_Stream0_IRQn
#define ADCx_DMA_IRQHandler             DMA2_Stream0_IRQHandler

int idx = 0;
int g_tmp = 0;
int irq = 0;

void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc)
{
  GPIO_InitTypeDef          GPIO_InitStruct;
  static DMA_HandleTypeDef  hdma_adc;

  /*##-1- Enable peripherals and GPIO Clocks #################################*/
  /* ADC1 Periph clock enable */
  ADCx_CLK_ENABLE();
  /* Enable GPIO clock ****************************************/
  ADCx_CHANNEL_GPIO_CLK_ENABLE();
  /* Enable DMA2 clock */
  DMAx_CLK_ENABLE();

  /*##-2- Configure peripheral GPIO ##########################################*/
  /* ADC Channel GPIO pin configuration */
  GPIO_InitStruct.Pin = ADCx_CHANNEL_PIN;
  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  HAL_GPIO_Init(ADCx_CHANNEL_GPIO_PORT, &GPIO_InitStruct);

  /*##-3- Configure the DMA streams ##########################################*/
  /* Set the parameters to be configured */
  hdma_adc.Instance = ADCx_DMA_STREAM;
  hdma_adc.Init.Channel  = ADCx_DMA_CHANNEL;
  hdma_adc.Init.Direction = DMA_PERIPH_TO_MEMORY;
  hdma_adc.Init.PeriphInc = DMA_PINC_DISABLE;
  hdma_adc.Init.MemInc = DMA_MINC_ENABLE;
  hdma_adc.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
  hdma_adc.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
  hdma_adc.Init.Mode = DMA_CIRCULAR;
  hdma_adc.Init.Priority = DMA_PRIORITY_HIGH;
  hdma_adc.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
  hdma_adc.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_HALFFULL;
  hdma_adc.Init.MemBurst = DMA_MBURST_SINGLE;
  hdma_adc.Init.PeriphBurst = DMA_PBURST_SINGLE;

  HAL_DMA_Init(&hdma_adc);

  /* Associate the initialized DMA handle to the ADC handle */
  __HAL_LINKDMA(hadc, DMA_Handle, hdma_adc);

  /*##-4- Configure the NVIC for DMA #########################################*/
  /* NVIC configuration for DMA transfer complete interrupt */
  HAL_NVIC_SetPriority(ADCx_DMA_IRQn, 0, 0);
  HAL_NVIC_EnableIRQ(ADCx_DMA_IRQn);
}

/**
  * @brief ADC MSP De-Initialization
  *        This function frees the hardware resources used in this example:
  *          - Disable the Peripheral's clock
  *          - Revert GPIO to their default state
  * @param hadc: ADC handle pointer
  * @retval None
  */
void HAL_ADC_MspDeInit(ADC_HandleTypeDef *hadc)
{

  /*##-1- Reset peripherals ##################################################*/
  ADCx_FORCE_RESET();
  ADCx_RELEASE_RESET();

  /*##-2- Disable peripherals and GPIO Clocks ################################*/
  /* De-initialize the ADC Channel GPIO pin */
  HAL_GPIO_DeInit(ADCx_CHANNEL_GPIO_PORT, ADCx_CHANNEL_PIN);
}

void ADC0_DMA_Test(void)
{
	 ADC_ChannelConfTypeDef sConfig;

   idx = 0;

  /*##-1- Configure the ADC peripheral #######################################*/
  AdcHandle.Instance                   = ADCx;
  AdcHandle.Init.ClockPrescaler        = ADC_CLOCKPRESCALER_PCLK_DIV2;
  AdcHandle.Init.Resolution            = ADC_RESOLUTION12b;
  AdcHandle.Init.ScanConvMode          = DISABLE;                       /* Sequencer disabled (ADC conversion on only 1 channel: channel set on rank 1) */
  AdcHandle.Init.ContinuousConvMode    = ENABLE;                        /* Continuous mode disabled to have only 1 conversion at each conversion trig */
  AdcHandle.Init.DiscontinuousConvMode = DISABLE;                       /* Parameter discarded because sequencer is disabled */
  AdcHandle.Init.NbrOfDiscConversion   = 0;
  AdcHandle.Init.ExternalTrigConvEdge  = ADC_EXTERNALTRIGCONVEDGE_NONE;        /* Conversion start trigged at each external event */
  AdcHandle.Init.ExternalTrigConv      = ADC_EXTERNALTRIGCONV_T1_CC1;
  AdcHandle.Init.DataAlign             = ADC_DATAALIGN_RIGHT;
  AdcHandle.Init.NbrOfConversion       = 1;
  AdcHandle.Init.DMAContinuousRequests = ENABLE;
  AdcHandle.Init.EOCSelection          = DISABLE;

  if (HAL_ADC_Init(&AdcHandle) != HAL_OK)
  {
    /* ADC initialization Error */
    Error_Handler();
  }

  /*##-2- Configure ADC regular channel ######################################*/
  sConfig.Channel      = ADC_CHANNEL_10;
  sConfig.Rank         = 1;
  sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
  sConfig.Offset       = 0;

  if (HAL_ADC_ConfigChannel(&AdcHandle, &sConfig) != HAL_OK)
  {
    /* Channel Configuration Error */
    Error_Handler();
  }

  /*##-3- Start the conversion process #######################################*/
  /* Note: Considering IT occurring after each number of ADC conversions      */
  /*       (IT by DMA end of transfer), select sampling time and ADC clock    */
  /*       with sufficient duration to not create an overhead situation in    */
  /*        IRQHandler. */
recal:
  if(HAL_ADC_Start_DMA(&AdcHandle, (uint32_t*)&uhADCxConvertedValue, 1) != HAL_OK)
  {
    /* Start Conversation Error */
    Error_Handler();
  }

//	goto recal;

  /* Infinite loop */
  while (1)
  {
		if (irq == 1) {
			irq = 0;
			goto recal;
		}
  }
}

int ADC0_Test(void)
{

	memset(result_array, 0x0, sizeof (result_array));

	ADC0_DMA_Test();

  /* Infinite loop */
  while (1)
  {
  }
}

void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* AdcHandle)
{
  /* Get the converted value of regular channel */
  uhADCxConvertedValue = HAL_ADC_GetValue(AdcHandle);
	result_array[idx++] = uhADCxConvertedValue;
	g_tmp = uhADCxConvertedValue;
	if (idx > 100)
		idx = 0;
	irq = 1;
}

static void Error_Handler(void)
{
    while (1)
    {

    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!-- There should be one assertion -->
<?assert count(/saml2p:Response/saml2:Assertion) = 1 ?>

<!-- There should be a single Role-->
<?assert count(mapping:get-attributes('roles')) = 1 ?>

<!-- The two roles shold be nova:admin and lbaas:admin -->
<?assert every $r in ('nova:admin') satisfies $r=mapping:get-attributes('roles')?>

<!-- The name should be Sdowner -->
<?assert /saml2p:Response/saml2:Assertion[1]/saml2:Subject/saml2:NameID = 'Sdowner'?>

<!-- Expire should match original expire time -->
<?assert string(mapping:get-expire()) = '2013-11-17T16:19:06.298Z' ?>

<!-- The email should be no-reply@rackspace.com -->
<?assert mapping:get-attribute('email') = 'no-reply@rackspace.com'?>

<!-- The Email should be foo@rackspace.com -->
<?assert mapping:get-attribute('Email') = 'foo@rackspace.com'?>

<!-- The ExpireAfter should be PT2H -->
<?assert mapping:get-attribute('ExpireAfter') = 'PT2H'?>

<!-- The UserName should be set as defined -->
<?assert mapping:get-attribute('UserName') = 'Fupper'?>

<!-- The FirstName should be set as defined -->
<?assert mapping:get-attribute('FirstName') = 'John'?>

<!-- The LastName should be set as defined -->
<?assert mapping:get-attribute('LastName') = 'Doe'?>

<!-- The domain from original assertion should be used -->
<?assert mapping:get-attribute('domain') = '323676'?>

<saml2p:Response ID="_7fcd6173-e6e0-45a4-a2fd-74a4ef85bf30" IssueInstant="2015-12-04T15:47:15.057Z" Version="2.0" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">http://test.rackspace.com</saml2:Issuer>
    <saml2p:Status>
        <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
    </saml2p:Status>
    <saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    ID="_406fb7fe-a519-4919-a42c-f67794a670a5" IssueInstant="2013-11-15T16:19:06.310Z"
    Version="2.0">
    <saml2:Issuer>http://my.rackspace.com</saml2:Issuer>
    <saml2:Subject>
        <saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">Sdowner</saml2:NameID>
        <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
            <saml2:SubjectConfirmationData
                NotOnOrAfter="2013-11-17T16:19:06.298Z" />
        </saml2:SubjectConfirmation>
    </saml2:Subject>
    <saml2:AuthnStatement AuthnInstant="2013-11-15T16:19:04.055Z">
        <saml2:AuthnContext>
            <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
            </saml2:AuthnContextClassRef>
        </saml2:AuthnContext>
    </saml2:AuthnStatement>
    <saml2:AttributeStatement>
        <saml2:Attribute Name="roles">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">nova:admin</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute Name="domain">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">323676</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute Name="email">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">no-reply@rackspace.com</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute Name="Email">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">foo@rackspace.com</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute Name="ExpireAfter">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">PT2H</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute Name="UserName">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">Fupper</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute Name="FirstName">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">John</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute Name="LastName">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:type="xs:string">Doe</saml2:AttributeValue>
        </saml2:Attribute>
    </saml2:AttributeStatement>
   </saml2:Assertion>
</saml2p:Response>


text:
"""
Created on Thu Aug 28 16:53:04 2014

@author: Natural Solutions (Thomas)
"""

from sqlalchemy import (
    Boolean,
    Column,
    DateTime,
    ForeignKey,
    func,
    Index,
    Integer,
    Numeric,
    Sequence,
    String,
    UniqueConstraint
)

from ecorelevesensor.models import Base, dbConfig
from ecorelevesensor.models.object import ObjectRfid

dialect = dbConfig['dialect']

class DataRfid(Base):
    __tablename__ = 'T_DataRfid'
    id = Column('PK_id', Integer, Sequence('seq_datarfid_pk_id'),
                   primary_key=True)
    creator = Column('FK_creator', Integer)
    obj = Column('FK_obj', Integer, ForeignKey(ObjectRfid.id), nullable=False)
    chip_code = Column(String(10), nullable=False)
    date = Column('date_', DateTime, nullable=False)
    creation_date = Column(DateTime, server_default=func.now())
    validated = Column(Boolean, server_default='0')
    __table_args__ = (
        Index('idx_Tdatarfid_chipcode_date', chip_code, date),
        UniqueConstraint(obj, chip_code, date),
    )


text:
//using MongoDB.Bson;
//using MongoDB.Bson.Serialization.Attributes;
//using System;

//namespace NForum.Datastores.MongoDB.Dbos {

//	public class CategoryStructure : Category {
//		[BsonElement(FieldNames.Forums)]
//		public ForumStructure[] Forums { get; set; }

//		public static class FieldNames {
//			public const String Forums = "f";
//		}
//	}
//}


text:
package org.apache.derbyTesting.functionTests.tests.lang;

import org.apache.derbyTesting.functionTests.suites.XMLSuite;
import org.apache.derbyTesting.functionTests.tests.nist.NistScripts;
import org.apache.derbyTesting.junit.BaseTestCase;
import org.apache.derbyTesting.junit.JDBC;

import junit.framework.Test;
import junit.framework.TestSuite;

/**
 * Suite to run all JUnit tests in this package:
 * org.apache.derbyTesting.functionTests.tests.lang
 * <P>
 * All tests are run "as-is", just as if they were run
 * individually. Thus this test is just a collection
 * of all the JUNit tests in this package (excluding itself).
 * While the old test harness is in use, some use of decorators
 * may be required.
 *
 */
public class _Suite extends BaseTestCase  {

	/**
	 * Use suite method instead.
	 */
	private _Suite(String name) {
		super(name);
	}

    public static Test suite() throws Exception {

		TestSuite suite = new TestSuite("lang");

        // DERBY-1315 and DERBY-1735 need to be addressed
        // before re-enabling this test as it's memory use is
        // different on different vms leading to failures in
        // the nightly runs.
        // suite.addTest(largeCodeGen.suite());

		suite.addTest(org.apache.derbyTesting.functionTests.tests.memory.TriggerTests.suite());
	  suite.addTest(CheckConstraintTest.suite());
        suite.addTest(AnsiTrimTest.suite());
        suite.addTest(AlterTableTest.suite());
        suite.addTest(CreateTableFromQueryTest.suite());
        suite.addTest(ColumnDefaultsTest.suite());
        suite.addTest(CompressTableTest.suite());
        suite.addTest(DatabaseClassLoadingTest.suite());
        suite.addTest(DropTableTest.suite());
	  suite.addTest(DynamicLikeOptimizationTest.suite());
        suite.addTest(ExistsWithSubqueriesTest.suite());
        suite.addTest(FloatTypesTest.suite());
        suite.addTest(GrantRevokeTest.suite());
        suite.addTest(GroupByExpressionTest.suite());
        suite.addTest(InbetweenTest.suite());
        suite.addTest(InsertTest.suite());
        suite.addTest(JoinTest.suite());
        suite.addTest(LangProcedureTest.suite());
        suite.addTest(LangScripts.suite());
        suite.addTest(LikeTest.suite());
        suite.addTest(LojReorderTest.suite());
        suite.addTest(MathTrigFunctionsTest.suite());
        suite.addTest(OuterJoinTest.suite());
        suite.addTest(PredicateTest.suite());
        suite.addTest(PrepareExecuteDDL.suite());
        suite.addTest(ReferentialActionsTest.suite());
        suite.addTest(RolesTest.suite());
        suite.addTest(RolesConferredPrivilegesTest.suite());
        suite.addTest(SQLSessionContextTest.suite());
        suite.addTest(RoutineSecurityTest.suite());
        suite.addTest(RoutineTest.suite());
        suite.addTest(RoutinesDefinersRightsTest.suite());
        suite.addTest(SQLAuthorizationPropTest.suite());
        suite.addTest(StatementPlanCacheTest.suite());
        suite.addTest(StreamsTest.suite());
        suite.addTest(SubqueryFlatteningTest.suite());
        suite.addTest(TimeHandlingTest.suite());
        suite.addTest(TriggerTest.suite());
        suite.addTest(TriggerWhenClauseTest.suite());
        suite.addTest(TruncateTableTest.suite());
        suite.addTest(VTITest.suite());
        suite.addTest(SysDiagVTIMappingTest.suite());
        suite.addTest(UpdatableResultSetTest.suite());
        suite.addTest(CurrentOfTest.suite());
	    suite.addTest(CursorTest.suite());
        suite.addTest(CastingTest.suite());
        suite.addTest(ScrollCursors2Test.suite());
        suite.addTest(NullIfTest.suite());
        suite.addTest(InListMultiProbeTest.suite());
        suite.addTest(InPredicateTest.suite());
        suite.addTest(SecurityPolicyReloadingTest.suite());
        suite.addTest(CurrentOfTest.suite());
        suite.addTest(UnaryArithmeticParameterTest.suite());
        suite.addTest(HoldCursorTest.suite());
        suite.addTest(ShutdownDatabaseTest.suite());
        suite.addTest(StalePlansTest.suite());
        suite.addTest(SystemCatalogTest.suite());
        suite.addTest(ForBitDataTest.suite());
        suite.addTest(DistinctTest.suite());
        suite.addTest(GroupByTest.suite());
        suite.addTest(UpdateCursorTest.suite());
        suite.addTest(CoalesceTest.suite());
        suite.addTest(ProcedureInTriggerTest.suite());
        suite.addTest(ForUpdateTest.suite());
        suite.addTest(CollationTest.suite());
        suite.addTest(CollationTest2.suite());
        suite.addTest(ScrollCursors1Test.suite());
        suite.addTest(SimpleTest.suite());
        suite.addTest(ReleaseCompileLocksTest.suite());
        suite.addTest(LazyDefaultSchemaCreationTest.suite());
        suite.addTest(ErrorCodeTest.suite());
        suite.addTest(TimestampArithTest.suite());
        suite.addTest(SpillHashTest.suite());
        suite.addTest(CaseExpressionTest.suite());
        suite.addTest(CharUTF8Test.suite());
        suite.addTest(AggregateClassLoadingTest.suite());
        suite.addTest(LockTableTest.suite());
        suite.addTest(TableFunctionTest.suite());
        suite.addTest(VarargsTest.suite());
        suite.addTest(DeclareGlobalTempTableJavaTest.suite());
        suite.addTest(PrimaryKeyTest.suite());
        suite.addTest(RenameTableTest.suite());
        suite.addTest(RenameIndexTest.suite());
        suite.addTest(Bug5052rtsTest.suite());
        suite.addTest(Bug5054Test.suite());
        suite.addTest(Bug4356Test.suite());
        suite.addTest(SynonymTest.suite());
        suite.addTest(CommentTest.suite());
        suite.addTest(NestedWhereSubqueryTest.suite());
        suite.addTest(ConglomerateSharingTest.suite());
        suite.addTest(NullableUniqueConstraintTest.suite());
        suite.addTest(UniqueConstraintSetNullTest.suite());
        suite.addTest(UniqueConstraintMultiThreadedTest.suite());
        suite.addTest(ViewsTest.suite());
        suite.addTest(DeadlockDetectionTest.suite());
        suite.addTest(DeadlockModeTest.suite());
        suite.addTest(AnsiSignaturesTest.suite());
        suite.addTest(PredicatePushdownTest.suite());
        suite.addTest(UngroupedAggregatesNegativeTest.suite());
        suite.addTest(XplainStatisticsTest.suite());
        suite.addTest(SelectivityTest.suite());
        suite.addTest(Derby6587Test.suite());
        // Add the XML tests, which exist as a separate suite
        // so that users can "run all XML tests" easily.
        suite.addTest(XMLSuite.suite());

        // Add the NIST suite in from the nist package since
        // it is a SQL language related test.
        suite.addTest(NistScripts.suite());

        // Add the java tests that run using a master
        // file (ie. partially converted).
        suite.addTest(LangHarnessJavaTest.suite());

        suite.addTest(ResultSetsFromPreparedStatementTest.suite());
        if (!isPhoneME())
        { // Disable temporarily until CVM/phoneME is fixed.. See DERBY-4290)
        suite.addTest(OrderByAndSortAvoidance.suite());
        }

        // tests that do not run with JSR169
        if (JDBC.vmSupportsJDBC3())
        {
            // test uses triggers interwoven with other tasks
            // triggers may cause a generated class which calls
            // java.sql.DriverManager, which will fail with JSR169.
            // also, test calls procedures which use DriverManager
            // to get the default connection.
            suite.addTest(GrantRevokeDDLTest.suite());

            // test uses regex classes that are not available in Foundation 1.1
            suite.addTest(ErrorMessageTest.suite());
            // Test uses DriverManager to connect to database in jar.
            suite.addTest(DBInJarTest.suite());
            suite.addTest(ConnectTest.suite());

            // test uses PooledConnections and Savepoints
            suite.addTest(DeclareGlobalTempTableJavaJDBC30Test.suite());

            // requires Java 5 (generics)
            suite.addTest(UserDefinedAggregatesTest.suite());
            suite.addTest(UDAPermsTest.suite());
        }
         // tests that require Java 6
        if (JDBC.vmSupportsJDBC4())
        {
            suite.addTest(OptionalToolsTest.suite());
        }

        suite.addTest(BigDataTest.suite());
        suite.addTest(MixedCaseExpressionTest.suite());
        suite.addTest(UpdateStatisticsTest.suite());
        suite.addTest(MiscErrorsTest.suite());
        suite.addTest(NullsTest.suite());
        suite.addTest(ArithmeticTest.suite());
        suite.addTest(ConstantExpressionTest.suite());
        suite.addTest(OptimizerOverridesTest.suite());
        suite.addTest(PrecedenceTest.suite());
        suite.addTest(GeneratedColumnsTest.suite());
        suite.addTest(GeneratedColumnsPermsTest.suite());
        suite.addTest(RestrictedVTITest.suite());
        suite.addTest(AwareVTITest.suite());
        suite.addTest(UDTTest.suite());
        suite.addTest(UDTPermsTest.suite());
        suite.addTest(BooleanValuesTest.suite());
        suite.addTest(AlterColumnTest.suite());
        suite.addTest(UserLobTest.suite());
        suite.addTest(OffsetFetchNextTest.suite());
        suite.addTest(TriggerBeforeTrigTest.suite());
        suite.addTest(TriggerGeneralTest.suite());
        suite.addTest(SequenceTest.suite());
        suite.addTest(SequencePermsTest.suite());
        suite.addTest(SequenceGeneratorTest.suite());
        suite.addTest(DBOAccessTest.suite());
        suite.addTest(OLAPTest.suite());
        suite.addTest(OrderByAndOffsetFetchInSubqueries.suite());
        suite.addTest(Derby5005Test.suite());
        suite.addTest(AutoIncrementTest.suite());
        suite.addTest(HalfCreatedDatabaseTest.suite());
        suite.addTest(NativeAuthenticationServiceTest.suite());
        suite.addTest(Derby5652.suite());
        suite.addTest(TruncateTableAndOnlineBackupTest.suite());
        suite.addTest(QueryPlanTest.suite());
        suite.addTest(JoinDeadlockTest.suite());
        suite.addTest(Derby6131.suite());
        suite.addTest(AggBuiltinTest.suite());
        suite.addTest(NewOptimizerOverridesTest.suite());
        suite.addTest(XMLOptimizerTraceTest.suite());
        suite.addTest(MergeStatementTest.suite());
        suite.addTest(IdentitySequenceTest.suite());
        suite.addTest(NestedCommitTest.suite());
        suite.addTest(ForeignKeysNonSpsTest.suite());
        suite.addTest(LOBDB2compatibilityTest.suite());
        suite.addTest(CurrentSchemaTest.suite());
        suite.addTest(Test_6496.suite());
        suite.addTest(ConstraintCharacteristicsTest.suite());
        suite.addTest(ForeignKeysDeferrableTest.suite());
        suite.addTest(DB2IsolationLevelsTest.suite());
        suite.addTest(LuceneSuite.suite());
        suite.addTest(ConsistencyCheckerTest.suite());
        suite.addTest(Derby5866TriggerOrderTest.suite());
        return suite;
	}
}


text:
module Intermix

  # a window pane, which is a rectangular section of the screen that the user
  # sees
  class Pane
    attr_accessor :program, :size_rows, :size_cols, :offset_row, :offset_col, :name, :transforms

    def initialize(size_rows, size_cols, offset_row, offset_col, name="")
      self.size_rows = size_rows
      self.size_cols = size_cols
      self.offset_row = offset_row
      self.offset_col = offset_col
      self.name = name
      self.transforms = []
    end

    def screen=(screen)
      @screen = screen
    end

    def screen
      transforms.any? ? transforms.first : @screen
    end

    def inspect
      "#<#{self.class} name=#{name} size_rows=#{size_rows} size_cols=#{size_cols} offset_row=#{offset_row} offset_col=#{offset_col} screen=#{@screen} transforms=#{transforms}>"
    end
  end
end


text:
(function () {
	'use strict';

	var app = angular.module('AxSoft');

	app.controller('CustomersController', ['$scope', 'customerService', function ($scope, customerService) {
		$scope.customers = customerService.query();
	}]);

	app.controller('CustomerEditController', ['$scope', '$location', '$routeParams', 'customerService', function ($scope, $location, $routeParams, customerService) {

		if ($location.$$path == '/AddCustomer') {
			$scope.isAdd = true;
			$scope.customer = {};
		} else {
			$scope.isAdd = false;
			var id = parseInt($routeParams.id);
			if (isNaN(id) || id <= 0) throw new Error('Invalid customer Id');
			$scope.customer = customerService.get({id: id});
		}

		$scope.isEdit = !$scope.isAdd;

		$scope.save = function (form) {
			if (form.$invalid) {
				return;
			}

			$scope.errorMessage = null;

			var fn = $scope.isAdd ? customerService.save : customerService.update;
			fn($scope.customer, function () {
				$location.url('/Customers');
			}, function (response) {
				$scope.errorMessage = response.Message || 'Error';
			});
		};

		$scope.cancel = function () {
			$location.url('/Customers');
		};
	}]);

	app.factory('customerService', ['$resource', function ($resource) {
		var customers = $resource('/api/customers/:id', {}, {
			update: {
				method: 'PUT'
			}
		});

		return customers;
	}]);
})();


text:
package io.bot.email.handlers;

import io.bot.email.model.Preferences;
import io.bot.email.model.SetupState;
import org.telegram.telegrambots.api.methods.BotApiMethod;
import org.telegram.telegrambots.api.methods.updatingmessages.EditMessageText;
import org.telegram.telegrambots.api.objects.Message;
import org.telegram.telegrambots.api.objects.Update;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
import org.telegram.telegrambots.api.objects.replykeyboard.buttons.InlineKeyboardButton;

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

import static java.lang.StrictMath.toIntExact;

public class ChangeProtocolHandler extends AbstractHandler{
    @Override
    boolean accept(Update update, Preferences preferences) {
        return update.hasCallbackQuery()
                && update.getCallbackQuery().getData().equals("changeProtocol");
    }

    @Override
    BotApiMethod handle(Update update, Preferences preferences) {
        Message message = update.hasMessage() ? update.getMessage() : update.getCallbackQuery().getMessage();
        preferences.setSetupState(SetupState.CHANGE_PROTOCOL);
        return new EditMessageText()
                .setReplyMarkup(getInlineKeyboard())
                .setChatId(message.getChatId())
                .setMessageId(toIntExact(message.getMessageId()))
                .setText("Please select Email protocol");
    }

    private InlineKeyboardMarkup getInlineKeyboard() {
        InlineKeyboardMarkup markupInline = new InlineKeyboardMarkup();
        List<List<InlineKeyboardButton>> rowsInline = new ArrayList<>();
        List<InlineKeyboardButton> rowInline = new ArrayList<>();
        rowInline.add(new InlineKeyboardButton().setText("IMAPS").setCallbackData("imaps"));
        rowInline.add(new InlineKeyboardButton().setText("POP3").setCallbackData("pop3"));
        rowInline.add(new InlineKeyboardButton().setText("SMTP").setCallbackData("smtp"));
        rowsInline.add(rowInline);
        rowInline = new ArrayList<>();
        rowInline.add(new InlineKeyboardButton().setText("<< Back").setCallbackData("backInSettings"));
        rowsInline.add(rowInline);
        markupInline.setKeyboard(rowsInline);
        return markupInline;
    }
}


text:
package net.runelite.deob.deobfuscators.lvt;

import java.util.Objects;

public class MapKey
{
	private final int idx;
	private final LVTType type;

	public MapKey(int idx, LVTType type)
	{
		this.idx = idx;
		this.type = type;
	}

	@Override
	public int hashCode()
	{
		int hash = 7;
		hash = 89 * hash + this.idx;
		hash = 89 * hash + Objects.hashCode(this.type);
		return hash;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
		{
			return true;
		}
		if (obj == null)
		{
			return false;
		}
		if (getClass() != obj.getClass())
		{
			return false;
		}
		final MapKey other = (MapKey) obj;
		if (this.idx != other.idx)
		{
			return false;
		}
		if (this.type != other.type)
		{
			return false;
		}
		return true;
	}
}


text:
static void visibilityCallback(GLFWwindow* window, int vis);
static void reshapeCallback(GLFWwindow* window, int w, int h);

static void keyboardCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
static void mouseCallback(GLFWwindow* window, int button, int action, int mods);

static void error_callback(int error, const char* description)
{
    ERROR_OUT(description << std::endl);
}

static GLFWwindow* window = nullptr;

//-------------------------------------------------------------------------------
// @ main()
//-------------------------------------------------------------------------------
// Where it all begins
//-------------------------------------------------------------------------------
int main(int argc, char *argv[])
{
    gDebugger.DumpToFile( "Debug.txt" );
    glfwSetErrorCallback(error_callback);

    if (!glfwInit())
    {
        ERROR_OUT("Error: could not initialize GLFW" << std::endl);
    }

    // set up for core profile
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    glfwWindowHint(GLFW_SRGB_CAPABLE, GL_TRUE);

    // set up display
    bool fullscreen = false;
    if (fullscreen)
    {
        window = glfwCreateWindow(640, 480, "Example", glfwGetPrimaryMonitor(), nullptr);
    }
    else
    {
        window = glfwCreateWindow(640, 480, "Example", nullptr, nullptr);
    }
    if (nullptr == window)
    {
        ERROR_OUT("Error: could not create window" << std::endl);
        glfwTerminate();
        return 1;
    }
    glfwMakeContextCurrent(window);

#if !defined(__APPLE__) || !defined(__MACH__)
    glewExperimental = GL_TRUE;
    GLenum err = glewInit();
    if ( GLEW_OK != err )
    {
        ERROR_OUT("Error: " << glewGetErrorString(err) << std::endl);
        glfwDestroyWindow(window);
        glfwTerminate();
        return 1;
    }

    // check for version compatibility
    if ( !GLEW_VERSION_3_2 )
    {
        ERROR_OUT("Error: OpenGL version 3.2 is not supported." << std::endl);
        glfwDestroyWindow(window);
        glfwTerminate();
        return 1;
    }

    DEBUG_OUT("Using GLEW " << glewGetString(GLEW_VERSION));
#endif

    // set up game
    if (!IvGame::Create() || !IvGame::mGame->PreRendererInitialize( argc, argv ))
    {
        IvGame::Destroy();
        glfwDestroyWindow(window);
        glfwTerminate();
        return 1;
    }

    // set up renderer

    int width;
    int height;
    glfwGetFramebufferSize(window, &width, &height);

    if (!IvRendererOGL::Create() || !IvRendererOGL::mRenderer->Initialize( width, height ))
    {
        IvRenderer::Destroy();
        IvGame::Destroy();
        glfwDestroyWindow(window);
        glfwTerminate();
        return 1;
    }

    // Set the background dark blue
    IvRenderer::mRenderer->SetClearColor( 0.0f, 0.0f, 0.10f, 1.0f );

    // Do post-renderer creation initialization
    if (!IvGame::mGame->PostRendererInitialize())
    {
        IvRenderer::Destroy();
        IvGame::Destroy();
        glfwDestroyWindow(window);
        glfwTerminate();
        return 1;
    }

    // set up display callbacks
    glfwSetWindowFocusCallback(window, visibilityCallback);
    glfwSetWindowSizeCallback(window, reshapeCallback);

    // set up event handlers
    glfwSetKeyCallback(window, keyboardCallback);
    glfwSetMouseButtonCallback(window, mouseCallback);

    // run it!
    while (!glfwWindowShouldClose(window))
    {
        // game does everything it needs to do
        IvGame::mGame->Update();

        // clear the back buffer
        IvRenderer::mRenderer->ClearBuffers(kColorDepthClear);

        // render the world
        if ( IvRenderer::mRenderer->IsActive() )
        {
            IvGame::mGame->Display();
        }

        // swap graphics buffers
        glfwSwapBuffers(window);
        glfwPollEvents();
    }

    IvGame::Destroy();

    glfwDestroyWindow(window);
    glfwTerminate();

    return 0;

}   // End of main()

static void
visibilityCallback(GLFWwindow* window, int vis)
{
    IvRenderer::mRenderer->Activate( vis == GL_TRUE );
}

static void
reshapeCallback(GLFWwindow* window, int w, int h)
{
    int width;
    int height;
    glfwGetFramebufferSize(window, &width, &height);
    IvRenderer::mRenderer->Resize( width, height );
}

static void
keyboardCallback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
    // Handle Extended ASCII only
    if (key > 255)
    {
        return;
    }

    if (action == GLFW_PRESS || action == GLFW_REPEAT)
    {
        IvGame::mGame->mEventHandler->OnKeyDown( key );   // Handle key down event
    }
    else
    {
        IvGame::mGame->mEventHandler->OnKeyUp( key ); // Handle key up event
    }

}

static void
mouseCallback(GLFWwindow* window, int button, int action, int mods)
{
    if ( button == GLFW_MOUSE_BUTTON_LEFT )
    {
        if ( action == GLFW_PRESS )
        {
            double x, y;
            glfwGetCursorPos(window, &x, &y);

            int width;
            int height;
            glfwGetFramebufferSize(window, &width, &height);

            int windowWidth;
            int windowHeight;
            glfwGetWindowSize(window, &windowWidth, &windowHeight);

            double scaleX = width/(float)windowWidth;
            double scaleY = height/(float)windowHeight;

            IvGame::mGame->mEventHandler->OnMouseDown( (int)(scaleX*x), (int)(scaleY*y) );
        }
        else
        {
            IvGame::mGame->mEventHandler->OnMouseUp();
        }
    }
}

//-------------------------------------------------------------------------------
// @ GetTime()
//-------------------------------------------------------------------------------
// Get current system time in milliseconds
//-------------------------------------------------------------------------------
unsigned int
GetTime()
{
    return static_cast<unsigned int>(glfwGetTime()*1000.0f);
}

//-------------------------------------------------------------------------------
// @ SetWindowTitle()
//-------------------------------------------------------------------------------
// Set the current window title to the string value
//-------------------------------------------------------------------------------
void
SetWindowTitle( const char* title )
{
    glfwSetWindowTitle( window, title );
}


text:
using YAF.Lucene.Net.Index;
using YAF.Lucene.Net.Util.Mutable;
using System;

namespace YAF.Lucene.Net.Queries.Function.DocValues
{

    /// <summary>
    /// Abstract <see cref="FunctionValues"/> implementation which supports retrieving <see cref="double"/> values.
    /// Implementations can control how the <see cref="double"/> values are loaded through <see cref="DoubleVal(int)"/>
    /// </summary>
    public abstract class DoubleDocValues : FunctionValues
    {
        protected readonly ValueSource m_vs;

        public DoubleDocValues(ValueSource vs)
        {
            this.m_vs = vs;
        }

        public override byte ByteVal(int doc)
        {
            return (byte)DoubleVal(doc);
        }

        /// <summary>
        /// NOTE: This was shortVal() in Lucene
        /// </summary>
        public override short Int16Val(int doc)
        {
            return (short)DoubleVal(doc);
        }

        /// <summary>
        /// NOTE: This was floatVal() in Lucene
        /// </summary>
        public override float SingleVal(int doc)
        {
            return (float)DoubleVal(doc);
        }

        /// <summary>
        /// NOTE: This was intVal() in Lucene
        /// </summary>
        public override int Int32Val(int doc)
        {
            return (int)DoubleVal(doc);
        }

        /// <summary>
        /// NOTE: This was longVal() in Lucene
        /// </summary>
        public override long Int64Val(int doc)
        {
            return (long)DoubleVal(doc);
        }

        public override bool BoolVal(int doc)
        {
            return DoubleVal(doc) != 0;
        }

        public override abstract double DoubleVal(int doc);

        public override string StrVal(int doc) // LUCENENET TODO: API - Add overload to include CultureInfo ?
        {
            return Convert.ToString(DoubleVal(doc));
        }

        public override object ObjectVal(int doc)
        {
            return Exists(doc) ? DoubleVal(doc) : (double?)null;
        }

        public override string ToString(int doc)
        {
            return m_vs.GetDescription() + '=' + StrVal(doc);
        }

        public override ValueSourceScorer GetRangeScorer(IndexReader reader, string lowerVal, string upperVal,
            bool includeLower, bool includeUpper) // LUCENENET TODO: API - Add overload to include CultureInfo ?
        {
            double lower, upper;

            if (lowerVal == null)
            {
                lower = double.NegativeInfinity;
            }
            else
            {
                lower = Convert.ToDouble(lowerVal);
            }

            if (upperVal == null)
            {
                upper = double.PositiveInfinity;
            }
            else
            {
                upper = Convert.ToDouble(upperVal);
            }

            double l = lower;
            double u = upper;
            if (includeLower && includeUpper)
            {
                return new ValueSourceScorerAnonymousInnerClassHelper(this, reader, this, l, u);
            }
            else if (includeLower && !includeUpper)
            {
                return new ValueSourceScorerAnonymousInnerClassHelper2(this, reader, this, l, u);
            }
            else if (!includeLower && includeUpper)
            {
                return new ValueSourceScorerAnonymousInnerClassHelper3(this, reader, this, l, u);
            }
            else
            {
                return new ValueSourceScorerAnonymousInnerClassHelper4(this, reader, this, l, u);
            }
        }

        private class ValueSourceScorerAnonymousInnerClassHelper : ValueSourceScorer
        {
            private readonly DoubleDocValues outerInstance;

            private double l;
            private double u;

            public ValueSourceScorerAnonymousInnerClassHelper(DoubleDocValues outerInstance, IndexReader reader, DoubleDocValues @this, double l, double u)
                : base(reader, @this)
            {
                this.outerInstance = outerInstance;
                this.l = l;
                this.u = u;
            }

            public override bool MatchesValue(int doc)
            {
                double docVal = outerInstance.DoubleVal(doc);
                return docVal >= l && docVal <= u;
            }
        }

        private class ValueSourceScorerAnonymousInnerClassHelper2 : ValueSourceScorer
        {
            private readonly DoubleDocValues outerInstance;

            private double l;
            private double u;

            public ValueSourceScorerAnonymousInnerClassHelper2(DoubleDocValues outerInstance, IndexReader reader, DoubleDocValues @this, double l, double u)
                : base(reader, @this)
            {
                this.outerInstance = outerInstance;
                this.l = l;
                this.u = u;
            }

            public override bool MatchesValue(int doc)
            {
                double docVal = outerInstance.DoubleVal(doc);
                return docVal >= l && docVal < u;
            }
        }

        private class ValueSourceScorerAnonymousInnerClassHelper3 : ValueSourceScorer
        {
            private readonly DoubleDocValues outerInstance;

            private double l;
            private double u;

            public ValueSourceScorerAnonymousInnerClassHelper3(DoubleDocValues outerInstance, IndexReader reader, DoubleDocValues @this, double l, double u)
                : base(reader, @this)
            {
                this.outerInstance = outerInstance;
                this.l = l;
                this.u = u;
            }

            public override bool MatchesValue(int doc)
            {
                double docVal = outerInstance.DoubleVal(doc);
                return docVal > l && docVal <= u;
            }
        }

        private class ValueSourceScorerAnonymousInnerClassHelper4 : ValueSourceScorer
        {
            private readonly DoubleDocValues outerInstance;

            private double l;
            private double u;

            public ValueSourceScorerAnonymousInnerClassHelper4(DoubleDocValues outerInstance, IndexReader reader,
                DoubleDocValues @this, double l, double u)
                : base(reader, @this)
            {
                this.outerInstance = outerInstance;
                this.l = l;
                this.u = u;
            }

            public override bool MatchesValue(int doc)
            {
                double docVal = outerInstance.DoubleVal(doc);
                return docVal > l && docVal < u;
            }
        }

        public override ValueFiller GetValueFiller()
        {
            return new ValueFillerAnonymousInnerClassHelper(this);
        }

        private class ValueFillerAnonymousInnerClassHelper : ValueFiller
        {
            private readonly DoubleDocValues outerInstance;

            public ValueFillerAnonymousInnerClassHelper(DoubleDocValues outerInstance)
            {
                this.outerInstance = outerInstance;
                mval = new MutableValueDouble();
            }

            private readonly MutableValueDouble mval;

            public override MutableValue Value
            {
                get
                {
                    return mval;
                }
            }

            public override void FillValue(int doc)
            {
                mval.Value = outerInstance.DoubleVal(doc);
                mval.Exists = outerInstance.Exists(doc);
            }
        }
    }
}


text:
import clearmetrics

# 1d ground truth and measurements for 3 frames
groundtruth = {0: [2, 3, 6],
               1: [3, 2, 6],
               2: [4, 0, 6]
               }

measurements = {
    0: [1, 3, 8],
    1: [2, 3, None, 6],
    2: [0, 4, None, 6, 8]
}
print 'Groundtruth:'
print groundtruth
print '\nMeasurements:'
print measurements
print ''

clear = clearmetrics.ClearMetrics(groundtruth, measurements, 1.5)
clear.match_sequence()
for frame in groundtruth.keys():
    print 'Frame ' + str(frame) + ' matches:'
    for gt in clear.measurements_matches[frame]:
        if gt is not None and gt != -1:
            print 'gt: %d, m: %d, distance %f' % \
                (gt, clear.gt_matches[frame][gt], clear.gt_distances[frame][gt])
    print ''

evaluation = [clear.get_mota(),
              clear.get_motp(),
              clear.get_fn_count(),
              clear.get_fp_count(),
              clear.get_mismatches_count(),
              clear.get_object_count(),
              clear.get_matches_count()]
print 'MOTA, MOTP, FN, FP, mismatches, objects, matches'
print evaluation


text:
package org.apache.lucene.analysis.fa;

import java.io.IOException;
import java.io.Reader;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.ar.ArabicNormalizationFilter;
import org.apache.lucene.analysis.core.DecimalDigitFilter;
import org.apache.lucene.analysis.core.LowerCaseFilter;
import org.apache.lucene.analysis.core.StopFilter;
import org.apache.lucene.analysis.standard.StandardTokenizer;
import org.apache.lucene.analysis.standard.std40.StandardTokenizer40;
import org.apache.lucene.analysis.util.CharArraySet;
import org.apache.lucene.analysis.util.StopwordAnalyzerBase;
import org.apache.lucene.util.Version;

/**
 * {@link Analyzer} for Persian.
 * <p>
 * This Analyzer uses {@link PersianCharFilter} which implies tokenizing around
 * zero-width non-joiner in addition to whitespace. Some persian-specific variant forms (such as farsi
 * yeh and keheh) are standardized. "Stemming" is accomplished via stopwords.
 * </p>
 */
public final class PersianAnalyzer extends StopwordAnalyzerBase {

  /**
   * File containing default Persian stopwords.
   *
   * Default stopword list is from
   * http://members.unine.ch/jacques.savoy/clef/index.html The stopword list is
   * BSD-Licensed.
   *
   */
  public final static String DEFAULT_STOPWORD_FILE = "stopwords.txt";

  /**
   * The comment character in the stopwords file. All lines prefixed with this
   * will be ignored
   */
  public static final String STOPWORDS_COMMENT = "#";

  /**
   * Returns an unmodifiable instance of the default stop-words set.
   * @return an unmodifiable instance of the default stop-words set.
   */
  public static CharArraySet getDefaultStopSet(){
    return DefaultSetHolder.DEFAULT_STOP_SET;
  }

  /**
   * Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class
   * accesses the static final set the first time.;
   */
  private static class DefaultSetHolder {
    static final CharArraySet DEFAULT_STOP_SET;

    static {
      try {
        DEFAULT_STOP_SET = loadStopwordSet(false, PersianAnalyzer.class, DEFAULT_STOPWORD_FILE, STOPWORDS_COMMENT);
      } catch (IOException ex) {
        // default set should always be present as it is part of the
        // distribution (JAR)
        throw new RuntimeException("Unable to load default stopword set");
      }
    }
  }

  /**
   * Builds an analyzer with the default stop words:
   * {@link #DEFAULT_STOPWORD_FILE}.
   */
  public PersianAnalyzer() {
    this(DefaultSetHolder.DEFAULT_STOP_SET);
  }

  /**
   * Builds an analyzer with the given stop words
   *
   * @param stopwords
   *          a stopword set
   */
  public PersianAnalyzer(CharArraySet stopwords){
    super(stopwords);
  }

  /**
   * Creates
   * {@link org.apache.lucene.analysis.Analyzer.TokenStreamComponents}
   * used to tokenize all the text in the provided {@link Reader}.
   *
   * @return {@link org.apache.lucene.analysis.Analyzer.TokenStreamComponents}
   *         built from a {@link StandardTokenizer} filtered with
   *         {@link LowerCaseFilter}, {@link DecimalDigitFilter}, {@link ArabicNormalizationFilter},
   *         {@link PersianNormalizationFilter} and Persian Stop words
   */
  @Override
  protected TokenStreamComponents createComponents(String fieldName) {
    final Tokenizer source;
    if (getVersion().onOrAfter(Version.LUCENE_4_7_0)) {
      source = new StandardTokenizer();
    } else {
      source = new StandardTokenizer40();
    }
    TokenStream result = new LowerCaseFilter(source);
    if (getVersion().onOrAfter(Version.LUCENE_5_4_0)) {
      result = new DecimalDigitFilter(result);
    }
    result = new ArabicNormalizationFilter(result);
    /* additional persian-specific normalization */
    result = new PersianNormalizationFilter(result);
    /*
     * the order here is important: the stopword list is normalized with the
     * above!
     */
    return new TokenStreamComponents(source, new StopFilter(result, stopwords));
  }

  /**
   * Wraps the Reader with {@link PersianCharFilter}
   */
  @Override
  protected Reader initReader(String fieldName, Reader reader) {
    return new PersianCharFilter(reader);
  }
}