text:
from __future__ import print_function

"""
A Python script for power cycling a virtual machine. Demonstrates the use
of tasks in an asynchronous way, how to answer virtual machine
questions in the middle of power operations using a credentials xml file.

In order to use it you need to create your credentials file via:

 # credstore_admin.pl add -s <server> -u <user> -p <password>

get_args method has been modified to illustrate the functionality.
This could be integrated to the cli package in the args file.

"""

import atexit
import argparse
from six import PY2
import sys
import textwrap

from pyvmomi_tools import cli
from pyVim import connect
from pyVmomi import vim
from pyvmomi_tools.extensions.credstore import VICredStore, NoCredentialsFileFound, HostNotFoundException

if PY2:
    input = raw_input

def get_args():
    """
    Supports the command-line arguments and/or credentials xml file.

    """
    parser = argparse.ArgumentParser(description='Process args for retrieving all the Virtual Machines')
    parser.add_argument('-s', '--host',
                        required=True,
                        action='store',
                        help='Remote host to connect to')
    parser.add_argument('-o', '--port',
                        type=int,
                        default=443,
                        action='store',
                        help='Port to connect on')
    parser.add_argument('-u', '--user',
                        action='store',
                        help='User name to use when connecting to host')
    parser.add_argument('-p', '--password',
                        action='store',
                        help='Password to use when connecting to host')
    parser.add_argument('-n', '--name',
                        required=True,
                        action='store',
                        help='Name of the virtual_machine to look for.')

    args = parser.parse_args()

    try:
        store = VICredStore()
    except NoCredentialsFileFound:
        print("ERROR: No credentials store file found. You need to enter credentials via command-line arguments!\n")
        sys.exit(1)

    try:
        (args.user, args.password) = store.get_userpwd(args.host)
    except HostNotFoundException:
        print("ERROR: Host [" + args.host + "] was not found on credentials file. You need to enter credentials via command-line!\n")
        parser.print_usage()
        sys.exit(1)

    return args

args = get_args()

# form a connection...
si = connect.SmartConnect(host=args.host, user=args.user, pwd=args.password,
                          port=args.port)

# doing this means you don't need to remember to disconnect your script/objects
atexit.register(connect.Disconnect, si)

# search the whole inventory tree recursively... a brutish but effective tactic
vm = si.content.rootFolder.find_by_name(args.name)
if not isinstance(vm, vim.VirtualMachine):
    print("could not find a virtual machine with the name {0}", args.name)
    sys.exit(-1)

print("Found VirtualMachine: {0} Name: {1}", vm, vm.name)

if vm.runtime.powerState == vim.VirtualMachinePowerState.poweredOn:
    # using a dynamic class extension for power_off
    # this is a blocking method call and the script will pause
    # while the machine powers off.
    print("powering off...")
    vm.power_off()
    print("power is off.")

def answer_question(vm):
    print("\n")
    choices = vm.runtime.question.choice.choiceInfo
    default_option = None
    if vm.runtime.question.choice.defaultIndex is not None:
        ii = vm.runtime.question.choice.defaultIndex
        default_option = choices[ii]
    choice = None
    while choice not in [o.key for o in choices]:
        print("VM power on is paused by this question:\n\n")
        print("\n".join(textwrap.wrap(vm.runtime.question.text, 60)))
        for option in choices:
            print("\t {0}: {1} ", option.key, option.label)
        if default_option is not None:
            print("default ({0}): {1}\n", default_option.label,
                  default_option.key)
        choice = input("\nchoice number: ").strip()
        print("...")
    return choice

# Sometimes we don't want a task to block execution completely
# we may want to execute or handle concurrent events. In that case we can
# poll our task repeatedly and also check for any run-time issues. This
# code deals with a common problem, what to do if a VM question pops up
# and how do you handle it in the API?
print("powering on VM {0}", vm.name)
if vm.runtime.powerState != vim.VirtualMachinePowerState.poweredOn:

    # now we get to work... calling the vSphere API generates a task...
    task = vm.PowerOn()

    # We track the question ID & answer so we don't end up answering the same
    # questions repeatedly.
    answers = {}

    def handle_question(current_task, virtual_machine):
        # we'll check for a question, if we find one, handle it,
        # Note: question is an optional attribute and this is how pyVmomi
        # handles optional attributes. They are marked as None.
        if virtual_machine.runtime.question is not None:
            question_id = virtual_machine.runtime.question.id
            if question_id not in answers.keys():
                answer = answer_question(virtual_machine)
                answers[question_id] = answer
                virtual_machine.AnswerVM(question_id, answer)

        # create a spinning cursor so people don't kill the script...
        cli.cursor.spinner(task.info.state)

    task.poll(vm, periodic=handle_question)

    if task.info.state == vim.TaskInfo.State.error:
        # some vSphere errors only come with their class and no other message
        print("error type: {0}", task.info.error.__class__.__name__)
        print("found cause: {0}", task.info.error.faultCause)
        for fault_msg in task.info.error.faultMessage:
            print(fault_msg.key)
            print(fault_msg.message)
        sys.exit(-1)

print(".")
sys.exit(0)


text:
BASEDIR=$(dirname "$0")
runScript=$BASEDIR/internal/run.sh

# start the application in the background
exec $runScript stop

redpajama_set_name: RedPajamaGithub


text:
import * as React from 'react';
import PropTypes from 'prop-types';
import withStyles from '../styles/withStyles';
import Typography from '../Typography';

export const styles = {
  /* Styles applied to the root element. */
  root: {
    marginBottom: 12,
  },
};

const DialogContentText = React.forwardRef(function DialogContentText(props, ref) {
  return <Typography component="p" variant="body1" color="textSecondary" ref={ref} {...props} />;
});

DialogContentText.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // |     To update them edit the d.ts file and run "yarn proptypes"     |
  // ----------------------------------------------------------------------
  /**
   * The content of the component.
   */
  children: PropTypes.node,
  /**
   * Override or extend the styles applied to the component.
   * See [CSS API](#css) below for more details.
   */
  classes: PropTypes.object,
};

export default withStyles(styles, { name: 'MuiDialogContentText' })(DialogContentText);


text:
from cms.api import create_page
from cms.models import Page

class MenusFixture(object):
    def create_fixtures(self):
        """
        Tree from fixture:

            + P1
            | + P2
            |   + P3
            + P4
            | + P5
            + P6 (not in menu)
              + P7
              + P8
        """
        defaults = {
            'template': 'nav_playground.html',
            'language': 'en',
        }
        with self.settings(CMS_PERMISSION=False):
            p1 = create_page('P1', published=True, in_navigation=True, **defaults)
            Page.set_homepage(p1)
            p4 = create_page('P4', published=True, in_navigation=True, **defaults)
            p6 = create_page('P6', published=True, in_navigation=False, **defaults)
            p2 = create_page('P2', published=True, in_navigation=True, parent=p1, **defaults)
            create_page('P3', published=True, in_navigation=True, parent=p2, **defaults)
            create_page('P5', published=True, in_navigation=True, parent=p4, **defaults)
            create_page('P7', published=True, in_navigation=True, parent=p6, **defaults)
            create_page('P8', published=True, in_navigation=True, parent=p6, **defaults)

class ExtendedMenusFixture(object):
    def create_fixtures(self):
        """
        Tree from fixture:

            + P1
            | + P2
            |   + P3
            | + P9
            |   + P10
            |      + P11
            + P4
            | + P5
            + P6 (not in menu)
              + P7
              + P8
        """
        defaults = {
            'template': 'nav_playground.html',
            'language': 'en',
        }
        with self.settings(CMS_MODERATOR=False, CMS_PERMISSION=False):
            p1 = create_page('P1', published=True, in_navigation=True, **defaults)
            Page.set_homepage(p1)
            p4 = create_page('P4', published=True, in_navigation=True, **defaults)
            p6 = create_page('P6', published=True, in_navigation=False, **defaults)
            p2 = create_page('P2', published=True, in_navigation=True, parent=p1, **defaults)
            create_page('P3', published=True, in_navigation=True, parent=p2, **defaults)
            create_page('P5', published=True, in_navigation=True, parent=p4, **defaults)
            create_page('P7', published=True, in_navigation=True, parent=p6, **defaults)
            create_page('P8', published=True, in_navigation=True, parent=p6, **defaults)
            p9 = create_page('P9', published=True, in_navigation=True, parent=p1, **defaults)
            p10 = create_page('P10', published=True, in_navigation=True, parent=p9, **defaults)
            create_page('P11', published=True, in_navigation=True, parent=p10, **defaults)

class SubMenusFixture(object):
    def create_fixtures(self):
        """
        Tree from fixture:

            + P1
            | + P2
            |   + P3
            + P4
            | + P5
            + P6
              + P7 (not in menu)
              + P8
        """
        defaults = {
            'template': 'nav_playground.html',
            'language': 'en',
        }
        with self.settings(CMS_PERMISSION=False):
            p1 = create_page('P1', published=True, in_navigation=True, **defaults)
            Page.set_homepage(p1)
            p4 = create_page('P4', published=True, in_navigation=True, **defaults)
            p6 = create_page('P6', published=True, in_navigation=True, **defaults)
            p2 = create_page('P2', published=True, in_navigation=True, parent=p1, **defaults)
            create_page('P3', published=True, in_navigation=True, parent=p2, **defaults)
            create_page('P5', published=True, in_navigation=True, parent=p4, **defaults)
            create_page('P7', published=True, in_navigation=False, parent=p6, **defaults)
            create_page('P8', published=True, in_navigation=True, parent=p6, **defaults)

class SoftrootFixture(object):
    def create_fixtures(self):
        """
        top
            root
                aaa
                    111
                        ccc
                            ddd
                    222
                bbb
                    333
                    444

        # all in nav, published and NOT softroot
        """
        defaults = {
            'template': 'nav_playground.html',
            'language': 'en',
            'in_navigation': True,
            'published': True,
        }
        with self.settings(CMS_PERMISSION=False):
            top = create_page('top', **defaults)
            Page.set_homepage(top)
            root = create_page('root', parent=top, **defaults)
            aaa = create_page('aaa', parent=root, **defaults)
            _111 = create_page('111', parent=aaa, **defaults)
            ccc = create_page('ccc', parent=_111, **defaults)
            create_page('ddd', parent=ccc, **defaults)
            create_page('222', parent=aaa, **defaults)
            bbb = create_page('bbb', parent=root, **defaults)
            create_page('333', parent=bbb, **defaults)
            create_page('444', parent=bbb, **defaults)


text:
using System.Collections.Generic;
using System.Linq;
using Moq;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors;

namespace Umbraco.ModelsBuilder.Tests
{
    class UmbracoInternals
    {
        public static PublishedPropertyType CreatePublishedPropertyType(string alias, int definition, string editor)
        {
            var valueConverters = new PropertyValueConverterCollection(Enumerable.Empty<IPropertyValueConverter>());
            var publishedModelFactory = Mock.Of<IPublishedModelFactory>();
            var publishedContentTypeFactory = Mock.Of<IPublishedContentTypeFactory>();
            return new PublishedPropertyType(alias, definition, false, ContentVariation.Nothing, valueConverters, publishedModelFactory, publishedContentTypeFactory);
        }

