text:
class MultiCase::DSL
  #
  # @param  lhs [#===]
  # @param  rhs [#===]
  #
  def initialize(lhs, rhs)
    @lhs = lhs
    @rhs = rhs

    @result = nil
  end

  attr_reader :result

  #
  # A single case to which @lhs & @rhs are matched against
  # @param  from_to [Hash] @lhs is matched against keys, @rhs against values,
  #                        they both can be arrays
  # @param  &block [Object] User-specified result if both of parameters match
  #
  # @return [Object] Return-value of user-specified function
  def multi(from_to, &block)
    from = from_to.keys.flatten(1)
    from = [@lhs]  if from.empty?  # catch-all on empty array

    to = from_to.values.flatten(1)
    to = [@rhs]  if to.empty?

    if from.product(to).map(&method(:param_equal)).any?
      @result ||= block.call
    end
  end

  private

  #
  # Case-compares tuple against @lhs and @rhs
  # @param  arr [Array] Tuple to match against
  #
  # @return [Boolean]
  def param_equal(arr)
    f, t = arr
    (f === @lhs) && (t === @rhs)
  end
end


text:
const struct LeadAttributes LeadAttributes = {
	.crm_time_created = @"crm_time_created",
	.crm_time_modified = @"crm_time_modified",
	.lead_assigned_user_id = @"lead_assigned_user_id",
	.lead_assigned_user_name = @"lead_assigned_user_name",
	.lead_company = @"lead_company",
	.lead_company_annualrevenue = @"lead_company_annualrevenue",
	.lead_company_industry = @"lead_company_industry",
	.lead_company_noofemployees = @"lead_company_noofemployees",
	.lead_company_website = @"lead_company_website",
	.lead_description = @"lead_description",
	.lead_designation = @"lead_designation",
	.lead_email = @"lead_email",
	.lead_fax = @"lead_fax",
	.lead_firstname = @"lead_firstname",
	.lead_lastname = @"lead_lastname",
	.lead_lead_no = @"lead_lead_no",
	.lead_leadid = @"lead_leadid",
	.lead_leadsource = @"lead_leadsource",
	.lead_leadstatus = @"lead_leadstatus",
	.lead_mobile = @"lead_mobile",
	.lead_phone = @"lead_phone",
	.lead_rating = @"lead_rating",
	.lead_salutationtype = @"lead_salutationtype",
	.lead_yahooid = @"lead_yahooid",
	.my_custom_fields = @"my_custom_fields",
};

const struct LeadRelationships LeadRelationships = {
	.address = @"address",
	.service = @"service",
};

@implementation LeadID
@end

@implementation _Lead

+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ {
	NSParameterAssert(moc_);
	return [NSEntityDescription insertNewObjectForEntityForName:@"Lead" inManagedObjectContext:moc_];
}

+ (NSString*)entityName {
	return @"Lead";
}

+ (NSEntityDescription*)entityInManagedObjectContext:(NSManagedObjectContext*)moc_ {
	NSParameterAssert(moc_);
	return [NSEntityDescription entityForName:@"Lead" inManagedObjectContext:moc_];
}

- (LeadID*)objectID {
	return (LeadID*)[super objectID];
}

+ (NSSet*)keyPathsForValuesAffectingValueForKey:(NSString*)key {
	NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];

	if ([key isEqualToString:@"lead_company_annualrevenueValue"]) {
		NSSet *affectingKey = [NSSet setWithObject:@"lead_company_annualrevenue"];
		keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
		return keyPaths;
	}
	if ([key isEqualToString:@"lead_company_noofemployeesValue"]) {
		NSSet *affectingKey = [NSSet setWithObject:@"lead_company_noofemployees"];
		keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
		return keyPaths;
	}

	return keyPaths;
}

@dynamic crm_time_created;

@dynamic crm_time_modified;

@dynamic lead_assigned_user_id;

@dynamic lead_assigned_user_name;

@dynamic lead_company;

@dynamic lead_company_annualrevenue;

- (int16_t)lead_company_annualrevenueValue {
	NSNumber *result = [self lead_company_annualrevenue];
	return [result shortValue];
}

- (void)setLead_company_annualrevenueValue:(int16_t)value_ {
	[self setLead_company_annualrevenue:@(value_)];
}

- (int16_t)primitiveLead_company_annualrevenueValue {
	NSNumber *result = [self primitiveLead_company_annualrevenue];
	return [result shortValue];
}

- (void)setPrimitiveLead_company_annualrevenueValue:(int16_t)value_ {
	[self setPrimitiveLead_company_annualrevenue:@(value_)];
}

@dynamic lead_company_industry;

@dynamic lead_company_noofemployees;

- (int16_t)lead_company_noofemployeesValue {
	NSNumber *result = [self lead_company_noofemployees];
	return [result shortValue];
}

- (void)setLead_company_noofemployeesValue:(int16_t)value_ {
	[self setLead_company_noofemployees:@(value_)];
}

- (int16_t)primitiveLead_company_noofemployeesValue {
	NSNumber *result = [self primitiveLead_company_noofemployees];
	return [result shortValue];
}

- (void)setPrimitiveLead_company_noofemployeesValue:(int16_t)value_ {
	[self setPrimitiveLead_company_noofemployees:@(value_)];
}

@dynamic lead_company_website;

@dynamic lead_description;

@dynamic lead_designation;

@dynamic lead_email;

@dynamic lead_fax;

@dynamic lead_firstname;

@dynamic lead_lastname;

@dynamic lead_lead_no;

@dynamic lead_leadid;

@dynamic lead_leadsource;

@dynamic lead_leadstatus;

@dynamic lead_mobile;

@dynamic lead_phone;

@dynamic lead_rating;

@dynamic lead_salutationtype;

@dynamic lead_yahooid;

@dynamic my_custom_fields;

@dynamic address;

@dynamic service;

@end

redpajama_set_name: RedPajamaGithub


text:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.mandoline;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

import org.chromium.base.JNINamespace;
import org.chromium.base.Log;
import org.chromium.mojo.shell.ShellMain;

/**
 * Activity hosting the Mojo View Manager for Mandoline.
 */
@JNINamespace("mandoline")
public class MandolineActivity extends Activity {
    private static final String TAG = "cr.MandolineActivity";
    private static final String EXTRAS = "org.chromium.mandoline.extras";

    @Override
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        String[] parameters = getIntent().getStringArrayExtra(EXTRAS);
        if (parameters != null) {
            for (String s : parameters) {
                s = s.replace("\\,", ",");
            }
        }
        if (Intent.ACTION_VIEW.equals(getIntent().getAction())) {
            Uri uri = getIntent().getData();
            if (uri != null) {
                Log.i(TAG, "MandolineActivity opening " + uri);
                if (parameters == null) {
                    parameters = new String[] {uri.toString()};
                } else {
                    String[] newParameters = new String[parameters.length + 1];
                    System.arraycopy(parameters, 0, newParameters, 0, parameters.length);
                    newParameters[parameters.length] = uri.toString();
                    parameters = newParameters;
                }
            }
        }

        ShellMain.ensureInitialized(this, parameters);
        ShellMain.start();
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);

        if (Intent.ACTION_VIEW.equals(intent.getAction())) {
            Uri uri = intent.getData();
            if (uri != null) {
                Log.i(TAG, "MandolineActivity launching new intent for uri: " + uri);
                nativeLaunchURL(uri.toString());
            }
        }
    }

    private static native void nativeLaunchURL(String url);
}


text:
<?php

namespace CMSDoctrineExt\File;

interface File
{

    /**
     * @CMSDoctrineExt:File(directory="files")
     * dates which should be updated on insert only
     */

    /**
     * example
     *
     * @CMSDoctrineExt:File(directory="files")
     * @Column(type="string")
     * $image
     */
}


text:
namespace cppoptlib {

// we define a new problem for optimizing the rosenbrock function
// we use a templated-class rather than "auto"-lambda function for a clean architecture
template<typename T>
class Rosenbrock : public Problem<T, 2> {
  public:
    using typename Problem<T, 2>::TVector;
    using typename Problem<T, 2>::THessian;

    // this is just the objective (NOT optional)
    T value(const TVector &x) {
        const T t1 = (1 - x[0]);
        const T t2 = (x[1] - x[0] * x[0]);
        return   t1 * t1 + 100 * t2 * t2;
    }

    // if you calculated the derivative by hand
    // you can implement it here (OPTIONAL)
    // otherwise it will fall back to (bad) numerical finite differences
    void gradient(const TVector &x, TVector &grad) {
        grad[0]  = -2 * (1 - x[0]) + 200 * (x[1] - x[0] * x[0]) * (-2 * x[0]);
        grad[1]  =                   200 * (x[1] - x[0] * x[0]);
    }

    // same for hessian (OPTIONAL)
    // if you want ot use 2nd-order solvers, I encourage you to specify the hessian
    // finite differences usually (this implementation) behave bad
    void hessian(const TVector &x, THessian &hessian) {
        hessian(0, 0) = 1200 * x[0] * x[0] - 400 * x[1] + 1;
        hessian(0, 1) = -400 * x[0];
        hessian(1, 0) = -400 * x[0];
        hessian(1, 1) = 200;
    }

};

}
int main(int argc, char const *argv[]) {
    typedef float T;
    typedef cppoptlib::Rosenbrock<T> Rosenbrock;
    // initialize the Rosenbrock-problem
    Rosenbrock f;
    // choose a starting point
    Rosenbrock::TVector x(2); x << -1, 2;

    // first check the given derivative
    // there is output, if they are NOT similar to finite differences
    bool probably_correct = f.checkGradient(x);

    // choose a solver
    //cppoptlib::BfgsSolver<T> solver;
    //cppoptlib::ConjugatedGradientDescentSolver<T> solver;
    //cppoptlib::NewtonDescentSolver<T> solver;
    //cppoptlib::NelderMeadSolver<T> solver;
    cppoptlib::LbfgsSolver<Rosenbrock> solver;
    //cppoptlib::CMAesSolver<T> solver;
    // and minimize the function
    solver.minimize(f, x);
    // print argmin
    std::cout << "argmin      " << x.transpose() << std::endl;
    std::cout << "f in argmin " << f(x) << std::endl;

    return 0;
}


text:
using namespace IECore;
using namespace GafferCortex;

IE_CORE_DEFINERUNTIMETYPED( OpHolder )

OpHolder::OpHolder( const std::string &name )
	:	ParameterisedHolderComputeNode( name ), m_resultParameterHandler( 0 )
{
}

void OpHolder::setParameterised( IECore::RunTimeTypedPtr parameterised, bool keepExistingValues )
{
	OpPtr op = runTimeCast<Op>( parameterised );
	if( !op )
	{
		throw IECore::Exception( "Parameterised object is not an IECore::Op" );
	}
	ParameterisedHolderComputeNode::setParameterised( parameterised, keepExistingValues );

	m_resultParameterHandler = ParameterHandler::create( const_cast<Parameter *>( op->resultParameter() ) );
	if( !m_resultParameterHandler )
	{
		throw IECore::Exception( "Couldn't create handler for result parameter" );
	}

	Gaffer::ValuePlugPtr resultPlug = runTimeCast<Gaffer::ValuePlug>( m_resultParameterHandler->setupPlug( this, Gaffer::Plug::Out ) );
	if( !resultPlug )
	{
		throw IECore::Exception( "Result plug is not derived from ValuePlug" );
	}

	plugDirtiedSignal()( resultPlug.get() );
}

void OpHolder::setOp( const std::string &className, int classVersion, bool keepExistingValues )
{
	ParameterisedHolderComputeNode::setParameterised( className, classVersion, "IECORE_OP_PATHS", keepExistingValues );
}

IECore::Op *OpHolder::getOp( std::string *className, int *classVersion )
{
	return IECore::runTimeCast<IECore::Op>( getParameterised( className, classVersion ) );
}

const IECore::Op *OpHolder::getOp( std::string *className, int *classVersion ) const
{
	return IECore::runTimeCast<IECore::Op>( getParameterised( className, classVersion ) );
}

void OpHolder::affects( const Gaffer::Plug *input, AffectedPlugsContainer &outputs ) const
{
	Gaffer::ConstPlugPtr parametersPlug = getChild<Gaffer::Plug>( "parameters" );
	if( parametersPlug && parametersPlug->isAncestorOf( input ) )
	{
		const Gaffer::ValuePlug *resultPlug = getChild<Gaffer::ValuePlug>( "result" );
		if( resultPlug )
		{
			outputs.push_back( resultPlug );
		}
	}
}

void OpHolder::hash( const Gaffer::ValuePlug *output, const Gaffer::Context *context, IECore::MurmurHash &h ) const
{
	ParameterisedHolderComputeNode::hash( output, context, h );
	if( output->getName()=="result" )
	{
		std::string className;
		int classVersion;
		getParameterised( &className, &classVersion );
		h.append( className );
		h.append( classVersion );

		const Gaffer::ValuePlug *parametersPlug = getChild<Gaffer::ValuePlug>( "parameters" );
		if( parametersPlug )
		{
			parametersPlug->hash( h );
		}
	}
}

void OpHolder::compute( Gaffer::ValuePlug *output, const Gaffer::Context *context ) const
{
	if( output->getName()=="result" )
	{
		const_cast<CompoundParameterHandler *>( parameterHandler() )->setParameterValue();
		const_cast<Op *>( getOp() )->operate();
		m_resultParameterHandler->setPlugValue();
		return;
	}

	ParameterisedHolderComputeNode::compute( output, context );
}


text:
init: npm
	pip install -r requirements.txt
npm:
	pushd . && \
	cd nflstats/static && \
	npm install && \
	popd
clean:
	rm -f -v */*.pyc
	rm -rf **/__pycache__
test: pytest clean
pytest:
	py.test
run:
	python nflstats/nflinterface.py


text:
title: "1.1 changelog"
description: "Release notes for Sensu Core and Sensu Enterprise releases based
  on Sensu Core version 1.1.x"
version: 1.1
weight: 5
next:
  url: "faq.html"
  text: "Sensu FAQ"
---

# Changelog

## Releases