        public static PublishedContentType CreatePublishedContentType(int id, string alias, IEnumerable<PublishedPropertyType> propertyTypes)
        {
            return new PublishedContentType(id, alias, PublishedItemType.Content, Enumerable.Empty<string>(), propertyTypes, ContentVariation.Nothing);
        }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
ec.breed Class Hierarchy
</TITLE>

<META NAME="date" CONTENT="2013-05-03">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Hierarchy For Package ec.breed

Package Hierarchies:
All Packages

Class Hierarchy

java.lang.Object

ec.breed.BreedDefaults (implements ec.DefaultsForm)

ec.BreedingSource (implements ec.Prototype, ec.util.RandomChoiceChooser)

ec.BreedingPipeline (implements ec.steadystate.SteadyStateBSourceForm)

ec.breed.BufferedBreedingPipeline
ec.breed.ForceBreedingPipeline
ec.breed.GenerationSwitchPipeline
ec.breed.MultiBreedingPipeline
ec.breed.ReproductionPipeline

      Overview
      Package
      Class
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
using Elastic.Clients.Elasticsearch.Fluent;
using Elastic.Clients.Elasticsearch.Requests;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch;
public sealed class CountRequestParameters : RequestParameters
{
	[JsonIgnore]
	public bool? AllowNoIndices { get => Q<bool?>("allow_no_indices"); set => Q("allow_no_indices", value); }

	[JsonIgnore]
	public string? Analyzer { get => Q<string?>("analyzer"); set => Q("analyzer", value); }

	[JsonIgnore]
	public bool? AnalyzeWildcard { get => Q<bool?>("analyze_wildcard"); set => Q("analyze_wildcard", value); }

	[JsonIgnore]
	public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q<Elastic.Clients.Elasticsearch.QueryDsl.Operator?>("default_operator"); set => Q("default_operator", value); }

	[JsonIgnore]
	public string? Df { get => Q<string?>("df"); set => Q("df", value); }

	[JsonIgnore]
	public ICollection<Elastic.Clients.Elasticsearch.ExpandWildcard>? ExpandWildcards { get => Q<ICollection<Elastic.Clients.Elasticsearch.ExpandWildcard>?>("expand_wildcards"); set => Q("expand_wildcards", value); }

	[JsonIgnore]
	public bool? IgnoreThrottled { get => Q<bool?>("ignore_throttled"); set => Q("ignore_throttled", value); }

	[JsonIgnore]
	public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }

	[JsonIgnore]
	public bool? Lenient { get => Q<bool?>("lenient"); set => Q("lenient", value); }

	[JsonIgnore]
	public double? MinScore { get => Q<double?>("min_score"); set => Q("min_score", value); }

	[JsonIgnore]
	public string? Preference { get => Q<string?>("preference"); set => Q("preference", value); }

	[JsonIgnore]
	public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Routing?>("routing"); set => Q("routing", value); }

	[JsonIgnore]
	public long? TerminateAfter { get => Q<long?>("terminate_after"); set => Q("terminate_after", value); }

	[JsonIgnore]
	public string? QueryLuceneSyntax { get => Q<string?>("q"); set => Q("q", value); }
}

public partial class CountRequest : PlainRequest<CountRequestParameters>
{
	public CountRequest()
	{
	}

	public CountRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices))
	{
	}

	internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount;
	internal override HttpMethod HttpMethod => HttpMethod.POST;
	internal override bool SupportsBody => true;
	[JsonIgnore]
	public bool? AllowNoIndices { get => Q<bool?>("allow_no_indices"); set => Q("allow_no_indices", value); }

	[JsonIgnore]
	public string? Analyzer { get => Q<string?>("analyzer"); set => Q("analyzer", value); }

	[JsonIgnore]
	public bool? AnalyzeWildcard { get => Q<bool?>("analyze_wildcard"); set => Q("analyze_wildcard", value); }

	[JsonIgnore]
	public Elastic.Clients.Elasticsearch.QueryDsl.Operator? DefaultOperator { get => Q<Elastic.Clients.Elasticsearch.QueryDsl.Operator?>("default_operator"); set => Q("default_operator", value); }

	[JsonIgnore]
	public string? Df { get => Q<string?>("df"); set => Q("df", value); }

	[JsonIgnore]
	public ICollection<Elastic.Clients.Elasticsearch.ExpandWildcard>? ExpandWildcards { get => Q<ICollection<Elastic.Clients.Elasticsearch.ExpandWildcard>?>("expand_wildcards"); set => Q("expand_wildcards", value); }

	[JsonIgnore]
	public bool? IgnoreThrottled { get => Q<bool?>("ignore_throttled"); set => Q("ignore_throttled", value); }

	[JsonIgnore]
	public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }

	[JsonIgnore]
	public bool? Lenient { get => Q<bool?>("lenient"); set => Q("lenient", value); }

	[JsonIgnore]
	public double? MinScore { get => Q<double?>("min_score"); set => Q("min_score", value); }

	[JsonIgnore]
	public string? Preference { get => Q<string?>("preference"); set => Q("preference", value); }

	[JsonIgnore]
	public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Routing?>("routing"); set => Q("routing", value); }

	[JsonIgnore]
	public long? TerminateAfter { get => Q<long?>("terminate_after"); set => Q("terminate_after", value); }

	[JsonIgnore]
	public string? QueryLuceneSyntax { get => Q<string?>("q"); set => Q("q", value); }

	[JsonInclude]
	[JsonPropertyName("query")]
	public Elastic.Clients.Elasticsearch.QueryDsl.Query? Query { get; set; }
}

public sealed partial class CountRequestDescriptor<TDocument> : RequestDescriptor<CountRequestDescriptor<TDocument>, CountRequestParameters>
{
	internal CountRequestDescriptor(Action<CountRequestDescriptor<TDocument>> configure) => configure.Invoke(this);
	public CountRequestDescriptor() : this(typeof(TDocument))
	{
	}

	public CountRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices))
	{
	}

	internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount;
	internal override HttpMethod HttpMethod => HttpMethod.POST;
	internal override bool SupportsBody => true;
	public CountRequestDescriptor<TDocument> AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
	public CountRequestDescriptor<TDocument> AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
	public CountRequestDescriptor<TDocument> Analyzer(string? analyzer) => Qs("analyzer", analyzer);
	public CountRequestDescriptor<TDocument> DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
	public CountRequestDescriptor<TDocument> Df(string? df) => Qs("df", df);
	public CountRequestDescriptor<TDocument> ExpandWildcards(ICollection<Elastic.Clients.Elasticsearch.ExpandWildcard>? expandWildcards) => Qs("expand_wildcards", expandWildcards);
	public CountRequestDescriptor<TDocument> IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
	public CountRequestDescriptor<TDocument> IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
	public CountRequestDescriptor<TDocument> Lenient(bool? lenient = true) => Qs("lenient", lenient);
	public CountRequestDescriptor<TDocument> MinScore(double? minScore) => Qs("min_score", minScore);
	public CountRequestDescriptor<TDocument> Preference(string? preference) => Qs("preference", preference);
	public CountRequestDescriptor<TDocument> QueryLuceneSyntax(string? q) => Qs("q", q);
	public CountRequestDescriptor<TDocument> Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing);
	public CountRequestDescriptor<TDocument> TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter);
	public CountRequestDescriptor<TDocument> Indices(Elastic.Clients.Elasticsearch.Indices? indices)
	{
		RouteValues.Optional("index", indices);
		return Self;
	}

	private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; }

	private QueryDsl.QueryDescriptor<TDocument> QueryDescriptor { get; set; }

	private Action<QueryDsl.QueryDescriptor<TDocument>> QueryDescriptorAction { get; set; }

	public CountRequestDescriptor<TDocument> Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
	{
		QueryDescriptor = null;
		QueryDescriptorAction = null;
		QueryValue = query;
		return Self;
	}

	public CountRequestDescriptor<TDocument> Query(QueryDsl.QueryDescriptor<TDocument> descriptor)
	{
		QueryValue = null;
		QueryDescriptorAction = null;
		QueryDescriptor = descriptor;
		return Self;
	}

	public CountRequestDescriptor<TDocument> Query(Action<QueryDsl.QueryDescriptor<TDocument>> configure)
	{
		QueryValue = null;
		QueryDescriptor = null;
		QueryDescriptorAction = configure;
		return Self;
	}

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
		writer.WriteStartObject();
		if (QueryDescriptor is not null)
		{
			writer.WritePropertyName("query");
			JsonSerializer.Serialize(writer, QueryDescriptor, options);
		}
		else if (QueryDescriptorAction is not null)
		{
			writer.WritePropertyName("query");
			JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor<TDocument>(QueryDescriptorAction), options);
		}
		else if (QueryValue is not null)
		{
			writer.WritePropertyName("query");
			JsonSerializer.Serialize(writer, QueryValue, options);
		}

		writer.WriteEndObject();
	}
}

public sealed partial class CountRequestDescriptor : RequestDescriptor<CountRequestDescriptor, CountRequestParameters>
{
	internal CountRequestDescriptor(Action<CountRequestDescriptor> configure) => configure.Invoke(this);
	public CountRequestDescriptor(Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices))
	{
	}

	public CountRequestDescriptor()
	{
	}

	internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount;
	internal override HttpMethod HttpMethod => HttpMethod.POST;
	internal override bool SupportsBody => true;
	public CountRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices);
	public CountRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard);
	public CountRequestDescriptor Analyzer(string? analyzer) => Qs("analyzer", analyzer);
	public CountRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator);
	public CountRequestDescriptor Df(string? df) => Qs("df", df);
	public CountRequestDescriptor ExpandWildcards(ICollection<Elastic.Clients.Elasticsearch.ExpandWildcard>? expandWildcards) => Qs("expand_wildcards", expandWildcards);
	public CountRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled);
	public CountRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
	public CountRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient);
	public CountRequestDescriptor MinScore(double? minScore) => Qs("min_score", minScore);
	public CountRequestDescriptor Preference(string? preference) => Qs("preference", preference);
	public CountRequestDescriptor QueryLuceneSyntax(string? q) => Qs("q", q);
	public CountRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing);
	public CountRequestDescriptor TerminateAfter(long? terminateAfter) => Qs("terminate_after", terminateAfter);
	public CountRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices)
	{
		RouteValues.Optional("index", indices);
		return Self;
	}

	private Elastic.Clients.Elasticsearch.QueryDsl.Query? QueryValue { get; set; }

	private QueryDsl.QueryDescriptor QueryDescriptor { get; set; }

	private Action<QueryDsl.QueryDescriptor> QueryDescriptorAction { get; set; }

	public CountRequestDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? query)
	{
		QueryDescriptor = null;
		QueryDescriptorAction = null;
		QueryValue = query;
		return Self;
	}

	public CountRequestDescriptor Query(QueryDsl.QueryDescriptor descriptor)
	{
		QueryValue = null;
		QueryDescriptorAction = null;
		QueryDescriptor = descriptor;
		return Self;
	}

	public CountRequestDescriptor Query(Action<QueryDsl.QueryDescriptor> configure)
	{
		QueryValue = null;
		QueryDescriptor = null;
		QueryDescriptorAction = configure;
		return Self;
	}

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
		writer.WriteStartObject();
		if (QueryDescriptor is not null)
		{
			writer.WritePropertyName("query");
			JsonSerializer.Serialize(writer, QueryDescriptor, options);
		}
		else if (QueryDescriptorAction is not null)
		{
			writer.WritePropertyName("query");
			JsonSerializer.Serialize(writer, new QueryDsl.QueryDescriptor(QueryDescriptorAction), options);
		}
		else if (QueryValue is not null)
		{
			writer.WritePropertyName("query");
			JsonSerializer.Serialize(writer, QueryValue, options);
		}

		writer.WriteEndObject();
	}
}


text:
it('should alias index positions', function() {
  var elements = element.all(by.css('.example-init'));
  expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');
  expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');
  expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');
  expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');
});