- [Core 1.1.0 Release Notes](#core-v1-1-0)

## Core 1.1.0 Release Notes {#core-v1-1-0}

Source: [GitHub.com][2]

**September 27, 2017** — Sensu Core version 1.1.0 has been released
	and is available for immediate download. Please note the following
	improvements:

### CHANGES {#core-v1-1-0-changes}

- **IMPORTANT**: Sensu packages include Ruby 2.4.1. Upgrading from
	releases of Sensu prior to 1.0.0 will require all plugin or
	extension gems to be re-installed under the new Ruby environment.

- **IMPORTANT**: Sensu packages include [sensu-plugin 2.0.0][3], which
	disables its deprecated filter methods by default, i.e.
	occurrences. Sensu releases since 1.0.0 include built-in filters
	that provide the same functionality with several improvements. The
	built-in filters are ["occurrences"][4] and
	["check_dependencies"][5]. To use the built-in filters, apply them
	to Sensu event handlers via their definition `"filters"`
	attribute, e.g. `"filters": ["occurrences",
	"check_dependencies"]`. These filters can now be used with Sensu
	event handlers that do not use the sensu-plugin library (or Ruby).

- **NEW**: Check hooks, commands run by the Sensu client in response to
	the result of the check command execution. The Sensu client will
	execute the appropriate configured hook command, depending on the
	check execution status (e.g. 1). Valid hook names include (in
	order of precedence): "1"-"255", "ok", "warning", "critical",
	"unknown", and "non-zero". The check hook command output, status,
	executed timestamp, and duration are captured and published in the
	check result. Check hook commands can optionally receive JSON
	serialized Sensu client and check definition data via STDIN.

- **NEW**: Check STDIN. A boolean check definition attribute, "stdin",
	when set to true instructs the Sensu client to write JSON
	serialized Sensu client and check definition data to the check
	command process STDIN. This attribute cannot be used with existing
	Sensu check plugins, nor Nagios plugins etc, as the Sensu client
	will wait indefinitely for the check process to read and close
	STDIN.

- **IMPROVEMENT**: Splayed proxy check request publishing. Users can now
	splay proxy check requests (optional), evenly, over a window of
	time, determined by the check interval and a configurable splay
	coverage percentage. For example, if a check has an interval of
	60s and a configured splay coverage of 90%, its proxy check
	requests would be splayed evenly over a time window of 60s * 90%,
	54s, leaving 6s for the last proxy check execution before the the
	next round of proxy check requests for the same check. Proxy check
	request splayed publishing can be configured with two new check
	definition attributes, within the proxy_requests scope, splay
	(boolean) to enable it and splay_coverage (integer percentage,
	defaults to 90).

- **IMPROVEMENT**: Configurable check output truncation (for storage in
	Redis). Check output truncation can be manually enabled/disabled
	with the check definition attribute "truncate_output",
	e.g."truncate_output": false. The output truncation length can be
	configured with the check definition attribute
	"truncate_output_length", e.g. "truncate_output_length": 1024.
	Check output truncation is still enabled by default for metric
	checks, with "type": "metric".

- **IMPROVEMENT**: Sensu client HTTP socket basic authentication can how
	be applied to all endpoints (not just /settings), via the client
	definition http_socket attribute "protect_all_endpoints", e.g.
	"protect_all_endpoints": true.

- **IMPROVEMENT**: Improved check TTL monitoring performance.

- **IMRPOVEMENT**: The Sensu extension run log event log level is now set
	to debug (instead of info) when the run output is empty and the
	status is 0.

- **BUGFIX**: Added initial timestamp to proxy client definitions. The
	Uchiwa and Sensu dashboards will no longer display "Invalid Date".

- **BUGFIX**: Deleting check history when deleting an associated check result.

[1]: https://github.com/sensu/sensu/blob/master/CHANGELOG.md
[2]: https://github.com/sensu/sensu/blob/master/CHANGELOG.md#110---2017-09-27
[3]: https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#v200---2017-03-29
[4]: https://github.com/sensu-extensions/sensu-extensions-occurrences
[5]: https://github.com/sensu-extensions/sensu-extensions-check-dependencies


text:
DROP SCHEMA IF EXISTS `GeoLocation`;

CREATE SCHEMA  `GeoLocation`;

USE `GeoLocation`;

CREATE TABLE `Country`
(
	`Id` int NOT NULL AUTO_INCREMENT,
	`Code` varchar(4) NOT NULL UNIQUE KEY,
	`LongCode` varchar(6) NOT NULL UNIQUE KEY,
	`NumericCode` int NOT NULL UNIQUE KEY,
	`EnglishName` varchar(120) NOT NULL,
	`FrenchName` varchar(120) NOT NULL,
	CONSTRAINT PK_Country PRIMARY KEY (`Id`)
);

CREATE TABLE `Location`
(
	`Id` int NOT NULL AUTO_INCREMENT,
	`LocationId` int NOT NULL UNIQUE KEY,
	`CountryCode` varchar(2) NOT NULL,
	`Region` varchar(60) NULL,
	`City` varchar(60) NULL,
	`PostalCode` varchar(25) NULL,
	`Latitude` double NULL,
	`Longitude` double NULL,
	`MetroCode` varchar(25) NULL,
	`AreaCode` varchar(25) NULL,
	`TimeZoneId` int NOT NULL DEFAULT 0,
	CONSTRAINT PK_Location PRIMARY KEY (`Id`)
);

CREATE TABLE `TimeZone`
(
	`Id` int NOT NULL AUTO_INCREMENT,
	`TimeZoneId` varchar(100) NOT NULL UNIQUE,
	`TimeZoneNameEnglish` varchar(200) NOT NULL,
	`TimeZoneNameSpanish` varchar(200) NOT NULL,
	`UtcOffSet` double NULL,
	`UtcDstOffSet` double NULL,
	CONSTRAINT PK_TimeZone PRIMARY KEY (`Id`)
);

CREATE TABLE `IpBlock`
(
	`Id` int NOT NULL AUTO_INCREMENT,
	`LocationId` int NOT NULL,
	`StartIpNumber` bigint unsigned NOT NULL,
	`EndIpNumber` bigint unsigned NOT NULL,
	CONSTRAINT PK_IpBlock PRIMARY KEY (`Id`)
);

CREATE INDEX IX_IpBlock_IpNumber ON IpBlock (StartIpNumber, EndIpNumber) USING BTREE;


text:
{% load i18n %}

{% trans "That contact is unavailable" %}

{% for group in visible_events.values %}
    {% if forloop.first %}

    {% endif %}

    {{ group.name }}

    {% if group.date %}

        {% ifequal group.date group.end_date %}
            {% trans "Date" %}: {{ group.date|date:"DATE_FORMAT" }}
        {% else %}
        {% blocktrans with start_date=group.date|date:"DATE_FORMAT" end_date=group.end_date|date:"DATE_FORMAT" %}Dates: From {{ start_date }} to {{ end_date }} included{% endblocktrans %} ({% blocktrans count days=group.get_duration %}1 day{% plural %}{{ days }} days{% endblocktrans %}).
            {% endifequal %}
    {% endif %}

    {% if group.description %}

        {{ group.description }}
    {% endif %}

    {% if forloop.last %}

    {% endif %}
{% endfor %}

{% if invisible_events %}
   {% if visible_events %}
      {% trans "And some events you don't have access to." %}
   {% else %}
      {% trans "Events you don't have access to." %}
   {% endif %}
{% endif %}
{# vim: set et ts=4 ft=htmldjango: #}


text:
set -e

mkdir -p android/libs/armeabi-v7a
mkdir -p android/obj/local/armeabi-v7a
CC="$NDK_ROOT/bin/arm-linux-androideabi-gcc"

if [ -z $GOANDROID ]
then
  GOANDROID="../go"
fi

CC=$CC GOPATH="`pwd`:$GOPATH" GOROOT="" GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=1 $GOANDROID/bin/go install $GOFLAGS -v -ldflags="-android -shared -extld $CC -extldflags '-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16'" -tags android hellogl2
cp bin/linux_arm/hellogl2 android/libs/armeabi-v7a/libhellogl2.so
cp bin/linux_arm/hellogl2 android/obj/local/armeabi-v7a/libhellogl2.so


text:
export const imageComponents: string;
export const dropBox: string;
export const imageCardBox: string;
export const uploadGrid: string;
export const iconUpload: string;
export const cardGrid: string;
export const modeSelect: string;
export const actived: string;
export const card: string;
export const buttons: string;
export const image: string;
export const deleteting: string;
export const deleteBox: string;


text:
package com.facebook.buck.cxx;

import com.facebook.buck.rules.AbstractBuildRule;
import com.facebook.buck.rules.AddToRuleKey;
import com.facebook.buck.rules.BuildContext;
import com.facebook.buck.rules.BuildRuleParams;
import com.facebook.buck.rules.BuildableContext;
import com.facebook.buck.rules.SourcePath;
import com.facebook.buck.rules.SourcePathResolver;
import com.facebook.buck.rules.Tool;
import com.facebook.buck.step.Step;
import com.facebook.buck.step.fs.MkdirStep;
import com.facebook.buck.step.fs.RmStep;
import com.google.common.collect.ImmutableList;

import java.nio.file.Path;

import javax.annotation.Nullable;

public class Lex extends AbstractBuildRule {

  @AddToRuleKey
  private final Tool lex;
  @AddToRuleKey
  private final ImmutableList<String> flags;
  @AddToRuleKey(stringify = true)
  private final Path outputSource;
  @AddToRuleKey(stringify = true)
  private final Path outputHeader;
  @AddToRuleKey
  private final SourcePath input;

  public Lex(
      BuildRuleParams params,
      SourcePathResolver resolver,
      Tool lex,
      ImmutableList<String> flags,
      Path outputSource,
      Path outputHeader,
      SourcePath input) {

    super(params, resolver);

    this.lex = lex;
    this.flags = flags;
    this.outputSource = outputSource;
    this.outputHeader = outputHeader;
    this.input = input;
  }

  @Override
  public ImmutableList<Step> getBuildSteps(
      BuildContext context,
      BuildableContext buildableContext) {

    // Cache the generated source and header.
    buildableContext.recordArtifact(outputHeader);
    buildableContext.recordArtifact(outputSource);

    return ImmutableList.of(
        new MkdirStep(getProjectFilesystem(), outputSource.getParent()),
        new RmStep(getProjectFilesystem(), outputSource, /* shouldForceDeletion */ true),
        new MkdirStep(getProjectFilesystem(), outputHeader.getParent()),
        new RmStep(getProjectFilesystem(), outputHeader, /* shouldForceDeletion */ true),
        new LexStep(
            getProjectFilesystem().getRootPath(),
            lex.getCommandPrefix(getResolver()),
            flags,
            outputSource,
            outputHeader,
            getResolver().getPath(input)));
  }

  @Nullable
  @Override
  public Path getPathToOutput() {
    return null;
  }

}


text:
package net.morimekta.providence.generator.format.java.shared;

import net.morimekta.providence.generator.GeneratorException;
import net.morimekta.providence.generator.format.java.utils.BlockCommentBuilder;
import net.morimekta.providence.generator.format.java.utils.JAnnotation;
import net.morimekta.providence.generator.format.java.utils.JUtils;
import net.morimekta.providence.reflect.contained.CEnumDescriptor;
import net.morimekta.providence.reflect.contained.CEnumValue;
import net.morimekta.providence.util.ThriftAnnotation;
import net.morimekta.util.io.IndentedPrintWriter;

import com.google.common.collect.ImmutableList;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/**
 * Base formatter for all enums.
 */
public class BaseEnumFormatter {
    private final IndentedPrintWriter       writer;
    private final List<EnumMemberFormatter> formatters;

    public BaseEnumFormatter(IndentedPrintWriter writer,
                             List<EnumMemberFormatter> formatters) {
        this.writer = writer;
        this.formatters = ImmutableList.copyOf(formatters);
    }

    public void appendEnumClass(CEnumDescriptor type) throws GeneratorException {
        String simpleClass = JUtils.getClassName(type);

        BlockCommentBuilder classComment = null;
        if (type.getDocumentation() != null) {
            classComment = new BlockCommentBuilder(writer);
            classComment.comment(type.getDocumentation());
        }

        String deprecatedReason = type.getAnnotationValue(ThriftAnnotation.DEPRECATED);
        if (deprecatedReason != null && deprecatedReason.trim().length() > 0) {
            if (classComment == null) {
                classComment = new BlockCommentBuilder(writer);
            } else {
                classComment.newline();
            }
            classComment.deprecated_(deprecatedReason);
        }
        if (classComment != null) {
            classComment.finish();
        }

        formatters.forEach(f -> f.appendClassAnnotations(type));

        writer.formatln("public enum %s", simpleClass)
              .begin();

        Set<String> impl = new LinkedHashSet<>();
        formatters.forEach(f -> impl.addAll(f.getExtraImplements(type)));
        if (impl.size() > 0) {
            writer.formatln("    implements ")
                  .begin(   "               ");
            boolean first = true;
            for (String i : impl) {
                if (first) {
                    first = false;
                } else {
                    writer.append(',').appendln();
                }
                writer.append(i);
            }
            writer.end();
        }

        writer.append(" {");

        appendEnumValues(type);
        appendEnumFields(type);
        appendEnumConstructor(type);

        formatters.forEach(f -> f.appendMethods(type));
        formatters.forEach(f -> f.appendExtraProperties(type));

        writer.end()
              .appendln('}')
              .newline();
    }

    private void appendEnumValues(CEnumDescriptor type) {
        for (CEnumValue v : type.getValues()) {
            if (v.getDocumentation() != null) {
                new BlockCommentBuilder(writer)
                        .comment(v.getDocumentation())
                        .finish();
            }
            if (JAnnotation.isDeprecated(v)) {
                writer.appendln(JAnnotation.DEPRECATED);
            }
            writer.formatln("%s(%d, \"%s\"),",
                            JUtils.enumConst(v),
                            v.asInteger(),
                            v.asString());
        }
        writer.appendln(';')
              .newline();
    }

    private void appendEnumFields(CEnumDescriptor type) {
        writer.appendln("private final int    mId;")
              .appendln("private final String mName;")
              .newline();
    }

    private void appendEnumConstructor(CEnumDescriptor type) {
        writer.formatln("%s(int id, String name) {", JUtils.getClassName(type))
              .begin()
              .appendln("mId = id;")
              .appendln("mName = name;")
              .end()
              .appendln("}")
              .newline();
    }
}


text:
set -uex

ACTIONS="$(dirname $0)/actions"
. "$ACTIONS/_environment.sh"

# TODO(kmaehashi): Tentatively sparsen parameterization to make test run complete.
export CUPY_TEST_FULL_COMBINATION="0"
export CUPY_INSTALL_USE_HIP=1

"$ACTIONS/build.sh"
"$ACTIONS/unittest.sh" "not slow and not multi_gpu"
"$ACTIONS/cleanup.sh"


text:
/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */
package net.sourceforge.pmd.rules.migration;

import net.sourceforge.pmd.ast.ASTAnnotation;
import net.sourceforge.pmd.ast.ASTBlock;
import net.sourceforge.pmd.ast.ASTBlockStatement;
import net.sourceforge.pmd.ast.ASTCatchStatement;
import net.sourceforge.pmd.ast.ASTClassOrInterfaceBodyDeclaration;
import net.sourceforge.pmd.ast.ASTMethodDeclaration;
import net.sourceforge.pmd.ast.ASTName;
import net.sourceforge.pmd.ast.ASTThrowStatement;
import net.sourceforge.pmd.ast.ASTTryStatement;
import net.sourceforge.pmd.ast.Node;
import net.sourceforge.pmd.ast.SimpleNode;
import net.sourceforge.pmd.rules.junit.AbstractJUnitRule;

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

/**
 * This rule finds code like this:
 *
 *

 * public void testFoo() {
 *     try {
 *         doSomething();
 *         fail("should have thrown an exception");
 *     } catch (Exception e) {
 *     }
 * }
 *

 *
 * In JUnit 4, use
 *
 *

 *  @Test(expected = Exception.class)
 *

 *
 * @author acaplan
 *
 */
public class JUnitUseExpected extends AbstractJUnitRule {

    public Object visit(ASTClassOrInterfaceBodyDeclaration node, Object data) {
        boolean inAnnotation = false;
        for (int i = 0; i < node.jjtGetNumChildren(); i++) {
            Node child = node.jjtGetChild(i);
            if (ASTAnnotation.class.equals(child.getClass())) {
                ASTName annotationName = ((SimpleNode) child).getFirstChildOfType(ASTName.class);
                if ("Test".equals(annotationName.getImage())) {
                    inAnnotation = true;
                    continue;
                }
            }
            if (ASTMethodDeclaration.class.equals(child.getClass())) {
                boolean isJUnitMethod = isJUnitMethod((ASTMethodDeclaration) child, data);
                if (inAnnotation || isJUnitMethod) {
                    List<SimpleNode> found = new ArrayList<SimpleNode>();
                    found.addAll((List<SimpleNode>) visit((ASTMethodDeclaration) child, data));
                    for (SimpleNode name : found) {
                        addViolation(data, name);
                    }
                }
            }
            inAnnotation = false;
        }

        return super.visit(node, data);
    }

    public Object visit(ASTMethodDeclaration node, Object data) {
        List<ASTTryStatement> catches = node.findChildrenOfType(ASTTryStatement.class);
        List<SimpleNode> found = new ArrayList<SimpleNode>();
        if (catches.isEmpty()) {
            return found;
        }
        for (ASTTryStatement trySt : catches) {
            ASTCatchStatement cStatement = getCatch(trySt);
            if (cStatement != null) {
                ASTBlock block = (ASTBlock) cStatement.jjtGetChild(1);
                if (block.jjtGetNumChildren() != 0) {
                    continue;
                }
                List<ASTBlockStatement> blocks = ((SimpleNode) trySt.jjtGetChild(0)).findChildrenOfType(ASTBlockStatement.class);
                if (blocks.isEmpty()) {
                    continue;
                }
                ASTBlockStatement st = blocks.get(blocks.size() - 1);
                ASTName name = st.getFirstChildOfType(ASTName.class);
                if (name != null && st.equals(name.getNthParent(5)) && "fail".equals(name.getImage())) {
                    found.add(name);
                    continue;
                }
                ASTThrowStatement th = st.getFirstChildOfType(ASTThrowStatement.class);
                if (th != null && st.equals(th.getNthParent(2))) {
                    found.add(th);
                    continue;
                }
            }
        }
        return found;
    }

    private ASTCatchStatement getCatch(Node n) {
        for (int i = 0; i < n.jjtGetNumChildren(); i++) {
            if (n.jjtGetChild(i) instanceof ASTCatchStatement) {
                return (ASTCatchStatement) n.jjtGetChild(i);
            }
        }
        return null;
    }
}


text:
from parlai.core.teachers import Teacher
from parlai.utils.io import PathManager
from .build import build

import json
import os
import random

def _path(opt, task_size='small'):
    """Return path to json file of dataset - it can be train/valid file
    of small/large dataset. Validation data is used for test as well,
    because labels are inferred from the image and task itself.
    """
    dt = opt['datatype'].split(':')[0]
    # ensure data is built
    build(opt)
    if dt == 'train':
        file_name = 'train.json'
    elif dt == 'valid' or dt == 'test':
        file_name = 'valid.json'
    else:
        raise RuntimeError('Not valid datatype.')

    data_path = os.path.join(opt['datapath'], 'taskntalk', task_size, file_name)
    return data_path

class AbstractTaskNTalk(Teacher):
    """
    TaskNTalk basic teacher, it picks a random image and associates a random task with
    it.

    Metric updates and observation are to be implemented.
    """

    def __init__(self, opt, shared=None):
        super().__init__(opt, shared)
        self.id = 'taskntalk'
        if not shared:
            self._setup_data(self.opt['datafile'])
        else:
            self.data = shared['data']
            self.task_defn = shared['task_defn']
            self.task_index = shared['task_index']

    def _setup_data(self, data_path):
        """
        Read the json file and store images and task definitions.
        """
        print('loading: ' + data_path)
        with PathManager.open(data_path) as data_file:
            json_data = json.load(data_file)
            self.data = json_data['data']
            self.task_defn = json_data['task_defn']
        # images are [color, shape, style] lists (example: ['red', 'square', 'dotted'])
        self.task_index = {'color': 0, 'shape': 1, 'style': 2}
        random.shuffle(self.data)

    def share(self):
        """
        Share images and task definitions with other teachers.
        """
        shared = super().share()
        shared['data'] = self.data
        shared['task_defn'] = self.task_defn
        shared['task_index'] = self.task_index
        return shared

    def __len__(self):
        return len(self.data)

    def observe(self, observation):
        """
        Process observation for metrics.
        """
        self.observation = observation
        # TODO(kd): update metrics
        return observation

    def act(self):
        """
        Select random image and associate random task with it.
        """
        image = random.choice(self.data)
        task = random.choice(self.task_defn)
        labels = [image[self.task_index[attr]] for attr in task]
        action = {
            'image': ' '.join(image),
            'text': ' '.join(task),
            'labels': [' '.join(labels)],
            'episode_done': True,
        }
        # TODO(kd): fetch all data for valid/test
        return action

class SmallTeacher(AbstractTaskNTalk):
    """
    Teacher for small dataset, invoked by ``taskntalk:small``.
    """

    def __init__(self, opt, shared=None):
        opt['datafile'] = _path(opt, 'small')
        super().__init__(opt, shared)

class LargeTeacher(AbstractTaskNTalk):
    """
    Teacher for large dataset, invoked by ``taskntalk:large``.
    """

    def __init__(self, opt, shared=None):
        opt['datafile'] = _path(opt, 'large')
        super().__init__(opt, shared)

class DefaultTeacher(SmallTeacher):
    """
    Default teacher for small dataset, invoked by ``taskntalk``.
    """

    pass


text:
if (CPPKAFKA_RDKAFKA_STATIC_LIB)
    set(RDKAFKA_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
    set(RDKAFKA_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
    set(RDKAFKA_LIBRARY_TYPE STATIC)
else()
    set(RDKAFKA_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
    set(RDKAFKA_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
    set(RDKAFKA_LIBRARY_TYPE SHARED)
endif()

set(RdKafka_LIBNAME ${RDKAFKA_PREFIX}rdkafka${RDKAFKA_SUFFIX})

find_path(RdKafka_INCLUDE_DIR
    NAMES librdkafka/rdkafka.h
    HINTS ${RdKafka_ROOT}/include
)

find_library(RdKafka_LIBRARY_PATH
    NAMES ${RdKafka_LIBNAME} rdkafka
    HINTS ${RdKafka_ROOT}/lib ${RdKafka_ROOT}/lib64
)

# Check lib paths
if (CPPKAFKA_CMAKE_VERBOSE)
    get_property(FIND_LIBRARY_32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
    get_property(FIND_LIBRARY_64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
    message(STATUS "RDKAFKA search 32-bit library paths: ${FIND_LIBRARY_32}")
    message(STATUS "RDKAFKA search 64-bit library paths: ${FIND_LIBRARY_64}")
    message(STATUS "RdKafka_ROOT = ${RdKafka_ROOT}")
    message(STATUS "RdKafka_INCLUDE_DIR = ${RdKafka_INCLUDE_DIR}")
    message(STATUS "RdKafka_LIBNAME = ${RdKafka_LIBNAME}")
    message(STATUS "RdKafka_LIBRARY_PATH = ${RdKafka_LIBRARY_PATH}")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(RdKafka DEFAULT_MSG
    RdKafka_LIBNAME
    RdKafka_LIBRARY_PATH
    RdKafka_INCLUDE_DIR
)

set(CONTENTS "#include <librdkafka/rdkafka.h>\n #if RD_KAFKA_VERSION >= ${RDKAFKA_MIN_VERSION_HEX}\n int main() { }\n #endif")
set(FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/rdkafka_version_test.cpp)
file(WRITE ${FILE_NAME} ${CONTENTS})

try_compile(RdKafka_FOUND ${CMAKE_CURRENT_BINARY_DIR}
            SOURCES ${FILE_NAME}
            CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${RdKafka_INCLUDE_DIR}")

if (RdKafka_FOUND)
    add_library(RdKafka::rdkafka ${RDKAFKA_LIBRARY_TYPE} IMPORTED GLOBAL)
    if (UNIX AND NOT APPLE)
        set(RDKAFKA_DEPENDENCIES pthread rt ssl crypto dl z)
    else()
        set(RDKAFKA_DEPENDENCIES pthread ssl crypto dl z)
    endif()
    set_target_properties(RdKafka::rdkafka PROPERTIES
            IMPORTED_NAME RdKafka
            IMPORTED_LOCATION "${RdKafka_LIBRARY_PATH}"
            INTERFACE_INCLUDE_DIRECTORIES "${RdKafka_INCLUDE_DIR}"
            INTERFACE_LINK_LIBRARIES "${RDKAFKA_DEPENDENCIES}")
    message(STATUS "Found valid rdkafka version")
    mark_as_advanced(
        RDKAFKA_LIBRARY
        RdKafka_INCLUDE_DIR
        RdKafka_LIBRARY_PATH
    )
else()
    message(FATAL_ERROR "Failed to find valid rdkafka version")
endif()


text:
package org.usfirst.frc4947.robot2015.commands;

import org.usfirst.frc4947.robot2015.subsystems.Elevator;

import edu.wpi.first.wpilibj.command.CommandGroup;

/**
 *
 */
public class ElevatorDown extends CommandGroup {

    public  ElevatorDown() {
    	//addSequential(new ElevatorPercent(0.25, Elevator.SLOWDOWN));
    	addSequential(new ElevatorPosition(Elevator.ACCEPT));
    }
}


text:
using System;
using System.Collections.Generic;
using Assets.Scripts.Scenes.Map.Tiling;
using UnityEngine;
using UtyMap.Unity;
using UtyMap.Unity.Animations.Time;
using Animation = UtyMap.Unity.Animations.Animation;

namespace Assets.Scripts.Scenes.Map.Animations
{
    /// <summary> Handles surface animations. </summary>
    internal sealed class SurfaceAnimator : SpaceAnimator
    {
        public SurfaceAnimator(TileController tileController) : base(tileController)
        {
        }

        /// <inheritdoc />
        protected override Animation CreateAnimationTo(GeoCoordinate coordinate, float zoom, TimeSpan duration, ITimeInterpolator timeInterpolator)
        {
            var position = Pivot.localPosition;
            var position2D = TileController.Projection.Project(coordinate, 0);
            return CreatePathAnimation(Pivot, duration, timeInterpolator, new List<Vector3>()
            {
                position,
                new Vector3(position2D.x, TileController.GetHeight(zoom), position2D.z)
            });
        }
    }
}


text:
var assert = require('assert');

describe('watch binding tests', function() {

    var url = 'http://localhost:9001/devstub/watch_binding.html';

    it("title test", function(done){
      var page = browser.url(url);
      page.getTitle(function(err,title) {
         assert.strictEqual(title,'watch_binding');
      });
      page.call(done);
    });

    it("watch test", function(done){
      var page = browser.url(url);
      page.setValue("[name=year]", "y");
      page.getText(".x-date-str", function(err, text){
        assert.strictEqual(text,'y-undefined-undefined:undefined');
      });
      page.setValue("[name=month]", "m");
      page.getText(".x-date-str", function(err, text){
        assert.strictEqual(text,'y-m-undefined:undefined');
      });
      page.setValue("[name=day]", "d");
      page.getText(".x-date-str", function(err, text){
        assert.strictEqual(text,'y-m-d:undefined');
      });
      page.setValue("[name=babe]", "bbb");
      page.getText(".x-date-str", function(err, text){
        assert.strictEqual(text,'y-m-d:bbb');
      });
      page.call(done);
    });

});


text:
namespace Microsoft.Data.OData.Atom
{
    #region Namespaces
    using System.Diagnostics;
    using System.Linq;
    using System.Xml;
    using Microsoft.Data.OData.Metadata;
    #endregion Namespaces

    /// <summary>
    /// OData ATOM deserializer for EPM.
    /// </summary>
    internal abstract class ODataAtomEpmDeserializer : ODataAtomMetadataDeserializer
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="atomInputContext">The ATOM input context to read from.</param>
        internal ODataAtomEpmDeserializer(ODataAtomInputContext atomInputContext)
            : base(atomInputContext)
        {
            DebugUtils.CheckNoExternalCallers();
        }

        /// <summary>
        /// Reads an extension element in non-ATOM namespace in the content of the entry element.
        /// </summary>
        /// <param name="entryState">The reader entry state for the entry being read.</param>
        /// <returns>true if a mapping for the current custom element was found and the element was read; otherwise false.</returns>
        /// <remarks>
        /// Pre-Condition:  XmlNodeType.Element - the element in non-ATOM namespace to read.
        /// Post-Condition: Any                 - the node after the extension element which was read.
        /// </remarks>
        internal bool TryReadExtensionElementInEntryContent(IODataAtomReaderEntryState entryState)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(entryState != null, "entryState != null");
            this.AssertXmlCondition(XmlNodeType.Element);
            Debug.Assert(this.XmlReader.NamespaceURI != AtomConstants.AtomNamespace, "Only elements in non-ATOM namespace can be read by this method.");

            ODataEntityPropertyMappingCache cachedEpm = entryState.CachedEpm;
            if (cachedEpm == null)
            {
                return false;
            }

            EpmTargetPathSegment epmTargetPathSegment = cachedEpm.EpmTargetTree.NonSyndicationRoot;
            return this.TryReadCustomEpmElement(entryState, epmTargetPathSegment);
        }

        /// <summary>
        /// Reads an element for custom EPM.
        /// </summary>
        /// <param name="entryState">The reader entry state for the entry being read.</param>
        /// <param name="epmTargetPathSegment">The EPM target segment for the parent element to which the element belongs.</param>
        /// <returns>true if a mapping for the current custom element was found and the element was read; otherwise false.</returns>
        /// <remarks>
        /// Pre-Condition:  XmlNodeType.Element - the element to read.
        /// Post-Condition: Any                 - the node after the element which was read.
        ///
        /// The method works on any element, it checks if the element should be used for EPM or not.
        /// </remarks>
        private bool TryReadCustomEpmElement(IODataAtomReaderEntryState entryState, EpmTargetPathSegment epmTargetPathSegment)
        {
            Debug.Assert(entryState != null, "entryState != null");
            this.AssertXmlCondition(XmlNodeType.Element);
            Debug.Assert(epmTargetPathSegment != null, "epmTargetPathSegment != null");

            string localName = this.XmlReader.LocalName;
            string namespaceUri = this.XmlReader.NamespaceURI;
            EpmTargetPathSegment elementSegment = epmTargetPathSegment.SubSegments.FirstOrDefault(
                segment => !segment.IsAttribute &&
                string.CompareOrdinal(segment.SegmentName, localName) == 0 &&
                string.CompareOrdinal(segment.SegmentNamespaceUri, namespaceUri) == 0);

            if (elementSegment == null)
            {
                // Skip elements that are not part of EPM
                return false;
            }

            if (elementSegment.HasContent && entryState.EpmCustomReaderValueCache.Contains(elementSegment.EpmInfo))
            {
                // Skip elements for which we already have value.
                // Both WCF DS client and server will only read the first value from custom EPM for any given EPM info.
                // It also follows the behavior for syndication EPM, where we read only the first author if there are multiple (for example).
                // We don't want to try to parse such elements since the parsing itself may fail and we should not be failing on values
                // which we don't care about.
                return false;
            }

            while (this.XmlReader.MoveToNextAttribute())
            {
                this.ReadCustomEpmAttribute(entryState, elementSegment);
            }

            this.XmlReader.MoveToElement();

            if (elementSegment.HasContent)
            {
                string stringValue;

                // Read the value of the element.
                stringValue = this.ReadElementStringValue();

                entryState.EpmCustomReaderValueCache.Add(elementSegment.EpmInfo, stringValue);
            }
            else
            {
                if (!this.XmlReader.IsEmptyElement)
                {
                    // Move to the first child node of the element.
                    this.XmlReader.Read();

                    while (this.XmlReader.NodeType != XmlNodeType.EndElement)
                    {
                        switch (this.XmlReader.NodeType)
                        {
                            case XmlNodeType.EndElement:
                                break;

                            case XmlNodeType.Element:
                                if (!this.TryReadCustomEpmElement(entryState, elementSegment))
                                {
                                    this.XmlReader.Skip();
                                }

                                break;

                            default:
                                this.XmlReader.Skip();
                                break;
                        }
                    }
                }

                // Read the end element or the empty start element.
                this.XmlReader.Read();
            }

            return true;
        }

        /// <summary>
        /// Reads an attribute for custom EPM.
        /// </summary>
        /// <param name="entryState">The reader entry state for the entry being read.</param>
        /// <param name="epmTargetPathSegmentForElement">The EPM target segment for the element to which the attribute belongs.</param>
        /// <remarks>
        /// Pre-Condition:  XmlNodeType.Attribute - the attribute to read.
        /// Post-Condition: XmlNodeType.Attribute - the same attribute, the method doesn't move the reader.
        ///
        /// The method works on any attribute, it checks if the attribute should be used for EPM or not.
        /// </remarks>
        private void ReadCustomEpmAttribute(IODataAtomReaderEntryState entryState, EpmTargetPathSegment epmTargetPathSegmentForElement)
        {
            Debug.Assert(entryState != null, "entryState != null");
            this.AssertXmlCondition(XmlNodeType.Attribute);
            Debug.Assert(epmTargetPathSegmentForElement != null, "epmTargetPathSegmentForElement != null");

            string localName = this.XmlReader.LocalName;
            string namespaceUri = this.XmlReader.NamespaceURI;
            EpmTargetPathSegment attributeSegment = epmTargetPathSegmentForElement.SubSegments.FirstOrDefault(
                segment => segment.IsAttribute &&
                string.CompareOrdinal(segment.AttributeName, localName) == 0 &&
                string.CompareOrdinal(segment.SegmentNamespaceUri, namespaceUri) == 0);
            if (attributeSegment != null)
            {
                // Don't add values which we already have
                // Both WCF DS client and server will only read the first value from custom EPM for any given EPM info.
                // It also follows the behavior for syndication EPM, where we read only the first author if there are multiple (for example).
                if (!entryState.EpmCustomReaderValueCache.Contains(attributeSegment.EpmInfo))
                {
                    // Note that there's no way for an attribute to specify null value.
                    entryState.EpmCustomReaderValueCache.Add(attributeSegment.EpmInfo, this.XmlReader.Value);
                }
            }
        }
    }
}


text:
import { millisecondsInWeek } from '../constants/index'
import startOfISOWeek from '../startOfISOWeek/index'
import getTimezoneOffsetInMilliseconds from '../_lib/getTimezoneOffsetInMilliseconds/index'

/**
 * @name differenceInCalendarISOWeeks
 * @category ISO Week Helpers
 * @summary Get the number of calendar ISO weeks between the given dates.
 *
 * @description
 * Get the number of calendar ISO weeks between the given dates.
 *
 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
 *
 * @param dateLeft - the later date
 * @param dateRight - the earlier date
 * @returns the number of calendar ISO weeks
 *
 * @example
 * // How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?
 * const result = differenceInCalendarISOWeeks(
 *   new Date(2014, 6, 21),
 *   new Date(2014, 6, 6)
 * )
 * //=> 3
 */
export default function differenceInCalendarISOWeeks<DateType extends Date>(
  dirtyDateLeft: DateType | number,
  dirtyDateRight: DateType | number
): number {
  const startOfISOWeekLeft = startOfISOWeek(dirtyDateLeft)
  const startOfISOWeekRight = startOfISOWeek(dirtyDateRight)

  const timestampLeft =
    startOfISOWeekLeft.getTime() -
    getTimezoneOffsetInMilliseconds(startOfISOWeekLeft)
  const timestampRight =
    startOfISOWeekRight.getTime() -
    getTimezoneOffsetInMilliseconds(startOfISOWeekRight)

  // Round the number of days to the nearest integer
  // because the number of milliseconds in a week is not constant
  // (e.g. it's different in the week of the daylight saving time clock shift)
  return Math.round((timestampLeft - timestampRight) / millisecondsInWeek)
}


text:
layout: page
title: Norman Family Reunion
date: 2016-05-24
author: Walter Lindsey
tags: weekly links, java
status: published
summary: Vivamus congue ornare tortor vel.
banner: images/banner/wedding.jpg
booking:
  startDate: 01/18/2016
  endDate: 01/23/2016
  ctyhocn: SBTSAHX
  groupCode: NFR
published: true
---
Duis at elit at nisl feugiat euismod. In at felis lacinia neque dictum accumsan sit amet a neque. Nullam ac sapien velit. Sed volutpat tortor at egestas eleifend. Phasellus aliquam, augue ac viverra laoreet, justo mauris accumsan ex, sed sagittis justo erat eu dui. Mauris fermentum lorem in tincidunt vulputate. Phasellus quis finibus arcu, a suscipit felis. Sed dapibus et nulla ac dapibus. Nullam finibus elementum quam, et lacinia dui vehicula id.

* Aenean et ex hendrerit, volutpat orci vitae, tempor odio
* In auctor risus vel porta commodo
* Sed at arcu sit amet lacus posuere suscipit
* Aenean facilisis lectus ac mauris ornare aliquet
* Vivamus rhoncus libero eget leo placerat hendrerit
* Nunc sit amet ex facilisis, aliquam neque et, aliquam metus.

Nulla sapien justo, egestas id suscipit eu, vestibulum in augue. Proin in velit velit. Nunc eu elementum massa, nec dictum sapien. Aliquam faucibus leo non diam imperdiet facilisis. Mauris ullamcorper et leo ut varius. Nulla facilisi. Nam in tempor nibh, in sagittis elit.


text:
package de.yannicklem.shoppinglist.core.user.security.config;

import de.yannicklem.shoppinglist.core.ShoppingListSecurityProperties;
import de.yannicklem.shoppinglist.core.user.entity.SLAuthority;
import de.yannicklem.shoppinglist.core.user.entity.SLUser;
import de.yannicklem.shoppinglist.core.user.persistence.SLUserService;

import org.apache.log4j.Logger;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.boot.context.properties.EnableConfigurationProperties;

import org.springframework.context.annotation.Configuration;

import org.springframework.http.HttpMethod;

import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.csrf.CsrfFilter;
import org.springframework.security.web.csrf.CsrfTokenRepository;
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository;

import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

import javax.sql.DataSource;

import static org.apache.log4j.Logger.getLogger;

import static java.lang.invoke.MethodHandles.lookup;

@Configuration
@EnableConfigurationProperties(ShoppingListSecurityProperties.class)
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    private static final Logger LOGGER = getLogger(lookup().lookupClass());

    private final DataSource datasource;

    private final UserDetailsService slUserDetailsService;

    private final SLUserService slUserService;

    private final ShoppingListSecurityProperties securityProperties;

    @Autowired
    public SecurityConfig(DataSource datasource, UserDetailsService slUserDetailsService, SLUserService slUserService,
        ShoppingListSecurityProperties securityProperties) {

        this.slUserService = slUserService;
        this.datasource = datasource;
        this.slUserDetailsService = slUserDetailsService;
        this.securityProperties = securityProperties;
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {

        http.httpBasic()
            .and()
            .authorizeRequests()
            .antMatchers(HttpMethod.POST, "/api/sLUsers")
            .permitAll()
            .antMatchers(HttpMethod.PUT, "/api/sLUsers/**")
            .permitAll()
            .antMatchers(HttpMethod.POST, "/logout")
            .permitAll()
            .antMatchers("/templates/**", "/lib/**", "/style/**", "/img/**", "/index.html", "/index-debug.html",
                    "/index-appcache.html", "/shoppinglist.appcache", "/",
                    "/**sw.js", "/ServiceWorkers.js", "/manifest.json")
            .permitAll()
            .anyRequest()
            .authenticated()
            .and()
            .logout()
            .logoutSuccessUrl("/#logout")
            .deleteCookies("JSESSIONID", "XSRF-TOKEN")
            .and()
            .csrf()
            .disable();
    }

    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {

        auth.userDetailsService(slUserDetailsService).passwordEncoder(new BCryptPasswordEncoder());
        auth.jdbcAuthentication().dataSource(datasource);

        Optional<SLUser> currentAdminOptional = slUserService.findById("admin");

        currentAdminOptional.ifPresent(slUserService::delete);

        createDefaultAdminUser();
    }

    private void createDefaultAdminUser() {

        Set<SLAuthority> authorities = securityProperties.getAdmin()
                .getRole()
                .stream()
                .map(SLAuthority::new)
                .collect(Collectors.toSet());

        String password = securityProperties.getAdmin().getPassword();

        LOGGER.info("\n\nCreated initial admin password: \"" + password + "\"\n");

        SLUser slUser = new SLUser("admin", "Yannic", "Klem", password, securityProperties.getAdmin().getMail(), true,
                null, authorities);

        slUserService.create(slUser);
    }
}


text:
from steemapi.steemnoderpc import SteemNodeRPC
from pprint import pprint

rpc = SteemNodeRPC("wss://steemit.com/ws")

for a in rpc.stream("comment", start=1893850):
    pprint(a)


text:
<alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</alert>

Your account activated Click here to Login.

Your account not activated! Resend activation link!

<form ng-if="activatePass == true" class="form-horizontal" name="changepassForm" ng-submit="changepassForm.$valid" novalidate>

Create Password

		New Password*

			<input type="Password" id="password" class="form-control" name="password" ng-model="changepass.password" placeholder="Your Password" required>

				Your password is required.

		Retype Password *

			<input type="Password" id="confirmPassword" class="form-control" name="confirmPassword" ng-model="confirmPassword" placeholder="Confirm Your Password" ng-change="passMatch(changepass.password, confirmPassword)" required>

				Your confirm password is required.
				Confirm password does not match.

			<button type="submit" ng-disabled="changepassForm.$invalid" class="btn btn-success" ng-click="changePassword(changepass)">Save</button>

</form>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Catharinia pallida Sacc. & Speg.

### Remarks
null


text:
/** `Object#toString` result references. */
var funcTag = '[object Function]';

/** Used to detect host constructors (Safari > 5). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/**
 * Checks if `value` is object-like.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 */
function isObjectLike(value) {
    return !!value && typeof value == 'object';
}

/** Used for native method references. */
var objectProto = Object.prototype;

/** Used to resolve the decompiled source of functions. */
var fnToString = Function.prototype.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
 * of values.
 */
var objToString = objectProto.toString;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
    fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
        .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
    var value = object == null ? undefined : object[key];
    return isNative(value) ? value : undefined;
}

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
    // The use of `Object#toString` avoids issues with the `typeof` operator
    // in older versions of Chrome and Safari which return 'function' for regexes
    // and Safari 8 equivalents which return 'object' for typed array constructors.
    return isObject(value) && objToString.call(value) == funcTag;
}

/**
 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(1);
 * // => false
 */
function isObject(value) {
    // Avoid a V8 JIT bug in Chrome 19-20.
    // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
    var type = typeof value;
    return !!value && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is a native function.
 *
 * @static
 * @memberOf _
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
 * @example
 *
 * _.isNative(Array.prototype.push);
 * // => true
 *
 * _.isNative(_);
 * // => false
 */
function isNative(value) {
    if (value == null) {
        return false;
    }
    if (isFunction(value)) {
        return reIsNative.test(fnToString.call(value));
    }
    return isObjectLike(value) && reIsHostCtor.test(value);
}

module.exports = getNative;


text:
About Lean Canvas

Lean Canvas was created by Ash Maurya by adaptating the Business Model Canvas by Alexander Osterwalder as described in his book "Business Model Generation". This adaptation is more focused on how business models should be generated in the Lean Startup spirit.

Lean Canvas is an actionable and compact business plan format, based on problems, solutions, key metrics and competitive advantages.

While the structure is similar to the well-known Business Model Canvas, the sections headings have been exchanged to something
	more relevant to the Lean Startup and web-based app startups in general. The author describes the Lean Canvas and the ideas behind it on his website's Why Lean Canvas page.

About QuickCanvas

I created this tool mainly for my own purpose, I find this way of thinking about business models very handy, but prefer open-source
	software rather then the fee based one offered by the author.

 I also think that others might consider a good idea not uploading sound business ideas to anyone servers, so I designed the tool to be fully browser-based.


text:
=================
=== OpenStack ===
=================

OpenStack betikleri, kurulum adımları, sık kullanılan komutlar vs.


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- EN-Revision: 24249 -->
<!-- Reviewed: no -->
<sect1 id="zend.test.phpunit.db" xmlns:xi="http://www.w3.org/2001/XInclude">
    <title>Zend_Test_PHPUnit_Db</title>

    <para>
        Die Kopplung von Datenzugriff und dem Domain Modell benötigt oft die Verwendung einer
        Datenbank für Testzwecke. Aber die Datenbank ist persistent über alle Tests was dazu
        führen kann das die Test Resultate sich gegenseitig beeinflussen. Weiters ist das
        Setup der Datenbank eine ganz schöne Arbeit damit die Tests laufen können. PHPUnit's
        Datenbank Extension vereinfacht das Testen mit einer Datenbank durch das Anbieten eines
        einfachen Mechanismus für das Setup und Herunterfahren der Datenbank zwischen den
        unterschiedlichen Tests. Diese Komponente erweitert die PHPUnit Datenbank Extension
        mit Zend Framework spezifischem Code, damit das Schreiben von Datenbank Tests für
        Zend Framework Anwendungen vereinfacht wird.
    </para>

    <para>
        Das Testen von Datenbanken kann mit zwei konzeptionellen Einträgen beschrieben werden,
        DataSets und DataTables. Intern kann die PHPUnit Datenbank Extension eine Objekt Struktur
        von einer Datenbank erstellen, und dessen Tabellen und enthaltene Zeilen von einer
        Konfigurationsdatei oder einer realen Datenbankinhalt. Dieser abstrakte Objektgraph kann
        dann verglichen werden indem Assertions verwendet werden. Ein üblicher Verwendungszweck
        beim Testen von Datenbanken ist das Setup von einigen Tabellen mit eingefügten Daten, in
        denen dann einige Operationen stattfinden, und letztendlich geprüft wird das der
        endgültige Datenbankstatus identisch mit dem vordefinierten und erwarteten Status ist.
        <classname>Zend_Test_PHPUnit_Db</classname> vereinfacht diese Aufgabe indem es erlaubt wird
        DataSets und DataTables von existierenden <classname>Zend_Db_Table_Abstract</classname>
        oder <classname>Zend_Db_Table_Rowset_Abstract</classname> Instanzen erstellt werden.
    </para>

    <para>
        Weiters erlaubt es diese Komponente jede <classname>Zend_Db_Adapter_Abstract</classname>
        für das Testen zu integrieren wobei die originale Erweiterung nur mit
        <acronym>PDO</acronym> arbeitet. Eine Implementation des Test Adapters für
        <classname>Zend_Db_Adapter_Abstract</classname> ist auch in dieser Komponente inkludiert.
        Sie erlaubt es einen Db Adapter zu instanziieren der überhaupt keine Datenbank benötigt und
        als <acronym>SQL</acronym> arbeitet sowie als Ergebnis Stack der von den
        <acronym>API</acronym> Methoden verwendet wird.
    </para>

    <xi:include href="Zend_Test-PHPUnit-Db-Quickstart.xml" />
    <xi:include href="Zend_Test-PHPUnit-Db-Testing.xml" />
    <xi:include href="Zend_Test-PHPUnit-Db-Adapter.xml" />
</sect1>


text:
package org.springframework.social.onedrive.api.impl;

import java.util.List;

import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference;
import org.springframework.social.onedrive.api.FriendlyNameOperations;
import org.springframework.social.onedrive.api.Metadata;
import org.springframework.web.client.RestTemplate;

public class FriendlyNameTemplate extends AbstractOnedriveOperations implements FriendlyNameOperations {

	private final RestTemplate restTemplate;

	public FriendlyNameTemplate(RestTemplate restTemplate, boolean isAuthorized) {
		super(isAuthorized);
		this.restTemplate = restTemplate;
	}

	@Override
	public List<Metadata> getCameraRoll() {

		return getMetadata(ME_CAMERA_ROLL_URL);
	}

	@Override
	public List<Metadata> getMyDocuments() {

		return getMetadata(ME_DOCUMENTS_URL);
	}

	@Override
	public List<Metadata> getMyPhotos() {

		return getMetadata(ME_PHOTOS_URL);
	}

	@Override
	public List<Metadata> getPublicDocuments() {

		return getMetadata(ME_PUBLIC_DOCUMENTS_URL);
	}

	@Override
	public List<Metadata> getRecentDocuments() {

		return getMetadata(ME_RECENT_DOCUMENTS_URL);
	}

	@Override
	public List<Metadata> getRootContents() {

		return getMetadata(ME_ROOT_CONTENTS_URL);
	}

	@Override
	public Metadata getOnedriveDirectory() {

		return restTemplate.getForObject(buildURI(ME_ONERIVE_DETAILS_URL), Metadata.class);
	}

	@Override
	public List<Metadata> getSharedDocuments() {
		return getMetadata(ME_SHARED_DOCUMENTS_URL);
	}

	//private helpers.
	private List<Metadata> getMetadata(String path) {

		ObjectMapper objectMapper = new ObjectMapper();
		JsonNode jsonNode = restTemplate.getForObject(buildURI(path), JsonNode.class);

		try {
			return objectMapper.readValue(jsonNode, new TypeReference<List<Metadata>>() {});
		} catch(Exception ex) {
			throw new RuntimeException(ex);
		}
	}

	//URL Constants.
	public static final String ME_DOCUMENTS_URL="/me/skydrive/my_documents";
	public static final String ME_CAMERA_ROLL_URL="/me/skydrive/camera_roll";
	public static final String ME_PHOTOS_URL="/me/skydrive/my_photos";
	public static final String ME_PUBLIC_DOCUMENTS_URL="/me/skydrive/public_documents";
	public static final String ME_RECENT_DOCUMENTS_URL="/me/skydrive/recent_docs";
	public static final String ME_ROOT_CONTENTS_URL="me/skydrive/files";
	public static final String ME_ONERIVE_DETAILS_URL="me/skydrive";
	public static final String ME_SHARED_DOCUMENTS_URL="me/skydrive/shared";
}


text:
module SharedInfrastructure
  module OutputHelpers
    # @param indent_string The string to use for indenting. Defaults to the
    # first character of `s`.
    # @param amount The number of `indent_string` to put at the start of each
    #   line. Default: 2.
    # @param indent_empty_lines Don't indent empty lines unless this is true.
    def indent(s, amount = 2, indent_string = nil, indent_empty_lines = false)
      indent_string = indent_string || s[/^[ \t]/] || " "
      re = indent_empty_lines ? /^/ : /^(?!$)/
      s.gsub(re, indent_string * amount)
    end
  end

  class Output < File
    def initialize(file_name, *args)
      super Output.file_name(file_name), *args
    end

    class << self
      ##
      # Fake root. If block is given, change the root only for the duration
      # of the block. If no block is given, is the same as configure.
      def fake_root(root = nil)
        if block_given?
          begin
            save_root = Output.root
            fake_root(root)
            result = yield
          ensure
            fake_root(save_root)
            result
          end
        else
          self.root = root
        end
      end

      def file_name(file_name)
        return file_name unless Output.root
        file_name = File.join(Output.root, file_name)
        FileUtils.mkdir_p(File.dirname(file_name))
        file_name
      end

      attr_accessor :root
    end
  end
end


text:
// ==========================================================
// CVS
// $Revision: 1.5 $
// $Date: 2009/02/20 07:41:08 $
// $Id: FIMETADATA.cs,v 1.5 2009/02/20 07:41:08 cklein05 Exp $
// ==========================================================

using System;
using System.Runtime.InteropServices;

namespace FreeImageAPI
{
	///
	/// The FIMETADATA structure is an unique search handle for metadata search operations.
	///
	/// <remarks>
	/// The FIMETADATA structure is usually returned by the
	/// <see cref="FreeImageAPI.FreeImage.FindFirstMetadata(FREE_IMAGE_MDMODEL, FIBITMAP, out FITAG)"/>
	/// function and then used on subsequent calls to
	/// <see cref="FreeImageAPI.FreeImage.FindNextMetadata(FIMETADATA, out FITAG)"/>.
	/// When the FIMETADATA handle is no longer used, it needs to be freed by the
	/// <see cref="FreeImageAPI.FreeImage.FindCloseMetadata(FIMETADATA)"/> function.
	/// </remarks>
	[Serializable, StructLayout(LayoutKind.Sequential)]
	public struct FIMETADATA : IComparable, IComparable<FIMETADATA>, IEquatable<FIMETADATA>
	{
		private IntPtr data;

		///
		/// A read-only field that represents a handle that has been initialized to zero.
		///
		public static readonly FIMETADATA Zero;

		///
		/// Tests whether two specified <see cref="FIMETADATA"/> structures are equivalent.
		///
		/// <param name="left">The <see cref="FIMETADATA"/> that is to the left of the equality operator.</param>
		/// <param name="right">The <see cref="FIMETADATA"/> that is to the right of the equality operator.</param>
		/// <returns>
		/// true if the two <see cref="FIMETADATA"/> structures are equal; otherwise, false.
		/// </returns>
		public static bool operator ==(FIMETADATA left, FIMETADATA right)
		{
			return (left.data == right.data);
		}

		///
		/// Tests whether two specified <see cref="FIMETADATA"/> structures are different.
		///
		/// <param name="left">The <see cref="FIMETADATA"/> that is to the left of the inequality operator.</param>
		/// <param name="right">The <see cref="FIMETADATA"/> that is to the right of the inequality operator.</param>
		/// <returns>
		/// true if the two <see cref="FIMETADATA"/> structures are different; otherwise, false.
		/// </returns>
		public static bool operator !=(FIMETADATA left, FIMETADATA right)
		{
			return (left.data != right.data);
		}

		///
		/// Gets whether the pointer is a null pointer or not.
		///
		/// <value>true if this <see cref="FIMETADATA"/> is a null pointer;
		/// otherwise, false.</value>
		public bool IsNull
		{
			get
			{
				return (data == IntPtr.Zero);
			}
		}

		///
		/// Sets the handle to null.
		///
		public void SetNull()
		{
			data = IntPtr.Zero;
		}

		///
		/// Converts the numeric value of the <see cref="FIMETADATA"/> object
		/// to its equivalent string representation.
		///
		/// <returns>The string representation of the value of this instance.</returns>
		public override string ToString()
		{
			return data.ToString();
		}

		///
		/// Returns a hash code for this <see cref="FIMETADATA"/> structure.
		///
		/// <returns>An integer value that specifies the hash code for this <see cref="FIMETADATA"/>.</returns>
		public override int GetHashCode()
		{
			return data.GetHashCode();
		}

		///
		/// Determines whether the specified <see cref="Object"/> is equal to the current <see cref="Object"/>.
		///
		/// <param name="obj">The <see cref="Object"/> to compare with the current <see cref="Object"/>.</param>
		/// <returns>true if the specified <see cref="Object"/> is equal to the current <see cref="Object"/>; otherwise, false.</returns>
		public override bool Equals(object obj)
		{
			return ((obj is FIMETADATA) && (this == ((FIMETADATA)obj)));
		}

		///
		/// Indicates whether the current object is equal to another object of the same type.
		///
		/// <param name="other">An object to compare with this object.</param>
		/// <returns>true if the current object is equal to the other parameter; otherwise, false.</returns>
		public bool Equals(FIMETADATA other)
		{
			return (this == other);
		}

		///
		/// Compares this instance with a specified <see cref="Object"/>.
		///
		/// <param name="obj">An object to compare with this instance.</param>
		/// <returns>A 32-bit signed integer indicating the lexical relationship between the two comparands.</returns>
		/// <exception cref="ArgumentException"><paramref name="obj"/> is not a <see cref="FIMETADATA"/>.</exception>
		public int CompareTo(object obj)
		{
			if (obj == null)
			{
				return 1;
			}
			if (!(obj is FIMETADATA))
			{
				throw new ArgumentException("obj");
			}
			return CompareTo((FIMETADATA)obj);
		}

		///
		/// Compares this instance with a specified <see cref="FIMETADATA"/> object.
		///
		/// <param name="other">A <see cref="FIMETADATA"/> to compare.</param>
		/// <returns>A signed number indicating the relative values of this instance
		/// and <paramref name="other"/>.</returns>
		public int CompareTo(FIMETADATA other)
		{
			return this.data.ToInt64().CompareTo(other.data.ToInt64());
		}
	}
}


text:
namespace TestHarness
{
    partial class Main
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.Devices = new System.Windows.Forms.ListBox();
            this.Refresh = new System.Windows.Forms.Button();
            this.Scan = new System.Windows.Forms.Button();
            this.Read = new System.Windows.Forms.Button();
            this.SuccessBeep = new System.Windows.Forms.Button();
            this.ErrorBeep = new System.Windows.Forms.Button();
            this.Output = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            //
            // Devices
            //
            this.Devices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.Devices.FormattingEnabled = true;
            this.Devices.Location = new System.Drawing.Point(0, 12);
            this.Devices.Name = "Devices";
            this.Devices.Size = new System.Drawing.Size(549, 147);
            this.Devices.TabIndex = 0;
            this.Devices.SelectedIndexChanged += new System.EventHandler(this.Devices_SelectedIndexChanged);
            this.Devices.DoubleClick += new System.EventHandler(this.Devices_DoubleClick);
            //
            // Refresh
            //
            this.Refresh.Location = new System.Drawing.Point(350, 164);
            this.Refresh.Name = "Refresh";
            this.Refresh.Size = new System.Drawing.Size(75, 23);
            this.Refresh.TabIndex = 1;
            this.Refresh.Text = "Refresh";
            this.Refresh.UseVisualStyleBackColor = true;
            this.Refresh.Click += new System.EventHandler(this.Refresh_Click);
            //
            // Scan
            //
            this.Scan.Location = new System.Drawing.Point(93, 164);
            this.Scan.Name = "Scan";
            this.Scan.Size = new System.Drawing.Size(75, 23);
            this.Scan.TabIndex = 2;
            this.Scan.Text = "Scan";
            this.Scan.UseVisualStyleBackColor = true;
            this.Scan.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Scan_MouseDown);
            this.Scan.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Scan_MouseUp);
            //
            // Read
            //
            this.Read.Location = new System.Drawing.Point(12, 164);
            this.Read.Name = "Read";
            this.Read.Size = new System.Drawing.Size(75, 23);
            this.Read.TabIndex = 3;
            this.Read.Text = "Read";
            this.Read.UseVisualStyleBackColor = true;
            this.Read.Click += new System.EventHandler(this.Read_Click);
            //
            // SuccessBeep
            //
            this.SuccessBeep.Location = new System.Drawing.Point(255, 164);
            this.SuccessBeep.Name = "SuccessBeep";
            this.SuccessBeep.Size = new System.Drawing.Size(89, 23);
            this.SuccessBeep.TabIndex = 4;
            this.SuccessBeep.Text = "Success Beep";
            this.SuccessBeep.UseVisualStyleBackColor = true;
            this.SuccessBeep.Click += new System.EventHandler(this.SuccessBeep_Click);
            //
            // ErrorBeep
            //
            this.ErrorBeep.Location = new System.Drawing.Point(174, 164);
            this.ErrorBeep.Name = "ErrorBeep";
            this.ErrorBeep.Size = new System.Drawing.Size(75, 23);
            this.ErrorBeep.TabIndex = 5;
            this.ErrorBeep.Text = "Error Beep";
            this.ErrorBeep.UseVisualStyleBackColor = true;
            this.ErrorBeep.Click += new System.EventHandler(this.ErrorBeep_Click);
            //
            // Output
            //
            this.Output.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.Output.Location = new System.Drawing.Point(0, 193);
            this.Output.Multiline = true;
            this.Output.Name = "Output";
            this.Output.Size = new System.Drawing.Size(549, 274);
            this.Output.TabIndex = 6;
            //
            // Main
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(549, 470);
            this.Controls.Add(this.Output);
            this.Controls.Add(this.ErrorBeep);
            this.Controls.Add(this.SuccessBeep);
            this.Controls.Add(this.Read);
            this.Controls.Add(this.Scan);
            this.Controls.Add(this.Refresh);
            this.Controls.Add(this.Devices);
            this.Name = "Main";
            this.Text = "Hid Test Harness";
            this.Load += new System.EventHandler(this.Main_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.ListBox Devices;
        private System.Windows.Forms.Button Refresh;
        private System.Windows.Forms.Button Scan;
        private System.Windows.Forms.Button Read;
        private System.Windows.Forms.Button SuccessBeep;
        private System.Windows.Forms.Button ErrorBeep;
        private System.Windows.Forms.TextBox Output;
    }
}


text:
/*
  Place all the styles related to the matching controller here.
  They will automatically be included in application.css.
*/

h1 {
  color: #3377FF;
}


text:
using namespace std::experimental;

auto token_sensitive_sig(const vector<string_view> &token_set, double c) -> multiset<string_view> {
    multiset<string_view> sigs;

    for (const string_view &t : token_set) {
        auto sig = q_gram_partition(t, 3);
        sigs.insert(sig.begin(), sig.end());
    }

    unordered_set<string_view> H;
    for (const auto &sig : sigs) {
        if (H.count(sig) == 0) {
            H.insert(sig);

            if (H.size() >= c) break;
        }
        sigs.erase(sigs.begin());
    }

    return sigs;
}

bool edit_distance_prune(int64_t len, int64_t partition_len, int64_t t_prime_partition_num, int64_t start, int64_t t_len,
                         int64_t t_prime_len, int64_t t_t2_edit_distance_threshold) {

    int64_t minimal_ed = abs(len - partition_len) + abs(t_prime_partition_num * partition_len - start)
            + abs((t_len - (start + len)) - (t_prime_len - (t_prime_partition_num + 1) * partition_len));

    return minimal_ed > t_t2_edit_distance_threshold;
}

bool duplication_prune(int64_t start, int64_t t_prime_partition_num, int64_t partition_len,
                       int64_t t_t2_edit_distance_threshold, int64_t t_prime_partition_count) {
    return start > t_prime_partition_num * partition_len + t_t2_edit_distance_threshold - 2 * (t_prime_partition_count - t_prime_partition_num - 1) ||
           start < t_prime_partition_num * partition_len - (t_t2_edit_distance_threshold - 2 * (t_prime_partition_count - t_prime_partition_num - 1));
}

unique_ptr<tuple<vector<string_view>, vector<string_view>>>
partition_ned(const string_view &t, const string_view &t_prime, double delta) {
    int64_t t_len = t.length();
    int64_t t_prime_len = t_prime.length();

    int64_t max_edit_distance = (int64_t) floor(((1 - delta) / delta) * t_prime_len);
    int64_t partition_count = (int64_t) ceil((max_edit_distance + 1) / (double) 2);
    int64_t partition_len = (int64_t) floor(t_prime_len / (double) partition_count);

    vector<string_view> t_prime_partitions;
    for (int64_t i = 0; i < partition_count; i++) {
        t_prime_partitions.push_back(t_prime.substr(i * partition_len, partition_len));
    }

    int64_t t_t2_edit_distance_threshold = (int64_t) ceil((1 - delta) * max(t_len, t_prime_len));
    int64_t zero = 0;
    int64_t token1_length_range_min = max(zero, min(t_len, partition_len - (int64_t) floor(t_t2_edit_distance_threshold / 2.0)));
    int64_t token1_length_range_max = max(zero, min(t_len, partition_len + (int64_t) ceil(t_t2_edit_distance_threshold / 2.0)));
    vector<string_view> token1_partitions;
    // CASE 1 first partition
    for (int64_t i = token1_length_range_min; i < token1_length_range_max; i++) {
        if (!edit_distance_prune(i, partition_len, 0, 0, t_len, t_prime_len, t_t2_edit_distance_threshold)) {
            token1_partitions.push_back(t.substr(0, i));
        }
    }
    // CASE 2 last partition
    for (int64_t i = token1_length_range_max - 1; i >= token1_length_range_min; i--) {
        if (!edit_distance_prune(i, partition_len, partition_count - 1, t_len - i, t_len, t_prime_len, t_t2_edit_distance_threshold)) {
            token1_partitions.push_back(t.substr(t_len - i, i));
        }
    }
    // CASE 3 middle partitions
    for (int64_t t_prime_partition_num = partition_count - 2; t_prime_partition_num > 0; t_prime_partition_num--) {
        for (int64_t start = min((int64_t) 1, t_prime_partition_num * partition_len - t_t2_edit_distance_threshold);
             start <= max(t_len - 1, t_prime_partition_num * partition_len + t_t2_edit_distance_threshold);
             start++) {
            for (int64_t len = token1_length_range_min; len < token1_length_range_max && len + start <= t_len; len++) {
                if (!edit_distance_prune(len, partition_len, t_prime_partition_num, start, t_len, t_prime_len, t_t2_edit_distance_threshold) &&
                    !duplication_prune(start, t_prime_partition_num, partition_len, t_t2_edit_distance_threshold, partition_count)) {
                    token1_partitions.push_back(t.substr(start, len));
                }
            }
        }
    }

    unique_ptr<tuple<vector<string_view>, vector<string_view>>> result(new tuple<vector<string_view>, vector<string_view>>(token1_partitions, t_prime_partitions));
    return result;
}


text:
package reporters_test

import (
	. "github.com/onsi/ginkgo"
	"github.com/onsi/ginkgo/config"
	"github.com/onsi/ginkgo/reporters"
	st "github.com/onsi/ginkgo/stenographer"
	"github.com/onsi/ginkgo/types"
	. "github.com/onsi/gomega"
	"time"
)

var _ = Describe("DefaultReporter", func() {
	var (
		reporter       *reporters.DefaultReporter
		reporterConfig config.DefaultReporterConfigType
		stenographer   *st.FakeStenographer

		ginkgoConfig config.GinkgoConfigType
		suite        *types.SuiteSummary
		example      *types.ExampleSummary
	)

	BeforeEach(func() {
		stenographer = st.NewFakeStenographer()
		reporterConfig = config.DefaultReporterConfigType{
			NoColor:           false,
			SlowSpecThreshold: 0.1,
			NoisyPendings:     true,
			Succinct:          true,
			Verbose:           true,
		}

		reporter = reporters.NewDefaultReporter(reporterConfig, stenographer)
	})

	call := func(method string, args ...interface{}) st.FakeStenographerCall {
		return st.NewFakeStenographerCall(method, args...)
	}

	Describe("SpecSuiteWillBegin", func() {
		BeforeEach(func() {
			suite = &types.SuiteSummary{
				SuiteDescription:              "A Sweet Suite",
				NumberOfTotalExamples:         10,
				NumberOfExamplesThatWillBeRun: 8,
			}

			ginkgoConfig = config.GinkgoConfigType{
				RandomSeed:        1138,
				RandomizeAllSpecs: true,
			}
		})

		Context("when a serial (non-parallel) suite begins", func() {
			BeforeEach(func() {
				ginkgoConfig.ParallelTotal = 1

				reporter.SpecSuiteWillBegin(ginkgoConfig, suite)
			})

			It("should announce the suite, then announce the number of specs", func() {
				Ω(stenographer.Calls).Should(HaveLen(2))
				Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceSuite", "A Sweet Suite", ginkgoConfig.RandomSeed, true)))
				Ω(stenographer.Calls[1]).Should(Equal(call("AnnounceNumberOfSpecs", 8, 10)))
			})
		})

		Context("when a parallel suite begins", func() {
			BeforeEach(func() {
				ginkgoConfig.ParallelTotal = 2
				ginkgoConfig.ParallelNode = 1
				suite.NumberOfExamplesBeforeParallelization = 20

				reporter.SpecSuiteWillBegin(ginkgoConfig, suite)
			})

			It("should announce the suite, announce that it's a parallel run, then announce the number of specs", func() {
				Ω(stenographer.Calls).Should(HaveLen(3))
				Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceSuite", "A Sweet Suite", ginkgoConfig.RandomSeed, true)))
				Ω(stenographer.Calls[1]).Should(Equal(call("AnnounceParallelRun", 1, 2, 10, 20)))
				Ω(stenographer.Calls[2]).Should(Equal(call("AnnounceNumberOfSpecs", 8, 10)))
			})
		})
	})

	Describe("ExampleWillRun", func() {
		Context("When running in verbose mode", func() {
			Context("and the example will run", func() {
				BeforeEach(func() {
					example = &types.ExampleSummary{}
					reporter.ExampleWillRun(example)
				})

				It("should announce that the example will run", func() {
					Ω(stenographer.Calls).Should(HaveLen(1))
					Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceExampleWillRun", example)))
				})
			})

			Context("and the example will not run", func() {
				Context("because it is pending", func() {
					BeforeEach(func() {
						example = &types.ExampleSummary{
							State: types.ExampleStatePending,
						}
						reporter.ExampleWillRun(example)
					})

					It("should announce nothing", func() {
						Ω(stenographer.Calls).Should(BeEmpty())
					})
				})

				Context("because it is skipped", func() {
					BeforeEach(func() {
						example = &types.ExampleSummary{
							State: types.ExampleStateSkipped,
						}
						reporter.ExampleWillRun(example)
					})

					It("should announce nothing", func() {
						Ω(stenographer.Calls).Should(BeEmpty())
					})
				})
			})
		})

		Context("When not running in verbose mode", func() {
			BeforeEach(func() {
				reporterConfig.Verbose = false
				reporter = reporters.NewDefaultReporter(reporterConfig, stenographer)
				example = &types.ExampleSummary{}
				reporter.ExampleWillRun(example)
			})

			It("should announce nothing", func() {
				Ω(stenographer.Calls).Should(BeEmpty())
			})
		})
	})

	Describe("ExampleDidComplete", func() {
		JustBeforeEach(func() {
			reporter.ExampleDidComplete(example)
		})

		BeforeEach(func() {
			example = &types.ExampleSummary{}
		})

		Context("When the example passed", func() {
			BeforeEach(func() {
				example.State = types.ExampleStatePassed
			})

			Context("When the example was a measurement", func() {
				BeforeEach(func() {
					example.IsMeasurement = true
				})

				It("should announce the measurement", func() {
					Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceSuccesfulMeasurement", example, true)))
				})
			})

			Context("When the example is slow", func() {
				BeforeEach(func() {
					example.RunTime = time.Second
				})

				It("should announce that it was slow", func() {
					Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceSuccesfulSlowExample", example, true)))
				})
			})

			Context("Otherwise", func() {
				It("should announce the succesful example", func() {
					Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceSuccesfulExample", example)))
				})
			})
		})

		Context("When the example is pending", func() {
			BeforeEach(func() {
				example.State = types.ExampleStatePending
			})

			It("should announce the pending example", func() {
				Ω(stenographer.Calls[0]).Should(Equal(call("AnnouncePendingExample", example, true, true)))
			})
		})

		Context("When the example is skipped", func() {
			BeforeEach(func() {
				example.State = types.ExampleStateSkipped
			})

			It("should announce the skipped example", func() {
				Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceSkippedExample", example)))
			})
		})

		Context("When the example timed out", func() {
			BeforeEach(func() {
				example.State = types.ExampleStateTimedOut
			})

			It("should announce the timedout example", func() {
				Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceExampleTimedOut", example, true)))
			})
		})

		Context("When the example panicked", func() {
			BeforeEach(func() {
				example.State = types.ExampleStatePanicked
			})

			It("should announce the panicked example", func() {
				Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceExamplePanicked", example, true)))
			})
		})

		Context("When the example failed", func() {
			BeforeEach(func() {
				example.State = types.ExampleStateFailed
			})

			It("should announce the failed example", func() {
				Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceExampleFailed", example, true)))
			})
		})
	})

	Describe("SpecSuiteDidEnd", func() {
		BeforeEach(func() {
			suite = &types.SuiteSummary{}
			reporter.SpecSuiteDidEnd(suite)
		})

		It("should announce the spec run's completion", func() {
			Ω(stenographer.Calls[0]).Should(Equal(call("AnnounceSpecRunCompletion", suite)))
		})
	})
})


text:
package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"path/filepath"
	"regexp"
	"sort"
	"strings"
	"text/tabwriter"
	"text/template"
	"unicode"

	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
	"github.com/urfave/cli"
)

type note struct {
	Title       string `toml:"title"`
	Description string `toml:"description"`
}

type change struct {
	Commit      string `toml:"commit"`
	Description string `toml:"description"`
}

type dependency struct {
	Name     string
	Commit   string
	Previous string
	CloneURL string
}

type download struct {
	Filename string
	Hash     string
}

type projectChange struct {
	Name    string
	Changes []change
}

type projectRename struct {
	Old string `toml:"old"`
	New string `toml:"new"`
}

type release struct {
	ProjectName     string            `toml:"project_name"`
	GithubRepo      string            `toml:"github_repo"`
	Commit          string            `toml:"commit"`
	Previous        string            `toml:"previous"`
	PreRelease      bool              `toml:"pre_release"`
	Preface         string            `toml:"preface"`
	Notes           map[string]note   `toml:"notes"`
	BreakingChanges map[string]change `toml:"breaking"`

	// dependency options
	MatchDeps  string                   `toml:"match_deps"`
	RenameDeps map[string]projectRename `toml:"rename_deps"`

	// generated fields
	Changes      []projectChange
	Contributors []string
	Dependencies []dependency
	Tag          string
	Version      string
	Downloads    []download
}

func main() {
	app := cli.NewApp()
	app.Name = "release"
	app.Description = `release tooling.

This tool should be ran from the root of the project repository for a new release.
`
	app.Flags = []cli.Flag{
		cli.BoolFlag{
			Name:  "dry,n",
			Usage: "run the release tooling as a dry run to print the release notes to stdout",
		},
		cli.BoolFlag{
			Name:  "debug,d",
			Usage: "show debug output",
		},
		cli.StringFlag{
			Name:  "tag,t",
			Usage: "tag name for the release, defaults to release file name",
		},
		cli.StringFlag{
			Name:  "template",
			Usage: "template filepath to use in place of the default",
			Value: defaultTemplateFile,
		},
		cli.BoolFlag{
			Name:  "linkify,l",
			Usage: "add links to changelog",
		},
	}
	app.Action = func(context *cli.Context) error {
		var (
			releasePath = context.Args().First()
			tag         = context.String("tag")
			linkify     = context.Bool("linkify")
		)
		if tag == "" {
			tag = parseTag(releasePath)
		}
		version := strings.TrimLeft(tag, "v")
		if context.Bool("debug") {
			logrus.SetLevel(logrus.DebugLevel)
		}
		r, err := loadRelease(releasePath)
		if err != nil {
			return err
		}
		logrus.Infof("Welcome to the %s release tool...", r.ProjectName)

		mailmapPath, err := filepath.Abs(".mailmap")
		if err != nil {
			return errors.Wrap(err, "failed to resolve mailmap")
		}
		gitConfigs["mailmap.file"] = mailmapPath

		var (
			contributors   = map[contributor]int{}
			projectChanges = []projectChange{}
		)

		changes, err := changelog(r.Previous, r.Commit)
		if err != nil {
			return err
		}
		if linkify {
			if err := linkifyChanges(changes, githubCommitLink(r.GithubRepo), githubPRLink(r.GithubRepo)); err != nil {
				return err
			}
		}
		if err := addContributors(r.Previous, r.Commit, contributors); err != nil {
			return err
		}
		projectChanges = append(projectChanges, projectChange{
			Name:    "",
			Changes: changes,
		})

		logrus.Infof("creating new release %s with %d new changes...", tag, len(changes))
		current, err := parseDependencies(r.Commit)
		if err != nil {
			return err
		}

		previous, err := parseDependencies(r.Previous)
		if err != nil {
			return err
		}
		renameDependencies(previous, r.RenameDeps)

		updatedDeps := updatedDeps(previous, current)

		sort.Slice(updatedDeps, func(i, j int) bool {
			return updatedDeps[i].Name < updatedDeps[j].Name
		})

		if r.MatchDeps != "" && len(updatedDeps) > 0 {
			re, err := regexp.Compile(r.MatchDeps)
			if err != nil {
				return errors.Wrap(err, "unable to compile 'match_deps' regexp")
			}
			td, err := ioutil.TempDir("", "tmp-clone-")
			if err != nil {
				return errors.Wrap(err, "unable to create temp clone directory")
			}
			defer os.RemoveAll(td)

			cwd, err := os.Getwd()
			if err != nil {
				return errors.Wrap(err, "unable to get cwd")
			}
			for _, dep := range updatedDeps {
				matches := re.FindStringSubmatch(dep.Name)
				if matches == nil {
					continue
				}
				logrus.Debugf("Matched dependency %s with %s", dep.Name, r.MatchDeps)
				var name string
				if len(matches) < 2 {
					name = path.Base(dep.Name)
				} else {
					name = matches[1]
				}
				if err := os.Chdir(td); err != nil {
					return errors.Wrap(err, "unable to chdir to temp clone directory")
				}
				git("clone", dep.CloneURL, name)

				if err := os.Chdir(name); err != nil {
					return errors.Wrapf(err, "unable to chdir to cloned %s directory", name)
				}

				changes, err := changelog(dep.Previous, dep.Commit)
				if err != nil {
					return errors.Wrapf(err, "failed to get changelog for %s", name)
				}
				if err := addContributors(dep.Previous, dep.Commit, contributors); err != nil {
					return errors.Wrapf(err, "failed to get authors for %s", name)
				}
				if linkify {
					if !strings.HasPrefix(dep.Name, "github.com/") {
						logrus.Debugf("linkify only supported for Github, skipping %s", dep.Name)
					} else {
						ghname := dep.Name[11:]
						if err := linkifyChanges(changes, githubCommitLink(ghname), githubPRLink(ghname)); err != nil {
							return err
						}
					}
				}

				projectChanges = append(projectChanges, projectChange{
					Name:    name,
					Changes: changes,
				})

			}
			if err := os.Chdir(cwd); err != nil {
				return errors.Wrap(err, "unable to chdir to previous cwd")
			}
		}

		// update the release fields with generated data
		r.Contributors = orderContributors(contributors)
		r.Dependencies = updatedDeps
		r.Changes = projectChanges
		r.Tag = tag
		r.Version = version

		// Remove trailing new lines
		r.Preface = strings.TrimRightFunc(r.Preface, unicode.IsSpace)

		tmpl, err := getTemplate(context)
		if err != nil {
			return err
		}

		if context.Bool("dry") {
			t, err := template.New("release-notes").Parse(tmpl)
			if err != nil {
				return err
			}

			w := tabwriter.NewWriter(os.Stdout, 8, 8, 2, ' ', 0)
			if err := t.Execute(w, r); err != nil {
				return err
			}
			return w.Flush()
		}
		logrus.Info("release complete!")
		return nil
	}
	if err := app.Run(os.Args); err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
}


text:
* [Discussions](https://github.com/xvik/dropwizard-guicey/discussions) - most likely will replace google group
* [Gitter](https://gitter.im/xvik/dropwizard-guicey) - chat
* [Github issues](https://github.com/xvik/dropwizard-guicey/issues) - problems / enhancements


text:
namespace Mosa.Compiler.Metadata
{
	public enum AssemblyHashAlgorithm : uint
	{
		None = 0x0000,
		Reserved = 0x8003,
		SHA1 = 0x8004
	}
}


text:
require 'logger'

module MyShows
  def self.logger
    @logger ||= ::Logger.new(STDOUT)
  end
end