text:
var should = require('chai').should();

describe('The authentication module', function () {
	it('Should work', function () {
		true.should.equal(true);
	});
});


text:
package com.btmura.android.reddit.app;

interface Refreshable {
  void refresh();
}


text:
/*
---

script: Assets.js

name: Assets

description: Provides methods to dynamically load JavaScript, CSS, and Image files into the document.

license: MIT-style license

authors:
  - Valerio Proietti

requires:
  - Core/Element.Event
  - /MooTools.More

provides: [Assets]

...
*/

var Asset = {

	javascript: function(source, properties){
		properties = Object.append({
			onload: function(){},
			document: document,
			check: Function.from(true)
		}, properties);

		if (properties.onLoad) {
			properties.onload = properties.onLoad;
			delete properties.onLoad;
		}
		var script = new Element('script', {src: source, type: 'text/javascript'});

		var load = properties.onload.bind(script),
			check = properties.check,
			doc = properties.document;
		delete properties.onload;
		delete properties.check;
		delete properties.document;

		script.addEvents({
			load: load,
			readystatechange: function(){
				if (['loaded', 'complete'].contains(this.readyState)) load();
			}
		}).set(properties);

		if ((Browser.safari || Browser.chrome) && Browser.version == 2) {
			var checker = (function(){
				if (!Function.attempt(check)) return;
				clearInterval(checker);
				load();
			}).periodical(50);
		}

		return script.inject(doc.head);
	},

	css: function(source, properties){
		var onload = properties.onload || properties.onLoad;
		if (onload) {
			properties.events = properties.events || {};
			properties.events.load = onload;
			delete properties.onload;
			delete properties.onLoad;
		}
		return new Element('link', Object.merge({
			rel: 'stylesheet',
			media: 'screen',
			type: 'text/css',
			href: source
		}, properties)).inject(document.head);
	},

	image: function(source, properties){
		properties = Object.merge({
			onload: function(){},
			onabort: function(){},
			onerror: function(){}
		}, properties);
		var image = new Image();
		var element = document.id(image) || new Element('img');
		['load', 'abort', 'error'].each(function(name){
			var type = 'on' + name;
			var cap = name.capitalize();
			if (properties['on' + cap]) {
				properties[type] = properties['on' + cap];
				delete properties['on' + cap];
			}
			var event = properties[type];
			delete properties[type];
			image[type] = function(){
				if (!image) return;
				if (!element.parentNode){
					element.width = image.width;
					element.height = image.height;
				}
				image = image.onload = image.onabort = image.onerror = null;
				event.delay(1, element, element);
				element.fireEvent(name, element, 1);
			};
		});
		image.src = element.src = source;
		if (image && image.complete) image.onload.delay(1);
		return element.set(properties);
	},

	images: function(sources, options){
		options = Object.merge({
			onComplete: function(){},
			onProgress: function(){},
			onError: function(){},
			properties: {}
		}, options);
		sources = Array.from(sources);
		var images = [];
		var counter = 0;
		return new Elements(sources.map(function(source){
			return Asset.image(source, Object.append(options.properties, {
				onload: function(){
					options.onProgress.call(this, counter, sources.indexOf(source));
					counter++;
					if (counter == sources.length) options.onComplete();
				},
				onerror: function(){
					options.onError.call(this, counter, sources.indexOf(source));
					counter++;
					if (counter == sources.length) options.onComplete();
				}
			}));
		}));
	}

};


text:
package org.jfree.chart.junit;

import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;

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

import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.event.ChartChangeEvent;
import org.jfree.chart.event.ChartChangeListener;
import org.jfree.chart.labels.CategoryToolTipGenerator;
import org.jfree.chart.labels.StandardCategoryToolTipGenerator;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.CategoryItemRenderer;
import org.jfree.chart.urls.CategoryURLGenerator;
import org.jfree.chart.urls.StandardCategoryURLGenerator;
import org.jfree.data.Range;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.general.DatasetUtilities;

/**
 * Tests for a 3D bar chart.
 */
public class BarChart3DTests extends TestCase {

    /** The chart. */
    private JFreeChart chart;

    /**
     * Returns the tests as a test suite.
     *
     * @return The test suite.
     */
    public static Test suite() {
        return new TestSuite(BarChart3DTests.class);
    }

    /**
     * Constructs a new set of tests.
     *
     * @param name  the name of the tests.
     */
    public BarChart3DTests(String name) {
        super(name);
    }

    /**
     * Common test setup.
     */
    protected void setUp() {
        this.chart = createBarChart3D();
    }

    /**
     * Draws the chart with a null info object to make sure that no exceptions
     * are thrown (a problem that was occurring at one point).
     */
    public void testDrawWithNullInfo() {
        boolean success = false;
        try {
            BufferedImage image = new BufferedImage(200 , 100,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            this.chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null,
                    null);
            g2.dispose();
            success = true;
        }
        catch (Exception e) {
            success = false;
        }
        assertTrue(success);
    }

    /**
     * Replaces the dataset and checks that the data range is as expected.
     */
    public void testReplaceDataset() {

        // create a dataset...
        Number[][] data = new Integer[][]
            {{new Integer(-30), new Integer(-20)},
             {new Integer(-10), new Integer(10)},
             {new Integer(20), new Integer(30)}};

        CategoryDataset newData = DatasetUtilities.createCategoryDataset("S",
                "C", data);

        LocalListener l = new LocalListener();
        this.chart.addChangeListener(l);
        CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
        plot.setDataset(newData);
        assertEquals(true, l.flag);
        ValueAxis axis = plot.getRangeAxis();
        Range range = axis.getRange();
        assertTrue("Expecting the lower bound of the range to be around -30: "
                + range.getLowerBound(), range.getLowerBound() <= -30);
        assertTrue("Expecting the upper bound of the range to be around 30: "
                + range.getUpperBound(), range.getUpperBound() >= 30);

    }

    /**
     * Check that setting a tool tip generator for a series does override the
     * default generator.
     */
    public void testSetSeriesToolTipGenerator() {
        CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
        CategoryItemRenderer renderer = plot.getRenderer();
        StandardCategoryToolTipGenerator tt
                = new StandardCategoryToolTipGenerator();
        renderer.setSeriesToolTipGenerator(0, tt);
        CategoryToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0);
        assertTrue(tt2 == tt);
    }

    /**
     * Check that setting a URL generator for a series does override the
     * default generator.
     */
    public void testSetSeriesURLGenerator() {
        CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
        CategoryItemRenderer renderer = plot.getRenderer();
        StandardCategoryURLGenerator url1
                = new StandardCategoryURLGenerator();
        renderer.setSeriesItemURLGenerator(0, url1);
        CategoryURLGenerator url2 = renderer.getItemURLGenerator(0, 0);
        assertTrue(url2 == url1);
    }

    /**
     * Create a horizontal bar chart with sample data in the range -3 to +3.
     *
     * @return The chart.
     */
    private static JFreeChart createBarChart3D() {

        // create a dataset...
        Number[][] data = new Integer[][]
            {{new Integer(-3), new Integer(-2)},
             {new Integer(-1), new Integer(1)},
             {new Integer(2), new Integer(3)}};

        CategoryDataset dataset = DatasetUtilities.createCategoryDataset("S",
                "C", data);

        // create the chart...
        return ChartFactory.createBarChart3D("Bar Chart 3D", "Domain", "Range",
                dataset, PlotOrientation.HORIZONTAL, true, true, true);

    }

    /**
     * A chart change listener.
     *
     */
    static class LocalListener implements ChartChangeListener {

        /** A flag. */
        private boolean flag = false;

        /**
         * Event handler.
         *
         * @param event  the event.
         */
        public void chartChanged(ChartChangeEvent event) {
            this.flag = true;
        }

    }

}


text:
layout: post
title: Boyfriend Fucked With A Strap-on And Double Ended Dildo
titleinfo: pornvd
desc: Watch Boyfriend Fucked With A Strap-on And Double Ended Dildo. Pornhub is the ultimate xxx porn and sex site.
---

Boyfriend Fucked With A Strap-on And Double Ended Dildo

Watch Boyfriend Fucked With A Strap-on And Double Ended Dildo. Pornhub is the ultimate xxx porn and sex site.


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Heptinstall</title>

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

    <link href="css/stylish-portfolio.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700">

                      <button class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navcol-1">Toggle navigation</button>

Resume

My Story

Who's Bama?

What I do

Skills

Builds

Brian Heptinstall

Front-End Developer

The Life of Brian

Hi, I'm Brian Heptinstall, a front-end engineer in training. I'm a 2016 graduate of The Iron Yard, an immersive full-time web development course, where I spent more than 1,000 hours working on 34 projects. With an emphasis on HTML5, CSS3, Javascript, ReactJS, APIs and more, I'm keeping my skills up-to-date with the latest technology advances.

                  I love to code because of the teamwork involved in a large complex project, not unlike my past experience as a chef at Walt Disney World, Mar-A-Lago, and the Waldorf-Astoria.

                  Some of my hobbies include guitar and drums, loud music, poker, being outdoors, and of course, Alabama Football. It's why I got my nickname in Florida, "Bama"

At a Glance

                                    Education

The Iron Yard Front End Engineering Course: Completed Fall 2016

                                    Loading...

                                    Tech Skills

HTML5, CSS3, Bootstrap, JavaScript, jQuery, Reactjs, GitHub, Sass, WordPress and more.

                                    Extracurriculars

Guitar, camping, Alabama football, playing poker... oh, and hanging with my beautiful wife and chocolate Labrador.

Skills

HTML5

CSS3

JavaScript

Reactjs

My Work

A "one-off" build of the popular GIF site. This allows the user to search for GIF's and save the one's they
                                   like the most for later use.

My final project from Iron Yard. There are still issues with getting it live, but the gist was to allow
                                   a person to create their own account. They could search for other people on the site to join for dinner.
                                   Those two (or more) people would then decide what they wanna eat in a given are, then TryAngle would take
                                   their choices, find a common set of places, and send a notification to everyone as to where they will be eating!

Built primarily to see how to animate things on screen. This was always my favorite game!

This was part of a course I took online to help reinforce my JavaScript knowledge. Many functions built
                                  to track players, their scores, the dice and an eventual winner!

                    View More Items

Brian Heptinstall

Hoover, Alabama

 (205) 873-5866

 bheptin@gmail.com

Copyright © Bama 2017


text:
package com.streamsets.datacollector.restapi.rbean.lang;

public class RChar extends RValue<RChar, Character> {

  public RChar() {
    super(Type.RCHAR);
  }

  public RChar(Character character) {
    super(Type.RCHAR, character);
  }

}


text:
//! @file utils.h

//  Copyright 2016 PZ Read

//  Distributed under the MIT License.

/*

Utils header file.

*/

#include <stdio.h>
#include <unistd.h>

#ifndef INC_UTILS_H_
#define INC_UTILS_H_

#ifndef LOG_PREFIX
#define LOG_PREFIX "unknown"
#endif

#define ERR(fmt, ...) internal_err(LOG_PREFIX, fmt, ##__VA_ARGS__)
#define INFO(fmt, ...) internal_info(LOG_PREFIX, fmt, ##__VA_ARGS__)
#define DBG(fmt, ...) internal_dbg(LOG_PREFIX, fmt, ##__VA_ARGS__)

void internal_err(const char *prefix, const char *fmt, ...);
void internal_info(const char *prefix, const char *fmt, ...);
void internal_dbg(const char *prefix, const char *fmt, ...);

#endif // INC_UTILS_H_


text:
from thefuck import shells
import os
import tarfile

def _is_tar_extract(cmd):
    if '--extract' in cmd:
        return True

    cmd = cmd.split()

    return len(cmd) > 1 and 'x' in cmd[1]

def _tar_file(cmd):
    tar_extentions = ('.tar', '.tar.Z', '.tar.bz2', '.tar.gz', '.tar.lz',
                      '.tar.lzma', '.tar.xz', '.taz', '.tb2', '.tbz', '.tbz2',
                      '.tgz', '.tlz', '.txz', '.tz')

    for c in cmd.split():
        for ext in tar_extentions:
            if c.endswith(ext):
                return (c, c[0:len(c)-len(ext)])

def match(command, settings):
    return (command.script.startswith('tar')
            and '-C' not in command.script
            and _is_tar_extract(command.script)
            and _tar_file(command.script) is not None)

def get_new_command(command, settings):
    return shells.and_('mkdir -p {dir}', '{cmd} -C {dir}') \
                 .format(dir=_tar_file(command.script)[1], cmd=command.script)

def side_effect(command, settings):
    with tarfile.TarFile(_tar_file(command.script)[0]) as archive:
        for file in archive.getnames():
            os.remove(file)


text:
template <bool> struct sa;
template <> struct sa<true> {};

struct one   {long x[1];};
struct two   {long x[2];};

struct os
{
    one operator<<(int);
};

struct A
{
    A(int);
};

two operator<<(os&, const A&);

void test()
{
    os o;
    sa<sizeof(o << 1) == 1 * sizeof(long)> t1;  // Calls os::operator<<(int)
                                 // Would be ambiguous if the implicit object parameter
                                 // was an rvalue reference.
}

int main()
{
    return 0;
}


text:
package iso20022

// Details of the closing of the securities financing transaction.
type SecuritiesFinancing10 struct {

	// Date/Time at which rate change has taken place.
	RateChangeDate *ISODateTime `xml:"RateChngDt,omitempty"`

	// Specifies whether the rate is fixed or variable.
	RateType *RateType19Choice `xml:"RateTp,omitempty"`

	// Specifies whether the collateral position should be subject to automatic revaluation by the account servicer.
	Revaluation *Revaluation2Choice `xml:"Rvaltn,omitempty"`

	// Legal framework of the transaction.
	LegalFramework *LegalFramework1Code `xml:"LglFrmwk,omitempty"`

	// Identifies the computation method of accrued interest of the related financial instrument.
	InterestComputationMethod *InterestComputationMethod2Choice `xml:"IntrstCmptnMtd,omitempty"`

	// Index or support rate used together with the spread to calculate the repurchase rate.
	VariableRateSupport *RateName1 `xml:"VarblRateSpprt,omitempty"`

	// Repurchase rate used to calculate the repurchase amount.
	RepurchaseRate *Rate2 `xml:"RpRate,omitempty"`

	// Percentage mark-up on a loan consideration used to reflect the lender's risk.
	StockLoanMargin *Rate2 `xml:"StockLnMrgn,omitempty"`

	// Haircut or valuation factor on the security expressed as a percentage.
	SecuritiesHaircut *Rate2 `xml:"SctiesHrcut,omitempty"`

	// Interest rate to be paid on the transaction amount, as agreed between the counterparties.
	PricingRate *RateOrName1Choice `xml:"PricgRate,omitempty"`

	// Margin over or under an index that determines the repurchase rate, expressed as a rate or an amount.
	SpreadRate *SpreadRate1 `xml:"SprdRate,omitempty"`

	// Indicates whether or not the trade is callable.
	CallableTradeIndicator *YesNoIndicator `xml:"CllblTradInd,omitempty"`

	// Minimum number of days' notice a counterparty needs for terminating the transaction.
	TransactionCallDelay *Max3NumericText `xml:"TxCallDely,omitempty"`

	// Interest amount that has accrued in between two periods, for example, in between interest payment periods.
	AccruedInterestAmount *AmountAndDirection5 `xml:"AcrdIntrstAmt,omitempty"`

	// Interest rate that has been accrued in between coupon payment periods.
	AccruedInterestPercentage *PercentageRate `xml:"AcrdIntrstPctg,omitempty"`

	// Fixed amount of money that has to be paid (instead of interest) in the case of a recall or at the closing date.
	ForfeitAmount *AmountAndDirection5 `xml:"FrftAmt,omitempty"`

	// Difference between the amount of money of the first leg and the amount of the second leg of the transaction.
	PremiumAmount *AmountAndDirection5 `xml:"PrmAmt,omitempty"`

	// Amount of money to be settled per piece of collateral to close the transaction.
	ClosingAmountPerPiecesOfCollateral *AmountAndDirection5 `xml:"ClsgAmtPerPcsOfColl,omitempty"`

	// Indicates the total Number of collateral instructions involved in the transaction.
	TotalNumberOfCollateralInstructions *Max3NumericText `xml:"TtlNbOfCollInstrs,omitempty"`

	// Provides details for the securities financing transaction.
	FinancingAgreement *Agreement3 `xml:"FincgAgrmt,omitempty"`

	// Method applied to a lending transaction.
	LendingTransactionMethod *LendingTransactionMethod1Choice `xml:"LndgTxMtd,omitempty"`

	// Indicates if the contract is with or without an exchange of collateral.
	LendingWithCollateral *YesNoIndicator `xml:"LndgWthColl,omitempty"`

	// Identifies the underlying reason for the borrowing, for instance, sale on my behalf or on behalf of a third party.
	BorrowingReason *BorrowingReason1Choice `xml:"BrrwgRsn,omitempty"`

	// Indicates the type of collateral, for insatnce, security, bond, etc.
	CollateralType *CollateralType1Choice `xml:"CollTp,omitempty"`

	// Indicates whether or not the contract terms changed.
	ContractTermsModificationChanged *YesNoIndicator `xml:"CtrctTermsModChngd,omitempty"`

	// Interest rate to be paid as agreed between the counterparties.
	InterestRate *Rate2 `xml:"IntrstRate,omitempty"`

	// Rate to be paid by the Borrower to the Lender for the securities borrowed.
	BorrowingRate *Rate2 `xml:"BrrwgRate,omitempty"`

	// Method used to calculate the standard collateral amount.
	StandardCollateralRatio *Rate2 `xml:"StdCollRatio,omitempty"`

	// Percentage of earnings paid to shareholders in dividends.
	DividendRatio *Rate2 `xml:"DvddRatio,omitempty"`

	// Number of days the securities are lent or borrowed where the contract has an agreed closing date.
	NumberOfDaysLendingBorrowing *Number21Choice `xml:"NbOfDaysLndgBrrwg,omitempty"`

	// Specifies the standard collateral amount.
	StandardCollateralAmount *AmountAndDirection5 `xml:"StdCollAmt,omitempty"`

	// Interest rate tax that has been accrued in between coupon payment periods.
	AccruedInterestTax *YesNoIndicator `xml:"AcrdIntrstTax,omitempty"`

	// Number of days accrued at the instant of closing trade.
	EndNumberOfDaysAccrued *Max3Number `xml:"EndNbOfDaysAcrd,omitempty"`

	// End ratio of principal outstanding to the original balance.
	EndFactor *BaseOneRate `xml:"EndFctr,omitempty"`

	// Type of securities lending.
	SecuritiesLendingType *SecuritiesLendingType1Choice `xml:"SctiesLndgTp,omitempty"`

	// Indicates the possibility to terminate the securitiesc lending contract either by the borrower or lender before the expiration date.
	Reversible *Reversible1Choice `xml:"Rvsbl,omitempty"`

	// This is the minimum date at which the Borrower is allowed to give back the securities.
	MinimumDateForCallBack *ISODate `xml:"MinDtForCallBck,omitempty"`

	// Indicates that the contract can be rolled over.
	RollOver *YesNoIndicator `xml:"RollOver,omitempty"`

	// Indicates whether the securities lending fees can be paid periodically or at the end of the contract.
	PeriodicPayment *YesNoIndicator `xml:"PrdcPmt,omitempty"`

	// Indicates whether the trade is executed ex coupon.
	ExCoupon *YesNoIndicator `xml:"ExCpn,omitempty"`
}

func (s *SecuritiesFinancing10) SetRateChangeDate(value string) {
	s.RateChangeDate = (*ISODateTime)(&value)
}

func (s *SecuritiesFinancing10) AddRateType() *RateType19Choice {
	s.RateType = new(RateType19Choice)
	return s.RateType
}

func (s *SecuritiesFinancing10) AddRevaluation() *Revaluation2Choice {
	s.Revaluation = new(Revaluation2Choice)
	return s.Revaluation
}

func (s *SecuritiesFinancing10) SetLegalFramework(value string) {
	s.LegalFramework = (*LegalFramework1Code)(&value)
}

func (s *SecuritiesFinancing10) AddInterestComputationMethod() *InterestComputationMethod2Choice {
	s.InterestComputationMethod = new(InterestComputationMethod2Choice)
	return s.InterestComputationMethod
}

func (s *SecuritiesFinancing10) AddVariableRateSupport() *RateName1 {
	s.VariableRateSupport = new(RateName1)
	return s.VariableRateSupport
}

func (s *SecuritiesFinancing10) AddRepurchaseRate() *Rate2 {
	s.RepurchaseRate = new(Rate2)
	return s.RepurchaseRate
}

func (s *SecuritiesFinancing10) AddStockLoanMargin() *Rate2 {
	s.StockLoanMargin = new(Rate2)
	return s.StockLoanMargin
}

func (s *SecuritiesFinancing10) AddSecuritiesHaircut() *Rate2 {
	s.SecuritiesHaircut = new(Rate2)
	return s.SecuritiesHaircut
}

func (s *SecuritiesFinancing10) AddPricingRate() *RateOrName1Choice {
	s.PricingRate = new(RateOrName1Choice)
	return s.PricingRate
}

func (s *SecuritiesFinancing10) AddSpreadRate() *SpreadRate1 {
	s.SpreadRate = new(SpreadRate1)
	return s.SpreadRate
}

func (s *SecuritiesFinancing10) SetCallableTradeIndicator(value string) {
	s.CallableTradeIndicator = (*YesNoIndicator)(&value)
}

func (s *SecuritiesFinancing10) SetTransactionCallDelay(value string) {
	s.TransactionCallDelay = (*Max3NumericText)(&value)
}

func (s *SecuritiesFinancing10) AddAccruedInterestAmount() *AmountAndDirection5 {
	s.AccruedInterestAmount = new(AmountAndDirection5)
	return s.AccruedInterestAmount
}

func (s *SecuritiesFinancing10) SetAccruedInterestPercentage(value string) {
	s.AccruedInterestPercentage = (*PercentageRate)(&value)
}

func (s *SecuritiesFinancing10) AddForfeitAmount() *AmountAndDirection5 {
	s.ForfeitAmount = new(AmountAndDirection5)
	return s.ForfeitAmount
}

func (s *SecuritiesFinancing10) AddPremiumAmount() *AmountAndDirection5 {
	s.PremiumAmount = new(AmountAndDirection5)
	return s.PremiumAmount
}

func (s *SecuritiesFinancing10) AddClosingAmountPerPiecesOfCollateral() *AmountAndDirection5 {
	s.ClosingAmountPerPiecesOfCollateral = new(AmountAndDirection5)
	return s.ClosingAmountPerPiecesOfCollateral
}

func (s *SecuritiesFinancing10) SetTotalNumberOfCollateralInstructions(value string) {
	s.TotalNumberOfCollateralInstructions = (*Max3NumericText)(&value)
}

func (s *SecuritiesFinancing10) AddFinancingAgreement() *Agreement3 {
	s.FinancingAgreement = new(Agreement3)
	return s.FinancingAgreement
}

func (s *SecuritiesFinancing10) AddLendingTransactionMethod() *LendingTransactionMethod1Choice {
	s.LendingTransactionMethod = new(LendingTransactionMethod1Choice)
	return s.LendingTransactionMethod
}

func (s *SecuritiesFinancing10) SetLendingWithCollateral(value string) {
	s.LendingWithCollateral = (*YesNoIndicator)(&value)
}

func (s *SecuritiesFinancing10) AddBorrowingReason() *BorrowingReason1Choice {
	s.BorrowingReason = new(BorrowingReason1Choice)
	return s.BorrowingReason
}

func (s *SecuritiesFinancing10) AddCollateralType() *CollateralType1Choice {
	s.CollateralType = new(CollateralType1Choice)
	return s.CollateralType
}

func (s *SecuritiesFinancing10) SetContractTermsModificationChanged(value string) {
	s.ContractTermsModificationChanged = (*YesNoIndicator)(&value)
}

func (s *SecuritiesFinancing10) AddInterestRate() *Rate2 {
	s.InterestRate = new(Rate2)
	return s.InterestRate
}

func (s *SecuritiesFinancing10) AddBorrowingRate() *Rate2 {
	s.BorrowingRate = new(Rate2)
	return s.BorrowingRate
}

func (s *SecuritiesFinancing10) AddStandardCollateralRatio() *Rate2 {
	s.StandardCollateralRatio = new(Rate2)
	return s.StandardCollateralRatio
}

func (s *SecuritiesFinancing10) AddDividendRatio() *Rate2 {
	s.DividendRatio = new(Rate2)
	return s.DividendRatio
}

func (s *SecuritiesFinancing10) AddNumberOfDaysLendingBorrowing() *Number21Choice {
	s.NumberOfDaysLendingBorrowing = new(Number21Choice)
	return s.NumberOfDaysLendingBorrowing
}

func (s *SecuritiesFinancing10) AddStandardCollateralAmount() *AmountAndDirection5 {
	s.StandardCollateralAmount = new(AmountAndDirection5)
	return s.StandardCollateralAmount
}

func (s *SecuritiesFinancing10) SetAccruedInterestTax(value string) {
	s.AccruedInterestTax = (*YesNoIndicator)(&value)
}

func (s *SecuritiesFinancing10) SetEndNumberOfDaysAccrued(value string) {
	s.EndNumberOfDaysAccrued = (*Max3Number)(&value)
}

func (s *SecuritiesFinancing10) SetEndFactor(value string) {
	s.EndFactor = (*BaseOneRate)(&value)
}

func (s *SecuritiesFinancing10) AddSecuritiesLendingType() *SecuritiesLendingType1Choice {
	s.SecuritiesLendingType = new(SecuritiesLendingType1Choice)
	return s.SecuritiesLendingType
}

func (s *SecuritiesFinancing10) AddReversible() *Reversible1Choice {
	s.Reversible = new(Reversible1Choice)
	return s.Reversible
}

func (s *SecuritiesFinancing10) SetMinimumDateForCallBack(value string) {
	s.MinimumDateForCallBack = (*ISODate)(&value)
}

func (s *SecuritiesFinancing10) SetRollOver(value string) {
	s.RollOver = (*YesNoIndicator)(&value)
}

func (s *SecuritiesFinancing10) SetPeriodicPayment(value string) {
	s.PeriodicPayment = (*YesNoIndicator)(&value)
}

func (s *SecuritiesFinancing10) SetExCoupon(value string) {
	s.ExCoupon = (*YesNoIndicator)(&value)
}


text:
package bits.hidpunk.propedals;

/**
 * @author Philip DeCamp
 */
public interface ProPedalsListener {
    public void receivedProPedalEvent( int left, int right, int shift );
}


text:
package net.oschina.app.v2.activity.oauth;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.tonlin.osc.happy.R;

public class AuthorizeActivity extends ActionBarActivity {
	private static final String AUTHROIZE_URL = "http://www.oschina.net/action/oauth2/authorize?response_type=code&client_id=F6QtiYRetdUEwsYKYvNR&state=xyz&redirect_uri=http://my.oschina.net/u/142883";
	private WebView mWebView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.v2_activity_authorize);

		mWebView = (WebView) findViewById(R.id.webview);
		WebSettings settings = mWebView.getSettings();
		settings.setJavaScriptEnabled(true);
		mWebView.loadUrl(AUTHROIZE_URL);
		mWebView.setWebViewClient(new AuthorizeClient());
	}

	class AuthorizeClient extends WebViewClient {

		@Override
		public boolean shouldOverrideUrlLoading(WebView view, String url) {
			return super.shouldOverrideUrlLoading(view, url);
		}

		@Override
		public void onPageFinished(WebView view, String url) {
			super.onPageFinished(view, url);
		}

		@Override
		public void onReceivedError(WebView view, int errorCode,
				String description, String failingUrl) {
			super.onReceivedError(view, errorCode, description, failingUrl);
		}
	}
}


text:
yy::location loc;

//
// Tests for equals() method of AST nodes
//
TEST(EqualsTest, test_list_two_nodes) {
  AstListNode *ast1 = new AstListNode(loc, NodeType::BODY_ELEMENTS);
  ast1->add(new AstNode(loc, NodeType::PROVIDER));
  ast1->add(new AstNode(loc, NodeType::INIT));

  AstListNode *ast2 = new AstListNode(loc, NodeType::BODY_ELEMENTS);
  ast2->add(new AstNode(loc, NodeType::PROVIDER));
  ast2->add(new AstNode(loc, NodeType::INIT));

  EXPECT_EQ(true, ast1->equals(ast2));
  EXPECT_EQ(true, ast2->equals(ast1));
  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_list_two_nodes_not_equals) {
  AstListNode *ast1 = new AstListNode(loc, NodeType::BODY_ELEMENTS);
  ast1->add(new AstNode(loc, NodeType::PROVIDER));
  ast1->add(new AstNode(loc, NodeType::INIT));

  AstListNode *ast2 = new AstListNode(loc, NodeType::BODY_ELEMENTS);
  ast2->add(new AstNode(loc, NodeType::PROVIDER));
  ast2->add(new AstNode(loc, NodeType::RULE));

  EXPECT_EQ(false, ast1->equals(ast2));
  EXPECT_EQ(false, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_list_length_unequal) {
  AstListNode *ast1 = new AstListNode(loc, NodeType::BODY_ELEMENTS);
  ast1->add(new AstNode(loc, NodeType::PROVIDER));
  ast1->add(new AstNode(loc, NodeType::INIT));

  AstListNode *ast2 = new AstListNode(loc, NodeType::BODY_ELEMENTS);
  ast2->add(new AstNode(loc, NodeType::PROVIDER));
  ast1->add(new AstNode(loc, NodeType::INIT));
  ast1->add(new AstNode(loc, NodeType::INIT));

  EXPECT_EQ(false, ast1->equals(ast2));
  EXPECT_EQ(false, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_expression) {
  Expression *ast1 = new Expression(loc,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
      new IntAtom(loc, 50),
      ExpressionOperation::ADD
  );

  Expression *ast2 = new Expression(loc,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
      new IntAtom(loc, 50),
      ExpressionOperation::ADD
  );

  EXPECT_EQ(true, ast1->equals(ast2));
  EXPECT_EQ(true, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_expression_not_equal) {
  Expression *ast1 = new Expression(loc,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
      new IntAtom(loc, 10), // this values differs from ast2
      ExpressionOperation::ADD
  );

  Expression *ast2 = new Expression(loc,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
      new IntAtom(loc, 50),
      ExpressionOperation::ADD
  );

  EXPECT_EQ(false, ast1->equals(ast2));
  EXPECT_EQ(false, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_expression_wrong_balance) {
  Expression *ast1 = new Expression(loc,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
      new IntAtom(loc, 10),
      ExpressionOperation::ADD
  );

  Expression *ast2 = new Expression(loc,
      new Expression(loc,
          new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
          new IntAtom(loc, 10),
          ExpressionOperation::ADD
      ),
      new IntAtom(loc, 50),
      ExpressionOperation::ADD
  );

  EXPECT_EQ(false, ast1->equals(ast2));
  EXPECT_EQ(false, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_update_node) {
  UpdateNode *ast1 = new UpdateNode(loc,
      new FunctionAtom(loc, "x"),
      new Expression(loc,
          new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
          new IntAtom(loc, 50),
          ExpressionOperation::SUB
        )
  );

  UpdateNode *ast2 = new UpdateNode(loc,
      new FunctionAtom(loc, "x"),
      new Expression(loc,
          new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
          new IntAtom(loc, 50),
          ExpressionOperation::SUB
        )
  );

  EXPECT_EQ(true, ast1->equals(ast2));
  EXPECT_EQ(true, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_update_node_not_equal) {
  UpdateNode *ast1 = new UpdateNode(loc,
      new FunctionAtom(loc, "x"),
      new Expression(loc,
          new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD),
          new IntAtom(loc, 50),
          ExpressionOperation::SUB
        )
  );

  UpdateNode *ast2 = new UpdateNode(loc,
      new FunctionAtom(loc, "x"),
      new Expression(loc,
          nullptr,
          new IntAtom(loc, 50),
          ExpressionOperation::SUB
      )
  );

  EXPECT_EQ(false, ast1->equals(ast2));
  EXPECT_EQ(false, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_unary_node) {
  UnaryNode *ast1 = new UnaryNode(loc, NodeType::ENUM,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD)
  );

  UnaryNode *ast2 = new UnaryNode(loc, NodeType::ENUM,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD)
  );

  EXPECT_EQ(true, ast1->equals(ast2));
  EXPECT_EQ(true, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}

TEST(EqualsTest, test_unary_node_wrong_type) {
  UnaryNode *ast1 = new UnaryNode(loc, NodeType::ENUM,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD)
  );

  UnaryNode *ast2 = new UnaryNode(loc, NodeType::FUNCTION,
      new Expression(loc, nullptr, new IntAtom(loc, 10), ExpressionOperation::ADD)
  );

  EXPECT_EQ(false, ast1->equals(ast2));
  EXPECT_EQ(false, ast2->equals(ast1));

  delete ast1;
  delete ast2;
}


text:
uid: Lucene.Net.Migration.Guide
title: Apache Lucene.NET 4.8.0 Migration Guide
description: The Migration Guide for Lucene.NET 4.8.0
---

# Apache Lucene.NET 4.8.0 Migration Guide

## .NET API Conventions

Several Java conventions were replaced with their .NET counterparts:

* Classes suffixed with `Comparator` are now suffixed with `Comparer`.

* Most iterator classes were converted to .NET enumerators.

  * Instead of `Iterator()`, call `GetEnumerator()` (in some cases, it may be `GetIterator()`).

  * Instead of `HasNext()`, call `MoveNext()` however note that this will advance the position of the enumerator.

  * Instead of `Next()` the return value can be retrieved from the `Current` property after calling `MoveNext()`.

* Classes and members that include numeric type names now use the language-agnostic .NET name. For example:

  * Instead of `Short` or `GetShort()` use `Int16` or `GetInt16()`.

  * Instead of `Integer` or `GetInteger()` use `Int32` or `GetInt32()`.

  * Instead of `Long` or `GetLong()` use `Int64` or `GetInt64()`.

  * Instead of `Float` use `Single`. Note that `Lucene.Net.Queries.Function.ValueSources.SingleFunction` was renamed `Lucene.Net.Queries.Function.ValueSources.SingularFunction` to distinguish it from the `System.Single` data type.

* For collections, the `Size` property is now named `Count`.

* For arrays and files, the `Size` property is now named `Length`.

* For `IndexInput` and `IndexOutput` subclasses, `GetFilePointer()` method has been changed to a `Position` property to match `System.IO.FileStream.Position`.

* Some classes, enums, and interfaces have been de-nested from their original Lucene location to make them easier to find when using Intellisense.

* Some methods were lacking a verb, so the verb `Get` was added to make the method's function more clear. For example, instead of `Analysis.TokenStream()` we now have `Analysis.GetTokenStream()`.

## Four-dimensional enumerations

Flexible indexing changed the low level fields/terms/docs/positions
enumeration APIs.  Here are the major changes:

* Terms are now binary in nature (arbitrary `byte[]`), represented
  by the `BytesRef` class (which provides an offset + length "slice"
  into an existing `byte[]`).

* Fields are separately enumerated (`Fields.GetEnumerator()`) from the terms
  within each field (`TermEnum`).  So instead of this:
    ```cs
    TermEnum termsEnum = ...;
    while (termsEnum.Next())
    {
        Term t = termsEnum.Term;
        Console.WriteLine("field=" + t.Field + "; text=" + t.Text);
    }
    ```
    Do this:
    ```cs
    foreach (string field in fields)
    {
        Terms terms = fields.GetTerms(field);
        TermsEnum termsEnum = terms.GetEnumerator();
        BytesRef text;
        while(termsEnum.MoveNext())
        {
            Console.WriteLine("field=" + field + "; text=" + termsEnum.Current.Utf8ToString());
        }
    }
    ```

* `TermDocs` is renamed to `DocsEnum`.  Instead of this:
    ```cs
    while (td.Next())
    {
        int doc = td.Doc;
        ...
    }
    ```
    do this:
    ```cs
    int doc;
    while ((doc = td.Next()) != DocsEnum.NO_MORE_DOCS)
    {
        ...
    }
    ```
    Instead of this:
    ```cs
    if (td.SkipTo(target))
    {
        int doc = td.Doc;
        ...
    }
    ```
    do this:
    ```cs
    if ((doc = td.Advance(target)) != DocsEnum.NO_MORE_DOCS)
    {
        ...
    }
    ```

* `TermPositions` is renamed to `DocsAndPositionsEnum`, and no longer
  extends the docs only enumerator (`DocsEnum`).

* Deleted docs are no longer implicitly filtered from
  docs/positions enums.  Instead, you pass a `IBits`
  `SkipDocs` (set bits are skipped) when obtaining the enums.  Also,
  you can now ask a reader for its deleted docs.

* The docs/positions enums cannot seek to a term.  Instead,
  `TermsEnum` is able to seek, and then you request the
  docs/positions enum from that `TermsEnum`.

* `TermsEnum`'s seek method returns more information.  So instead of this:
    ```cs
    Term t;
    TermEnum termEnum = reader.Terms(t);
    if (t.Equals(termEnum.Term))
    {
        ...
    }
    ```
    do this:
    ```cs
    TermsEnum termsEnum = ...;
    BytesRef text;
    if (termsEnum.Seek(text) == TermsEnum.SeekStatus.FOUND)
    {
        ...
    }
    ```
    `SeekStatus` also contains `END` (enumerator is done) and `NOT_FOUND` (term was not found but enumerator is now positioned to the next term).

* `TermsEnum` has an `Ord` property, returning the long numeric
  ordinal (ie, first term is 0, next is 1, and so on) for the term
  it's not positioned to.  There is also a corresponding Seek(long
  ord) method.  Note that these members are optional; in
  particular the `MultiFields` `TermsEnum` does not implement them.

* How you obtain the enums has changed.  The primary entry point is
  the `Fields` class.  If you know your reader is a single segment
  reader, do this:
    ```cs
    Fields fields = reader.Fields();
    if (fields != null)
    {
        ...
    }
    ```
    If the reader might be multi-segment, you must do this:
    ```cs
    Fields fields = MultiFields.GetFields(reader);
    if (fields != null)
    {
        ...
    }
    ```
    The fields may be `null` (eg if the reader has no fields).

    Note that the `MultiFields` approach entails a performance hit on `MultiReaders`, as it must merge terms/docs/positions on the fly. It's generally better to instead get the sequential readers (use `Lucene.Net.Util.ReaderUtil`) and then step through those readers yourself, if you can (this is how Lucene drives searches).

    If you pass a `SegmentReader` to `MultiFields.GetFields()` it will simply return `reader.GetFields()`, so there is no performance hit in that case.

    Once you have a non-null `Fields` you can do this:
    ```cs
    Terms terms = fields.GetTerms("field");
    if (terms != null)
    {
        ...
    }
    ```
    The terms may be `null` (eg if the field does not exist).

    Once you have a non-null terms you can get an enum like this:
    ```cs
    TermsEnum termsEnum = terms.GetIterator();
    ```
    The returned `TermsEnum` will not be `null`.

    You can then .Next() through the TermsEnum, or Seek.  If you want a `DocsEnum`, do this:
    ```cs
    IBits liveDocs = reader.GetLiveDocs();
    DocsEnum docsEnum = null;

    docsEnum = termsEnum.Docs(liveDocs, docsEnum, needsFreqs);
    ```
    You can pass in a prior `DocsEnum` and it will be reused if possible.

    Likewise for `DocsAndPositionsEnum`.

    `IndexReader` has several sugar methods (which just go through the above steps, under the hood).  Instead of:
    ```cs
    Term t;
    TermDocs termDocs = reader.TermDocs;
    termDocs.Seek(t);
    ```
    do this:
    ```cs
    Term t;
    DocsEnum docsEnum = reader.GetTermDocsEnum(t);
    ```
    Likewise for `DocsAndPositionsEnum`.

## [LUCENE-2380](https://issues.apache.org/jira/browse/LUCENE-2380): FieldCache.GetStrings/Index --> FieldCache.GetDocTerms/Index

* The field values returned when sorting by `SortField.STRING` are now
  `BytesRef`.  You can call `value.Utf8ToString()` to convert back to
  string, if necessary.

* In `FieldCache`, `GetStrings` (returning `string[]`) has been replaced
  with `GetTerms` (returning a `BinaryDocValues` instance).
  `BinaryDocValues` provides a `Get` method, taking a `docID` and a `BytesRef`
  to fill (which must not be `null`), and it fills it in with the
  reference to the bytes for that term.

    If you had code like this before:
    ```cs
    string[] values = FieldCache.DEFAULT.GetStrings(reader, field);
    ...
    string aValue = values[docID];
    ```
    you can do this instead:
    ```cs
    BinaryDocValues values = FieldCache.DEFAULT.GetTerms(reader, field);
    ...
    BytesRef term = new BytesRef();
    values.Get(docID, term);
    string aValue = term.Utf8ToString();
    ```
    Note however that it can be costly to convert to `String`, so it's better to work directly with the `BytesRef`.

* Similarly, in `FieldCache`, GetStringIndex (returning a `StringIndex`
  instance, with direct arrays `int[]` order and `String[]` lookup) has
  been replaced with `GetTermsIndex` (returning a
  `SortedDocValues` instance).  `SortedDocValues` provides the
  `GetOrd(int docID)` method to lookup the int order for a document,
  `LookupOrd(int ord, BytesRef result)` to lookup the term from a given
  order, and the sugar method `Get(int docID, BytesRef result)`
  which internally calls `GetOrd` and then `LookupOrd`.

    If you had code like this before:
    ```cs
    StringIndex idx = FieldCache.DEFAULT.GetStringIndex(reader, field);
    ...
    int ord = idx.order[docID];
    String aValue = idx.lookup[ord];
    ```
    you can do this instead:
    ```cs
    DocTermsIndex idx = FieldCache.DEFAULT.GetTermsIndex(reader, field);
    ...
    int ord = idx.GetOrd(docID);
    BytesRef term = new BytesRef();
    idx.LookupOrd(ord, term);
    string aValue = term.Utf8ToString();
    ```
    Note however that it can be costly to convert to `String`, so it's better to work directly with the `BytesRef`.

    `DocTermsIndex` also has a `GetTermsEnum()` method, which returns an iterator (`TermsEnum`) over the term values in the index (ie, iterates ord = 0..NumOrd-1).

* `FieldComparator.StringComparatorLocale` has been removed.
  (it was very CPU costly since it does not compare using
  indexed collation keys; use CollationKeyFilter for better
  performance), since it converts `BytesRef` -> `String` on the fly.

* `FieldComparator.StringOrdValComparator` has been renamed to
  `FieldComparer.TermOrdValComparer`, and now uses `BytesRef` for its values.
  Likewise for `StringValComparator`, renamed to `TermValComparer`.
  This means when sorting by `SortField.STRING` or
  `SortField.STRING_VAL` (or directly invoking these comparers) the
  values returned in the `FieldDoc.Fields` array will be `BytesRef` not
  `String`.  You can call the `.Utf8ToString()` method on the `BytesRef`
  instances, if necessary.

## [LUCENE-2600](https://issues.apache.org/jira/browse/LUCENE-2600): `IndexReader`s are now read-only

Instead of `IndexReader.IsDeleted(int n)`, do this:

```cs
using Lucene.Net.Util;
using Lucene.Net.Index;

IBits liveDocs = MultiFields.GetLiveDocs(indexReader);
if (liveDocs != null && !liveDocs.Get(docID))
{
    // document is deleted...
}
```

## [LUCENE-2858](https://issues.apache.org/jira/browse/LUCENE-2858), [LUCENE-3733](https://issues.apache.org/jira/browse/LUCENE-3733): `IndexReader` --> `AtomicReader`/`CompositeReader`/`DirectoryReader` refactoring

The abstract class `IndexReader` has been
refactored to expose only essential methods to access stored fields
during display of search results. It is no longer possible to retrieve
terms or postings data from the underlying index, not even deletions are
visible anymore. You can still pass `IndexReader` as constructor parameter
to `IndexSearcher` and execute your searches; Lucene will automatically
delegate procedures like query rewriting and document collection atomic
subreaders.

If you want to dive deeper into the index and want to write own queries,
take a closer look at the new abstract sub-classes `AtomicReader` and
`CompositeReader`:

`AtomicReader` instances are now the only source of `Terms`, `Postings`,
`DocValues` and `FieldCache`. Queries are forced to execute on an `AtomicReader` on a per-segment basis and `FieldCache`s are keyed by
`AtomicReader`s.

Its counterpart `CompositeReader` exposes a utility method to retrieve
its composites. But watch out, composites are not necessarily atomic.
Next to the added type-safety we also removed the notion of
index-commits and version numbers from the abstract `IndexReader`, the
associations with `IndexWriter` were pulled into a specialized
`DirectoryReader`. To open `Directory`-based indexes use
`DirectoryReader.Open()`, the corresponding method in `IndexReader` is now
deprecated for easier migration. Only `DirectoryReader` supports commits,
versions, and reopening with `OpenIfChanged()`. Terms, postings,
docvalues, and norms can from now on only be retrieved using
`AtomicReader`; `DirectoryReader` and `MultiReader` extend `CompositeReader`,
only offering stored fields and access to the sub-readers (which may be
composite or atomic).

If you have more advanced code dealing with custom `Filter`s, you might
have noticed another new class hierarchy in Lucene (see [LUCENE-2831](https://issues.apache.org/jira/browse/LUCENE-2831)):
`IndexReaderContext` with corresponding Atomic-/`CompositeReaderContext`.

The move towards per-segment search Lucene 2.9 exposed lots of custom
`Query`s and `Filter`s that couldn't handle it. For example, some `Filter`
implementations expected the `IndexReader` passed in is identical to the
`IndexReader` passed to `IndexSearcher` with all its advantages like
absolute document IDs etc. Obviously this "paradigm-shift" broke lots of
applications and especially those that utilized cross-segment data
structures (like Apache Solr).

In Lucene 4.0, we introduce `IndexReaderContext`s "searcher-private"
reader hierarchy. During `Query` or `Filter` execution Lucene no longer
passes raw readers down `Query`s, `Filter`s or `Collector`s; instead
components are provided an `AtomicReaderContext` (essentially a hierarchy
leaf) holding relative properties like the document-basis in relation to
the top-level reader. This allows `Query`s and `Filter` to build up logic
based on document IDs, albeit the per-segment orientation.

There are still valid use-cases where top-level readers ie. "atomic
views" on the index are desirable. Let say you want to iterate all terms
of a complete index for auto-completion or faceting, Lucene provides
utility wrappers like `SlowCompositeReaderWrapper` ([LUCENE-2597](https://issues.apache.org/jira/browse/LUCENE-2597)) emulating
an `AtomicReader`. Note: using "atomicity emulators" can cause serious
slowdowns due to the need to merge terms, postings, `DocValues`, and
`FieldCache`, use them with care!

## [LUCENE-4306](https://issues.apache.org/jira/browse/LUCENE-4306): `GetSequentialSubReaders()`, `ReaderUtil.Gather()`

The method `IndexReader.GetSequentialSubReaders()` was moved to `CompositeReader`
(see [LUCENE-2858](https://issues.apache.org/jira/browse/LUCENE-2858), [LUCENE-3733](https://issues.apache.org/jira/browse/LUCENE-3733)) and made protected. It is solely used by `CompositeReader` itself to build its reader tree. To get all atomic leaves
of a reader, use `IndexReader.Leaves`, which also provides the doc base
of each leave. Readers that are already atomic return itself as leaf with
doc base 0. To emulate Lucene 3.x `GetSequentialSubReaders()`,
use `Context.Children`.

## [LUCENE-2413](https://issues.apache.org/jira/browse/LUCENE-2413),[LUCENE-3396](https://issues.apache.org/jira/browse/LUCENE-3396): Analyzer package changes Lucene's core and contrib analyzers, along with Solr's analyzers,
were consolidated into lucene/analysis. During the refactoring some
package names have changed, and `ReusableAnalyzerBase` was renamed to
`Analyzer`:

  - `Lucene.Net.Analysis.KeywordAnalyzer` -> `Lucene.Net.Analysis.Core.KeywordAnalyzer`
  - `Lucene.Net.Analysis.KeywordTokenizer` -> `Lucene.Net.Analysis.Core.KeywordTokenizer`
  - `Lucene.Net.Analysis.LetterTokenizer` -> `Lucene.Net.Analysis.Core.LetterTokenizer`
  - `Lucene.Net.Analysis.LowerCaseFilter` -> `Lucene.Net.Analysis.Core.LowerCaseFilter`
  - `Lucene.Net.Analysis.LowerCaseTokenizer` -> `Lucene.Net.Analysis.Core.LowerCaseTokenizer`
  - `Lucene.Net.Analysis.SimpleAnalyzer` -> `Lucene.Net.Analysis.Core.SimpleAnalyzer`
  - `Lucene.Net.Analysis.StopAnalyzer` -> `Lucene.Net.Analysis.Core.StopAnalyzer`
  - `Lucene.Net.Analysis.StopFilter` -> `Lucene.Net.Analysis.Core.StopFilter`
  - `Lucene.Net.Analysis.WhitespaceAnalyzer` -> `Lucene.Net.Analysis.Core.WhitespaceAnalyzer`
  - `Lucene.Net.Analysis.WhitespaceTokenizer` -> `Lucene.Net.Analysis.Core.WhitespaceTokenizer`
  - `Lucene.Net.Analysis.PorterStemFilter` -> `Lucene.Net.Analysis.En.PorterStemFilter`
  - `Lucene.Net.Analysis.ASCIIFoldingFilter` -> `Lucene.Net.Analysis.Miscellaneous.ASCIIFoldingFilter`
  - `Lucene.Net.Analysis.ISOLatin1AccentFilter` -> `Lucene.Net.Analysis.Miscellaneous.ISOLatin1AccentFilter`
  - `Lucene.Net.Analysis.KeywordMarkerFilter` -> `Lucene.Net.Analysis.Miscellaneous.KeywordMarkerFilter`
  - `Lucene.Net.Analysis.LengthFilter` -> `Lucene.Net.Analysis.Miscellaneous.LengthFilter`
  - `Lucene.Net.Analysis.PerFieldAnalyzerWrapper` -> `Lucene.Net.Analysis.Miscellaneous.PerFieldAnalyzerWrapper`
  - `Lucene.Net.Analysis.TeeSinkTokenFilter` -> `Lucene.Net.Analysis.Sinks.TeeSinkTokenFilter`
  - `Lucene.Net.Analysis.CharFilter` -> `Lucene.Net.Analysis.CharFilter.CharFilter`
  - `Lucene.Net.Analysis.BaseCharFilter` -> `Lucene.Net.Analysis.CharFilter.BaseCharFilter`
  - `Lucene.Net.Analysis.MappingCharFilter` -> `Lucene.Net.Analysis.CharFilter.MappingCharFilter`
  - `Lucene.Net.Analysis.NormalizeCharMap` -> `Lucene.Net.Analysis.CharFilter.NormalizeCharMap`
  - `Lucene.Net.Analysis.CharArraySet` -> `Lucene.Net.Analysis.Util.CharArraySet`
  - `Lucene.Net.Analysis.CharArrayMap` -> `Lucene.Net.Analysis.Util.CharArrayMap`
  - `Lucene.Net.Analysis.ReusableAnalyzerBase` -> `Lucene.Net.Analysis.Analyzer`
  - `Lucene.Net.Analysis.StopwordAnalyzerBase` -> `Lucene.Net.Analysis.Util.StopwordAnalyzerBase`
  - `Lucene.Net.Analysis.WordListLoader` -> `Lucene.Net.Analysis.Util.WordListLoader`
  - `Lucene.Net.Analysis.CharTokenizer` -> `Lucene.Net.Analysis.Util.CharTokenizer`
  - `Lucene.Net.Util.CharacterUtils` -> `Lucene.Net.Analysis.Util.CharacterUtils`

## [LUCENE-2514](https://issues.apache.org/jira/browse/LUCENE-2514): Collators

The option to use a Collator's order (instead of binary order) for
sorting and range queries has been moved to lucene/queries.
The Collated TermRangeQuery/Filter has been moved to SlowCollatedTermRangeQuery/Filter,
and the collated sorting has been moved to `SlowCollatedStringComparer`.

Note: this functionality isn't very scalable and if you are using it, consider
indexing collation keys with the collation support in the analysis module instead.

To perform collated range queries, use the collating analyzer: `ICUCollationKeyAnalyzer`, and set `qp.AnalyzeRangeTerms = true`.

`TermRangeQuery` and `TermRangeFilter` now work purely on bytes. Both have helper factory methods
(`NewStringRange`) similar to the `NumericRange` API, to easily perform range queries on `String`s.

## [LUCENE-2883](https://issues.apache.org/jira/browse/LUCENE-2883): `ValueSource` changes

Lucene's `Lucene.Net.Search.Function.ValueSource` based functionality, was consolidated
into `Lucene.Net`/`Lucene.Net.Queries` along with Solr's similar functionality.  The following classes were moved:

 - `Lucene.Net.Search.Function.CustomScoreQuery` -> `Lucene.Net.Queries.CustomScoreQuery`
 - `Lucene.Net.Search.Function.CustomScoreProvider` -> `Lucene.Net.Queries.CustomScoreProvider`
 - `Lucene.Net.Search.Function.NumericIndexDocValueSource` -> `Lucene.Net.Queries.Function.ValueSource.NumericIndexDocValueSource`

The following lists the replacement classes for those removed:

 - `Lucene.Net.Search.Function.DocValues` -> `Lucene.Net.Queries.Function.DocValues`
 - `Lucene.Net.Search.Function.FieldCacheSource` -> `Lucene.Net.Queries.Function.ValueSources.FieldCacheSource`
 - `Lucene.Net.Search.Function.FieldScoreQuery` ->`Lucene.Net.Queries.Function.FunctionQuery`
 - `Lucene.Net.Search.Function.FloatFieldSource` -> `Lucene.Net.Queries.Function.ValueSources.FloatFieldSource`
 - `Lucene.Net.Search.Function.IntFieldSource` -> `Lucene.Net.Queries.Function.ValueSources.IntFieldSource`
 - `Lucene.Net.Search.Function.OrdFieldSource` -> `Lucene.Net.Queries.Function.ValueSources.OrdFieldSource`
 - `Lucene.Net.Search.Function.ReverseOrdFieldSource` -> `Lucene.Net.Queries.Function.ValueSources.ReverseOrdFieldSource`
 - `Lucene.Net.Search.Function.ShortFieldSource` -> `Lucene.Net.Queries.Function.ValueSources.ShortFieldSource`
 - `Lucene.Net.Search.Function.ValueSource` -> `Lucene.Net.Queries.Function.ValueSource`
 - `Lucene.Net.Search.Function.ValueSourceQuery` -> `Lucene.Net.Queries.Function.FunctionQuery`

`DocValues` are now named `FunctionValues`, to not confuse with Lucene's per-document values.

## [LUCENE-2392](https://issues.apache.org/jira/browse/LUCENE-2392): Enable flexible scoring

The existing `Similarity` API is now `TFIDFSimilarity`, if you were extending
`Similarity` before, you should likely extend this instead.

`Weight.Normalize()` no longer takes a norm value that incorporates the top-level
boost from outer queries such as `BooleanQuery`, instead it takes 2 parameters,
the outer boost (`topLevelBoost`) and the norm. `Weight.SumOfSquaredWeights` has
been renamed to `Weight.GetValueForNormalization()`.

The `ScorePayload()` method now takes a `BytesRef`. It is never `null`.

## [LUCENE-3283](https://issues.apache.org/jira/browse/LUCENE-3283): Query parsers moved to separate module

Lucene's core `Lucene.Net.QueryParsers` query parsers have been consolidated into lucene/queryparser,
where other `QueryParser`s from the codebase will also be placed.  The following classes were moved:

  - `Lucene.Net.QueryParsers.CharStream` -> `Lucene.Net.QueryParsers.Classic.CharStream`
  - `Lucene.Net.QueryParsers.FastCharStream` -> `Lucene.Net.QueryParsers.Classic.FastCharStream`
  - `Lucene.Net.QueryParsers.MultiFieldQueryParser` -> `Lucene.Net.QueryParsers.Classic.MultiFieldQueryParser`
  - `Lucene.Net.QueryParsers.ParseException` -> `Lucene.Net.QueryParsers.Classic.ParseException`
  - `Lucene.Net.QueryParsers.QueryParser` -> `Lucene.Net.QueryParsers.Classic.QueryParser`
  - `Lucene.Net.QueryParsers.QueryParserBase` -> `Lucene.Net.QueryParsers.Classic.QueryParserBase`
  - `Lucene.Net.QueryParsers.QueryParserConstants` -> `Lucene.Net.QueryParsers.Classic.QueryParserConstants`
  - `Lucene.Net.QueryParsers.QueryParserTokenManager` -> `Lucene.Net.QueryParsers.Classic.QueryParserTokenManager`
  - `Lucene.Net.QueryParsers.QueryParserToken` -> `Lucene.Net.QueryParsers.Classic.Token`
  - `Lucene.Net.QueryParsers.QueryParserTokenMgrError` -> `Lucene.Net.QueryParsers.Classic.TokenMgrError`

## [LUCENE-2308](https://issues.apache.org/jira/browse/LUCENE-2308), [LUCENE-3453](https://issues.apache.org/jira/browse/LUCENE-3453): Separate `IndexableFieldType` from `Field` instances

With this change, the indexing details (indexed, tokenized, norms,
indexOptions, stored, etc.) are moved into a separate `FieldType`
instance (rather than being stored directly on the `Field`).

This means you can create the FieldType instance once, up front,
for a given field, and then re-use that instance whenever you instantiate
the Field.

Certain field types are pre-defined since they are common cases:

  * `StringField`: indexes a `String` value as a single token (ie, does
    not tokenize).  This field turns off norms and indexes only doc
    IDS (does not index term frequency nor positions).  This field
    does not store its value, but exposes `TYPE_STORED` as well.
  * `TextField`: indexes and tokenizes a `String`, `Reader` or `TokenStream`
    value, without term vectors.  This field does not store its value,
    but exposes `TYPE_STORED` as well.
  * `StoredField`: field that stores its value
  * `DocValuesField`: indexes the value as a `DocValues` field
  * `NumericField`: indexes the numeric value so that `NumericRangeQuery`
    can be used at search-time.

If your usage fits one of those common cases you can simply
instantiate the above class.  If you need to store the value, you can
add a separate `StoredField` to the document, or you can use
`TYPE_STORED` for the field:

```cs
Field f = new Field("field", "value", StringField.TYPE_STORED);
```

Alternatively, if an existing type is close to what you want but you
need to make a few changes, you can copy that type and make changes:

```cs
FieldType bodyType = new FieldType(TextField.TYPE_STORED)
{
    StoreTermVectors = true
};
```

You can of course also create your own `FieldType` from scratch:

```cs
FieldType t = new FieldType
{
    Indexed = true,
    Stored = true,
    OmitNorms = true,
    IndexOptions = IndexOptions.DOCS_AND_FREQS
};
t.Freeze();
```

`FieldType` has a `Freeze()` method to prevent further changes.

There is also a deprecated transition API, providing the same `Index`,
`Store`, `TermVector` enums from 3.x, and `Field` constructors taking these
enums.

When migrating from the 3.x API, if you did this before:

```cs
new Field("field", "value", Field.Store.NO, Field.Indexed.NOT_ANALYZED_NO_NORMS)
```

you can now do this:

```cs
new StringField("field", "value")
```

(though note that `StringField` indexes `DOCS_ONLY`).

If instead the value was stored:

```cs
new Field("field", "value", Field.Store.YES, Field.Indexed.NOT_ANALYZED_NO_NORMS)
```

you can now do this:

```cs
new Field("field", "value", TextField.TYPE_STORED)
```

If you didn't omit norms:

```cs
new Field("field", "value", Field.Store.YES, Field.Indexed.NOT_ANALYZED)
```

you can now do this:

```cs
FieldType ft = new FieldType(TextField.TYPE_STORED)
{
    OmitNorms = false
};
new Field("field", "value", ft)
```

If you did this before (value can be `String` or `TextReader`):

```cs
new Field("field", value, Field.Store.NO, Field.Indexed.ANALYZED)
```

you can now do this:

```cs
new TextField("field", value, Field.Store.NO)
```

If instead the value was stored:

```cs
new Field("field", value, Field.Store.YES, Field.Indexed.ANALYZED)
```

you can now do this:

```cs
new TextField("field", value, Field.Store.YES)
```

If in addition you omit norms:

```cs
new Field("field", value, Field.Store.YES, Field.Indexed.ANALYZED_NO_NORMS)
```

you can now do this:

```cs
FieldType ft = new FieldType(TextField.TYPE_STORED)
{
    OmitNorms = true
};
new Field("field", value, ft)
```

If you did this before (bytes is a `byte[]`):

```cs
new Field("field", bytes)
```

you can now do this:

```cs
new StoredField("field", bytes)
```

If you previously used the setter of `Document.Boost`, you must now pre-multiply
the document boost into each `Field.Boost`.  If you have a
multi-valued field, you should do this only for the first `Field`
instance (ie, subsequent Field instance sharing the same field name
should only include their per-field boost and not the document level
boost) as the boost for multi-valued field instances are multiplied
together by Lucene.

## Other changes

* [LUCENE-2674](https://issues.apache.org/jira/browse/LUCENE-2674):
  A new `IdfExplain` method was added to `Similarity` (which is now `TFIDFSimilarity`), that accepts an incoming docFreq.  If you subclass `TFIDFSimilarity`, make sure you also override this method on upgrade, otherwise your customizations won't run for certain `MultiTermQuery`s.

* [LUCENE-2691](https://issues.apache.org/jira/browse/LUCENE-2691): The near-real-time API has moved from `IndexWriter` to
  `DirectoryReader`.  Instead of `IndexWriter.GetReader()`, call
  `DirectoryReader.Open(IndexWriter)` or `DirectoryReader.OpenIfChanged(IndexWriter)`.

* [LUCENE-2690](https://issues.apache.org/jira/browse/LUCENE-2680): `MultiTermQuery` boolean rewrites per segment. Also `MultiTermQuery.GetTermsEnum()` now takes an `AttributeSource`. `FuzzyTermsEnum` is both consumer and producer of attributes: `MultiTermQuery.BoostAttribute` is added to the `FuzzyTermsEnum` and `MultiTermQuery`'s rewrite mode consumes it. The other way round `MultiTermQuery.TopTermsBooleanQueryRewrite` supplies a global `AttributeSource` to each segments `TermsEnum`. The `TermsEnum` is consumer and gets the current minimum competitive boosts (`MultiTermQuery.MaxNonCompetitiveBoostAttribute`).

* [LUCENE-2374](https://issues.apache.org/jira/browse/LUCENE-2374): The backwards layer in `Attribute` was removed. To support correct reflection of `Attribute` instances, where the reflection was done using deprecated `ToString()` parsing, you have to now override `ReflectWith()` to customize output. `ToString()` is no longer implemented by `Attribute`, so if you have overridden `ToString()`, port your customization over to `ReflectWith()`. `ReflectAsString()` would then return what `ToString()` did before.

* [LUCENE-2236](https://issues.apache.org/jira/browse/LUCENE-2236), [LUCENE-2912](https://issues.apache.org/jira/browse/LUCENE-2912): `DefaultSimilarity` can no longer be set statically
  (and dangerously) for the entire `AppDomain`.
  `Similarity` can now be configured on a per-field basis (via `PerFieldSimilarityWrapper`)
  `Similarity` has a lower-level API, if you want the higher-level vector-space API
  like in previous Lucene releases, then look at `TFIDFSimilarity`.

* [LUCENE-1076](https://issues.apache.org/jira/browse/LUCENE-1076): `TieredMergePolicy` is now the default merge policy.
  It's able to merge non-contiguous segments; this may cause problems
  for applications that rely on Lucene's internal document ID
  assignment.  If so, you should instead use `LogByteSize`/`DocMergePolicy`
  during indexing.

* [LUCENE-3722](https://issues.apache.org/jira/browse/LUCENE-3722): `Similarity` methods and collection/term statistics now take
  `long` instead of `int` (to enable distributed scoring of > 2B docs).
  For example, in `TFIDFSimilarity` `Idf(int, int)` is now `Idf(long, long)`.

* [LUCENE-3559](https://issues.apache.org/jira/browse/LUCENE-3559): The members `DocFreq()` and `MaxDoc` on `IndexSearcher` were removed,
  as these are no longer used by the scoring system.
  If you were using these casually in your code for reasons unrelated to scoring,
  call them on the `IndexSearcher`'s reader instead: `IndexSearcher.IndexReader`.
  If you were subclassing `IndexSearcher` and overriding these members to alter
  scoring, override `IndexSearcher`'s `TermStatistics()` and `CollectionStatistics()`
  methods instead.

* [LUCENE-3396](https://issues.apache.org/jira/browse/LUCENE-3396): `Analyzer.TokenStream()` has been renamed `Analyzer.GetTokenStream()`. `Analyzer.TokenStream()` has been made sealed. `.ReusableTokenStream()` has been removed.
  It is now necessary to use `Analyzer.GetTokenStreamComponents()` to define an analysis process.
  `Analyzer` also has its own way of managing the reuse of `TokenStreamComponents` (either
  globally, or per-field).  To define another `Strategy`, implement `ReuseStrategy`.

* [LUCENE-3464](https://issues.apache.org/jira/browse/LUCENE-3464): `IndexReader.Reopen()` has been renamed to
  `DirectoryReader.OpenIfChanged()` (a static method), and now returns `null`
  (instead of the old reader) if there are no changes to the index, to
  prevent the common pitfall of accidentally closing the old reader.

* [LUCENE-3687](https://issues.apache.org/jira/browse/LUCENE-3687): `Similarity.ComputeNorm()` now expects a `Norm` object to set the computed
  norm value instead of returning a fixed single byte value. Custom similarities can now
  set integer, float and byte values if a single byte is not sufficient.

* [LUCENE-2621](https://issues.apache.org/jira/browse/LUCENE-2621): Term vectors are now accessed via flexible indexing API.
  If you used `IndexReader.GetTermFreqVectors()` before, you should now
  use `IndexReader.GetTermVectors()`.  The new method returns a `Fields`
  instance exposing the inverted index of the one document.  From
  `Fields` you can enumerate all fields, terms, positions, offsets.

* [LUCENE-4227](https://issues.apache.org/jira/browse/LUCENE-4227): If you were previously using `Instantiated` index, you
  may want to use `DirectPostingsFormat` after upgrading: it stores all
  postings in simple arrays (`byte[]` for terms, `int[]` for docs, freqs,
  positions, offsets).  Note that this only covers postings, whereas
  `Instantiated` covered all other parts of the index as well.

* [LUCENE-3309](https://issues.apache.org/jira/browse/LUCENE-3309): The expert `FieldSelector` API has been replaced with
  `StoredFieldVisitor`.  The idea is the same (you have full control
  over which fields should be loaded).  Instead of a single accept
  method, `StoredFieldVisitor` has a `NeedsField()` method: if that method
  returns `true` then the field will be loaded and the appropriate
  type-specific method will be invoked with that fields's value.

* [LUCENE-4122](https://issues.apache.org/jira/browse/LUCENE-4122): Removed the `Payload` class and replaced with `BytesRef`.
  `PayloadAttribute`'s name is unchanged, it just uses the `BytesRef`
  class to refer to the payload bytes/start offset/end offset
  (or `null` if there is no payload).


text:
Beautiful and Effictive!

![medium-like-image-loading](https://cloud.githubusercontent.com/assets/1112181/23556535/e7e3dcac-0067-11e7-9894-a543a6964a7b.gif)

## Build Setup

```bash
# basic-like
cd basic-like

# install dependencies
npm install

open index.html in your browser
###########

# excellent-like
cd excellent-like
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
```

## Reference
0. [How Medium does progressive image loading](https://jmperezperez.com/medium-image-progressive-loading-placeholder/)
1. [Medium-like Image Loading with Vue.js (part 1)](https://www.theodo.fr/blog/2016/10/medium-like-image-loading-with-vue-js/)
2. [Medium-like Image Loading with Vue.js (part 2)](https://www.theodo.fr/blog/2017/02/medium-like-image-loading-with-vue-js-part-2/)