text:
import Component from '@ember/component';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import { isPresent } from '@ember/utils';
import { task } from 'ember-concurrency';
import ValidationErrorDisplay from 'ilios-common/mixins/validation-error-display';
import { validator, buildValidations } from 'ember-cp-validations';

const Validations = buildValidations({
  title: [
    validator('presence', true),
    validator('length', {
      max: 100
    })
  ],
  calendarColor: [
    validator('presence', true),
    validator('format', {
      regex: /^#[a-fA-F0-9]{6}$/,
    })
  ],
  selectedAamcMethodId: [
    validator(function(aamcMethodId, options, model) {
      if (!aamcMethodId) {
        return true;
      }
      const assessment = model.get('assessment');
      console.log(model);
      const lookup = assessment?'AM':'IM';
      if (aamcMethodId.indexOf(lookup) !== 0) {
        return this.createErrorMessage(options.messageKey, aamcMethodId, options);
      }

      return true;
    }, {
      dependentKeys: ['model.assessment'],
      descriptionKey: 'general.aamcMethod',
      messageKey: 'general.invalid',
    })
  ]
});

export default Component.extend(ValidationErrorDisplay, Validations, {
  store: service(),

  classNames: ['school-session-type-form'],

  assessment: false,
  calendarColor: null,
  canEditAamcMethod: false,
  canEditActive: false,
  canEditAssessment: false,
  canEditAssessmentOption: false,
  canEditCalendarColor: false,
  canEditTitle: false,
  canUpdate: false,
  isActive: true,
  selectedAamcMethodId: null,
  selectedAssessmentOptionId: null,
  title: null,

  assessmentOptions: computed(async function() {
    const store = this.store;
    return await store.findAll('assessment-option');
  }),

  allAamcMethods: computed(async function() {
    const store = this.store;
    const aamcMethods = await store.findAll('aamc-method');

    return aamcMethods;
  }),

  filteredAamcMethods: computed('allAamcMethods.[]', 'assessment', 'selectedAamcMethodId', async function() {
    const assessment = this.assessment;
    const aamcMethods = await this.allAamcMethods;
    const selectedAamcMethodId = this.selectedAamcMethodId;
    return aamcMethods.filter(aamcMethod => {
      const id = aamcMethod.get('id');
      if (id !== selectedAamcMethodId && ! aamcMethod.get('active')) {
        return false;
      }
      if (assessment) {
        return id.indexOf('AM') === 0;
      } else {
        return id.indexOf('IM') === 0;
      }
    });
  }),

  selectedAamcMethod: computed('filteredAamcMethods.[]', 'selectedAamcMethodId', async function() {
    const filteredAamcMethods = await this.filteredAamcMethods;
    const selectedAamcMethodId = this.selectedAamcMethodId;
    if(isPresent(selectedAamcMethodId)){
      const selectedAamcMethod = filteredAamcMethods.findBy('id', selectedAamcMethodId);
      if (selectedAamcMethod) {
        return selectedAamcMethod;
      }
    }

    return null;
  }),

  selectedAssessmentOption: computed('assessmentOptions.[]', 'selectedAssessmentOptionId', 'assessment', async function() {
    const assessment = this.assessment;
    const selectedAssessmentOptionId = this.selectedAssessmentOptionId;
    const assessmentOptions = await this.assessmentOptions;
    let assessmentOption = null;

    if (assessment) {
      assessmentOption = selectedAssessmentOptionId?assessmentOptions.findBy('id', selectedAssessmentOptionId):assessmentOptions.sortBy('name').get('firstObject');
    }

    return assessmentOption;
  }),

  actions: {
    updateAssessment(value) {
      this.set('selectedAamcMethodId', null);
      this.set('assessment', value);
    }
  },

  keyUp(event) {
    const keyCode = event.keyCode;
    const target = event.target;

    if ('text' !== target.type) {
      return;
    }

    if (13 === keyCode) {
      this.saveSessionType.perform();
      return;
    }

    if (27 === keyCode) {
      this.close();
    }
  },

  saveSessionType: task(function* () {
    this.send('addErrorDisplaysFor', ['title', 'calendarColor', 'selectedAamcMethodId']);
    let {validations} = yield this.validate();
    if (validations.get('isInvalid')) {
      return;
    }

    const title = this.title;
    const calendarColor = this.calendarColor;
    const assessment = this.assessment;
    const aamcMethod = yield this.selectedAamcMethod;
    const assessmentOption = yield this.selectedAssessmentOption;
    const isActive = this.isActive;
    const save = this.save;

    yield save(title, calendarColor, assessment, assessmentOption, aamcMethod, isActive);
    this.send('clearErrorDisplay');
  })
});


text:
package net.awl.edoc.pdfa.xmp;

import java.io.File;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.apache.jempbox.xmp.pdfa.XMPMetadataPDFA;
import org.w3c.dom.Document;

public class JempBoxUsage {

  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(new File("resources/valid-xmp.xmp"));

    XMPMetadataPDFA xmp = new XMPMetadataPDFA(document);
    // System.out.println(xmp.getSchemas().toString());
    System.out.println(xmp.getEncoding());
    System.out.println(xmp.getPDFAIdSchema().getConformance());
    System.out.println(xmp.getPDFAIdSchema().getAmd());
    System.out.println(xmp.getPDFAIdSchema().getPart());
    System.out.println(xmp.getBasicSchema().getCreatorTool());
    System.out.println(xmp.getBasicSchema().getCreateDate());
    System.out.println(xmp.getPDFSchema().getProducer());
    System.out.println();

    System.out.println(xmp.getPDFAIdSchema().getTextProperty(
        "pdfaid:conformance"));
    System.out.println(xmp.getPDFAIdSchema().getTextProperty("pdfaid:part"));
    System.out.println(xmp.getPDFAIdSchema().getIntegerProperty("pdfaid:part"));

  }

}

redpajama_set_name: RedPajamaGithub


text:
package org.camunda.bpm.engine.impl.persistence.entity;

import org.camunda.bpm.engine.history.ReportResult;
import org.camunda.bpm.engine.query.PeriodUnit;

/**
 * @author Roman Smirnov
 *
 */
public abstract class ReportResultEntity implements ReportResult {

  protected int period;
  protected PeriodUnit periodUnit;

  public int getPeriod() {
    return period;
  }

  public void setPeriod(int period) {
    this.period = period;
  }

  public PeriodUnit getPeriodUnit() {
    return periodUnit;
  }

  public void setPeriodUnit(String periodUnit) {
    this.periodUnit = PeriodUnit.valueOf(periodUnit);
  }

}


text:
package com.thoughtworks.studios.javaexec;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class StreamPipeRunnable implements PipeRunnable {

  private OutputStream out;
  private InputStream in;

  public StreamPipeRunnable(InputStream in, OutputStream out) {
    this.out = out;
    this.in = in;
  }

  public void run() throws IOException {
    byte[] buffer = new byte[1024];
    int bytesRead;
    while ((bytesRead = in.read(buffer)) > -1) {
      out.write(buffer, 0, bytesRead);
    }
  }

}


text:
namespace ipmi_flash
{

class ImageHandlerMock : public ImageHandlerInterface
{
  public:
    virtual ~ImageHandlerMock() = default;
    MOCK_METHOD(bool, open, (const std::string&, std::ios_base::openmode),
                (override));
    MOCK_METHOD(void, close, (), (override));
    MOCK_METHOD(bool, write, (std::uint32_t, const std::vector<std::uint8_t>&),
                (override));
    MOCK_METHOD(std::optional<std::vector<std::uint8_t>>, read,
                (std::uint32_t, std::uint32_t), (override));
    MOCK_METHOD(int, getSize, (), (override));
};

std::unique_ptr<ImageHandlerMock> CreateImageMock();

} // namespace ipmi_flash


text:
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */

/*************************************************************************
 * Copyright (c) 2011 AT&T Intellectual Property
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors: See CVS logs. Details at http://www.graphviz.org/
 *************************************************************************/

/*
 * Glenn Fowler
 * AT&T Research
 *
 * expression library C program generator
 */

#include "exlib.h"

#define str(s)		# s
#define xstr(s)		str(s)

/*
 * return C type name for type
 */

char*
extype(int type)
{
	switch (type)
	{
	case FLOATING:
		return "double";
	case STRING:
		return "char*";
	case UNSIGNED:
		return xstr(uintmax_t);
	}
	return xstr(intmax_t);
}


text:
/* eslint angular/json-functions: 0 */
"use strict";

var webpack = require("webpack");
var path = require("path");

var ExtractTextPlugin = require("extract-text-webpack-plugin");

var config = {
  entry: {
    "tuftey": path.resolve(__dirname, "src", "index.js")
  },
  plugins: [

    new webpack.DefinePlugin({
      MERCURY_API_KEY: JSON.stringify(process.env.MERCURY_API_KEY)
    }),

    new webpack.optimize.UglifyJsPlugin({
      mangle: true,
      compress: {
        warnings: false // Supress uglification warnings
      }
    })

  ],
  output: {
    path: path.join(__dirname, "dist"),
    filename: "[name].js"
  },
  module: {
    loaders: [
      {
        test: /\.s?css$/,
        loader: ExtractTextPlugin.extract("style", "css?-url!sass")
      },
      {
        test: /\.html/,
        loader: "raw"
      }
    ]
  }
};

module.exports = config;


text:
namespace Orwell.Manager
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, System.EventArgs e)
        {
            OrwellSqlDataSource.ConnectionString = SqlDatabase.GetConnectionString();
        }
    }
}


text:
pkg_name=libcap-ng
pkg_origin=core
pkg_version=0.7.8
pkg_source=http://people.redhat.com/sgrubb/$pkg_name/$pkg_name-$pkg_version.tar.gz
pkg_shasum=c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_description="The libcap-ng library is intended to make programming with posix capabilities much easier than the traditional libcap library"
pkg_upstream_url="https://people.redhat.com/sgrubb/libcap-ng/"
pkg_license=('GPL-2.0' 'LGPL-2.1')
pkg_deps=(core/glibc lilian/python)
pkg_build_deps=(lilian/make lilian/gcc)
pkg_bin_dirs=(bin)
pkg_lib_dirs=(lib)
pkg_include_dirs=(include)

source ../defaults.sh

do_build() {
  ./configure --prefix="${pkg_prefix}" --enable-static=no --with-python="$(pkg_path_for python)"
  make -j "$(nproc)"
}


text:
id: abilities
title: Abilities
---

An **ability** is a skill possessed by a unit. As the player, you activate
abilities during your warrior's turn.

> Ability selection is the way you can customize how your warrior plays.

## Learning new abilities

When you first start, your warrior will only have a few abilities. Additional
abilities are acquired progressing through the tower. With each level, you'll
learn new things or find artifacts that will expand your capabilities.

## Ability types

There are two types of abilities: actions and senses.

### Actions

An **action** is an ability that affects the game in some way. Is through
actions that you're able to inflict damage, protect yourself or other units, and
interact with your environment.

> Only one action can be performed per turn, so choose wisely.

### Senses

A **sense**, on the contrary, doesn't affect the game but gathers information
about the floor. You can perform senses as often as you want per turn to collect
information about your surroundings and to aid you in choosing the best action
according to the circumstances.

> Since what you sense will change each turn, you may want to record the
> information you gather for use on the next turn. For example, you can
> determine if you are being attacked if your health has gone down since the
> last turn.


text:
package com.stratio.deep.mongodb.extractor;

import java.lang.reflect.InvocationTargetException;

import org.bson.BSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.stratio.deep.commons.config.DeepJobConfig;
import com.stratio.deep.commons.exception.DeepTransformException;
import com.stratio.deep.mongodb.config.MongoDeepJobConfig;
import com.stratio.deep.mongodb.utils.UtilMongoDB;

import scala.Tuple2;

/**
 * EntityRDD to interact with mongoDB
 *
 * @param <T> the type parameter
 */
public final class MongoEntityExtractor<T> extends MongoExtractor<T> {

    /**
     * The constant LOG.
     */
    private static final Logger LOG = LoggerFactory.getLogger(MongoEntityExtractor.class);
    /**
     * The constant serialVersionUID.
     */
    private static final long serialVersionUID = -3208994171892747470L;

    /**
     * Instantiates a new Mongo entity extractor.
     *
     * @param t the t
     */
    public MongoEntityExtractor(Class<T> t) {
        super();
        this.deepJobConfig = new MongoDeepJobConfig(t);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public T transformElement(Tuple2<Object, BSONObject> tuple, DeepJobConfig<T, ? extends DeepJobConfig> config) {

        try {
            return (T) UtilMongoDB.getObjectFromBson(config.getEntityClass(), tuple._2());
        } catch (Exception e) {
            LOG.error("Cannot convert BSON: ", e);
            throw new DeepTransformException("Could not transform from Bson to Entity " + e.getMessage(), e);
        }

    }

    @Override
    public Tuple2<Object, BSONObject> transformElement(T record) {
        try {
            return new Tuple2<>(null, (BSONObject) UtilMongoDB.getBsonFromObject(record));
        } catch (IllegalAccessException | InvocationTargetException | InstantiationException e) {
            LOG.error(e.getMessage());
            throw new DeepTransformException(e.getMessage(), e);
        }
    }

}


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Imports System.Collections.Generic
Imports System.Collections.Immutable
Imports System.Diagnostics
Imports System.Linq
Imports Microsoft.CodeAnalysis.CodeGen
Imports Microsoft.CodeAnalysis.PooledObjects

Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
    Friend NotInheritable Class SynthesizedPrivateImplementationDetailsSharedConstructor
        Inherits SynthesizedGlobalMethodBase

        Private ReadOnly _containingModule As SourceModuleSymbol
        Private ReadOnly _privateImplementationType As PrivateImplementationDetails
        Private ReadOnly _voidType As TypeSymbol

        Friend Sub New(
            containingModule As SourceModuleSymbol,
            privateImplementationType As PrivateImplementationDetails,
            voidType As NamedTypeSymbol
        )
            MyBase.New(containingModule, WellKnownMemberNames.StaticConstructorName, privateImplementationType)

            _containingModule = containingModule
            _privateImplementationType = privateImplementationType
            _voidType = voidType
        End Sub

        Public Overrides ReadOnly Property IsSub As Boolean
            Get
                Return True
            End Get
        End Property

        Public Overrides ReadOnly Property ReturnsByRef As Boolean
            Get
                Return False
            End Get
        End Property

        Public Overrides ReadOnly Property ReturnType As TypeSymbol
            Get
                Return _voidType
            End Get
        End Property

        Friend Overrides ReadOnly Property HasSpecialName As Boolean
            Get
                Return True
            End Get
        End Property

        Public Overrides ReadOnly Property MethodKind As MethodKind
            Get
                Return MethodKind.SharedConstructor
            End Get
        End Property

        Friend Overrides Function GetBoundMethodBody(compilationState As TypeCompilationState, diagnostics As DiagnosticBag, Optional ByRef methodBodyBinder As Binder = Nothing) As BoundBlock
            methodBodyBinder = Nothing

            Dim factory As New SyntheticBoundNodeFactory(Me, Me, VisualBasicSyntaxTree.Dummy.GetRoot(), compilationState, diagnostics)
            Dim body As ArrayBuilder(Of BoundStatement) = ArrayBuilder(Of BoundStatement).GetInstance()

            ' Initialize the payload root for each kind of dynamic analysis instrumentation.
            ' A payload root is an array of arrays of per-method instrumentation payloads.
            ' For each kind of instrumentation:
            '
            '     payloadRoot = New T(MaximumMethodDefIndex)() {}
            '
            ' where T Is the type of the payload at each instrumentation point, and MaximumMethodDefIndex is the
            ' index portion of the greatest method definition token in the compilation. This guarantees that any
            ' method can use the index portion of its own method definition token as an index into the payload array.

            For Each payloadRoot As KeyValuePair(Of Integer, InstrumentationPayloadRootField) In _privateImplementationType.GetInstrumentationPayloadRoots()

                Dim analysisKind As Integer = payloadRoot.Key
                Dim payloadArrayType As ArrayTypeSymbol = DirectCast(payloadRoot.Value.Type, ArrayTypeSymbol)

                body.Add(
                    factory.Assignment(
                        factory.InstrumentationPayloadRoot(analysisKind, payloadArrayType, isLValue:=True),
                        factory.Array(payloadArrayType.ElementType, ImmutableArray.Create(factory.MaximumMethodDefIndex()), ImmutableArray(Of BoundExpression).Empty)))
            Next

            ' Initialize the module version ID (MVID) field. Dynamic instrumentation requires the MVID of the executing module, and this field makes that accessible.
            ' MVID = New Guid(ModuleVersionIdString)

            Dim guidConstructor As MethodSymbol = factory.WellKnownMember(Of MethodSymbol)(WellKnownMember.System_Guid__ctor)
            If guidConstructor IsNot Nothing Then
                body.Add(
                    factory.Assignment(
                       factory.ModuleVersionId(isLValue:=True),
                       factory.[New](guidConstructor, factory.ModuleVersionIdString())))
            End If

            body.Add(factory.Return())

            Return factory.Block(body.ToImmutableAndFree())
        End Function

        Public Overrides ReadOnly Property ContainingModule As ModuleSymbol
            Get
                Return _containingModule
            End Get
        End Property
    End Class
End Namespace


text:
frappe.ui.form.Dashboard = Class.extend({
	init: function(opts) {
		$.extend(this, opts);
		this.section = this.frm.fields_dict._form_dashboard.wrapper;
		this.parent = this.section.find('.section-body');
		this.wrapper = $(frappe.render_template('form_dashboard',
			{frm: this.frm})).appendTo(this.parent);

		this.progress_area = this.wrapper.find(".progress-area");
		this.heatmap_area = this.wrapper.find('.form-heatmap');
		this.chart_area = this.wrapper.find('.form-graph');
		this.stats_area = this.wrapper.find('.form-stats');
		this.stats_area_row = this.stats_area.find('.row');
		this.links_area = this.wrapper.find('.form-links');
		this.transactions_area = this.links_area.find('.transactions');

	},
	reset: function() {
		this.section.addClass('hidden');
		this.clear_headline();

		// clear progress
		this.progress_area.empty().addClass('hidden');

		// clear links
		this.links_area.addClass('hidden');
		this.links_area.find('.count, .open-notification').addClass('hidden');

		// clear stats
		this.stats_area.addClass('hidden')
		this.stats_area_row.empty();

		// clear custom
		this.wrapper.find('.custom').remove();
	},
	set_headline: function(html) {
		this.frm.layout.show_message(html);
	},
	clear_headline: function() {
		this.frm.layout.show_message();
	},

	add_comment: function(text, alert_class, permanent) {
		var me = this;
		this.set_headline_alert(text, alert_class);
		if(!permanent) {
			setTimeout(function() {
				me.clear_headline();
			}, 10000);
		}
	},

	clear_comment: function() {
		this.clear_headline();
	},

	set_headline_alert: function(text, indicator_color) {
		if (!indicator_color) {
			indicator_color = 'orange';
		}
		if(text) {
			this.set_headline(`<div><span class="indicator ${indicator_color}">${text}</span></div>`);
		} else {
			this.clear_headline();
		}
	},

	add_section: function(html) {
		return $('
'+html+'
').appendTo(this.wrapper);
	},

	add_progress: function(title, percent, message) {
		var progress_chart = this.make_progress_chart(title);

		if(!$.isArray(percent)) {
			percent = this.format_percent(title, percent);
		}

		var progress = $('

').appendTo(progress_chart);
		$.each(percent, function(i, opts) {
			$(repl('

', opts)).appendTo(progress);
		});

		if(message) {
			$('
' + message + '
').appendTo(this.progress_area);
		}

		this.show();
	},

	format_percent: function(title, percent) {
		var width = cint(percent) < 1 ? 1 : cint(percent);
		var progress_class = "";
		if(width < 10)
			progress_class = "progress-bar-danger";
		if(width > 99.9)
			progress_class = "progress-bar-success";

		return [{
			title: title,
			width: width + '%',
			progress_class: progress_class
		}];
	},
	make_progress_chart: function(title) {
		var progress_chart = $('

')
			.appendTo(this.progress_area.removeClass('hidden'));
		return progress_chart;
	},

	refresh: function() {
		this.reset();
		if(this.frm.doc.__islocal) {
			return;
		}

		if(!this.data) {
			this.init_data();
		}

		var show = false;

		if(this.data && (this.data.transactions || []).length) {
			if(this.data.docstatus && this.frm.doc.docstatus !== this.data.docstatus) {
				// limited docstatus
				return;
			}
			this.render_links();
			this.set_open_count();
			show = true;
		}

		if(this.data.heatmap) {
			this.render_heatmap();
			show = true;
		}

		if(this.data.graph) {
			this.setup_graph();
			show = true;
		}

		if(show) {
			this.show();
		}
	},

	after_refresh: function() {
		var me = this;
		// show / hide new buttons (if allowed)
		this.links_area.find('.btn-new').each(function() {
			if(me.frm.can_create($(this).attr('data-doctype'))) {
				$(this).removeClass('hidden');
			}
		});
	},

	init_data: function() {
		this.data = this.frm.meta.__dashboard || {};
		if(!this.data.transactions) this.data.transactions = [];
		if(!this.data.internal_links) this.data.internal_links = {};
		this.filter_permissions();
	},

	filter_permissions: function() {
		// filter out transactions for which the user
		// does not have permission
		var transactions = [];
		(this.data.transactions || []).forEach(function(group) {
			var items = [];
			group.items.forEach(function(doctype) {
				if(frappe.model.can_read(doctype)) {
					items.push(doctype);
				}
			});

			// only add thie group, if there is atleast
			// one item with permission
			if(items.length) {
				group.items = items;
				transactions.push(group);
			}
		});
		this.data.transactions = transactions;
	},
	render_links: function() {
		var me = this;
		this.links_area.removeClass('hidden');
		this.links_area.find('.btn-new').addClass('hidden');
		if(this.data_rendered) {
			return;
		}

		//this.transactions_area.empty();

		this.data.frm = this.frm;

		$(frappe.render_template('form_links', this.data))
			.appendTo(this.transactions_area)

		// bind links
		this.transactions_area.find(".badge-link").on('click', function() {
			me.open_document_list($(this).parent());
		});

		// bind open notifications
		this.transactions_area.find('.open-notification').on('click', function() {
			me.open_document_list($(this).parent(), true);
		});

		// bind new
		this.transactions_area.find('.btn-new').on('click', function() {
			me.frm.make_new($(this).attr('data-doctype'));
		});

		this.data_rendered = true;
	},
	open_document_list: function($link, show_open) {
		// show document list with filters
		var doctype = $link.attr('data-doctype'),
			names = $link.attr('data-names') || [];

		if(this.data.internal_links[doctype]) {
			if(names.length) {
				frappe.route_options = {'name': ['in', names]};
			} else {
				return false;
			}
		} else if(this.data.fieldname) {
			frappe.route_options = this.get_document_filter(doctype);
			if(show_open) {
				frappe.ui.notifications.show_open_count_list(doctype);
			}
		}

		frappe.set_route("List", doctype);
	},
	get_document_filter: function(doctype) {
		// return the default filter for the given document
		// like {"customer": frm.doc.name}
		var filter = {};
		var fieldname = this.data.non_standard_fieldnames
			? (this.data.non_standard_fieldnames[doctype] || this.data.fieldname)
			: this.data.fieldname;
		filter[fieldname] = this.frm.doc.name;
		return filter;
	},
	set_open_count: function() {
		if(!this.data.transactions || !this.data.fieldname) {
			return;
		}

		// list all items from the transaction list
		var items = [],
			me = this;

		this.data.transactions.forEach(function(group) {
			group.items.forEach(function(item) { items.push(item); });
		});

		var method = this.data.method || 'frappe.desk.notifications.get_open_count';

		frappe.call({
			type: "GET",
			method: method,
			args: {
				doctype: this.frm.doctype,
				name: this.frm.doc.name,
			},
			callback: function(r) {
				if(r.message.timeline_data) {
					me.update_heatmap(r.message.timeline_data);
				}

				// update badges
				$.each(r.message.count, function(i, d) {
					me.frm.dashboard.set_badge_count(d.name, cint(d.open_count), cint(d.count));
				});

				// update from internal links
				$.each(me.data.internal_links, function(doctype, link) {
					var table_fieldname = link[0], link_fieldname = link[1];
					var names = [];
					(me.frm.doc[table_fieldname] || []).forEach(function(d) {
						var value = d[link_fieldname];
						if(value && names.indexOf(value)===-1) {
							names.push(value);
						}
					});
					me.frm.dashboard.set_badge_count(doctype, 0, names.length, names);
				});

				me.frm.dashboard_data = r.message;
				me.frm.trigger('dashboard_update');
			}
		});

	},
	set_badge_count: function(doctype, open_count, count, names) {
		var $link = $(this.transactions_area)
			.find('.document-link[data-doctype="'+doctype+'"]');

		if(open_count) {
			$link.find('.open-notification')
				.removeClass('hidden')
				.html((open_count > 99) ? '99+' : open_count);
		}

		if(count) {
			$link.find('.count')
				.removeClass('hidden')
				.html((count > 99) ? '99+' : count);
		}

		if(this.data.internal_links[doctype]) {
			if(names && names.length) {
				$link.attr('data-names', names ? names.join(',') : '');
			} else {
				$link.find('a').attr('disabled', true);
			}
		}
	},

	update_heatmap: function(data) {
		if(this.heatmap) {
			this.heatmap.update(data);
		}
	},

	// heatmap
	render_heatmap: function() {
		if(!this.heatmap) {
			this.heatmap = new Chart({
				parent: "#heatmap-" + frappe.model.scrub(this.frm.doctype),
				type: 'heatmap',
				height: 100,
				start: new Date(moment().subtract(1, 'year').toDate()),
				count_label: "interactions",
				discrete_domains: 0,
				data: {}
			});

			// center the heatmap
			this.heatmap_area.removeClass('hidden').find('svg').css({'margin': 'auto'});

			// message
			var heatmap_message = this.heatmap_area.find('.heatmap-message');
			if(this.data.heatmap_message) {
				heatmap_message.removeClass('hidden').html(this.data.heatmap_message);
			} else {
				heatmap_message.addClass('hidden');
			}
		}
	},

	add_indicator: function(label, color) {
		this.show();
		this.stats_area.removeClass('hidden');

		// set colspan
		var indicators = this.stats_area_row.find('.indicator-column');
		var n_indicators = indicators.length + 1;
		var colspan;
		if(n_indicators > 4) { colspan = 3 }
		else { colspan = 12 / n_indicators; }

		// reset classes in existing indicators
		if(indicators.length) {
			indicators.removeClass().addClass('col-sm-'+colspan).addClass('indicator-column');
		}

		var indicator = $('
'
			+label+'
').appendTo(this.stats_area_row);

		return indicator;
	},

	// graphs
	setup_graph: function() {
		var me = this;
		var method = this.data.graph_method;
		var args = {
			doctype: this.frm.doctype,
			docname: this.frm.doc.name,
		};
		$.extend(args, this.data.graph_method_args);

		frappe.call({
			type: "GET",
			method: method,
			args: args,

			callback: function(r) {
				if(r.message) {
					me.render_graph(r.message);
				}
			}
		});
	},

	render_graph: function(args) {
		var me = this;
		this.chart_area.empty().removeClass('hidden');
		$.extend(args, {
			parent: '.form-graph',
			type: 'line',
			height: 140,
			colors: ['green']
		});
		this.show();

		this.chart = new Chart(args);
		if(!this.chart) {
			this.hide();
		}
	},

	show: function() {
		this.section.removeClass('hidden');
	},

	hide: function() {
		this.section.addClass('hidden');
	}
});


text:
exports.$Gen = function(){
  throw new Error('$Gen is not intended to be used at all.')
};


text:
package VMOMI::NamespaceLimitReached;
use parent 'VMOMI::VimFault';

use strict;
use warnings;

our @class_ancestors = (
    'VimFault',
    'MethodFault',
);

our @class_members = (
    ['limit', undef, 0, 1],
);

sub get_class_ancestors {
    return @class_ancestors;
}

sub get_class_members {
    my $class = shift;
    my @super_members = $class->SUPER::get_class_members();
    return (@super_members, @class_members);
}

1;


text:
<resources>
    <string name="app_name">sample-simple</string>
</resources>


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

namespace Matlab.Utils
{
    [Serializable]
    public enum Severity
    {
        Info = 0,
        Warning = 1,
        Error = 2
    }
}


text:
/* _PDCLIB_mb_cur_max( void )

   This file is part of the Public Domain C Library (PDCLib).
   Permission is granted to use, modify, and / or redistribute at will.
*/

#include <locale.h>
#ifndef REGTEST
#include "_PDCLIB_locale.h"
#include "_PDCLIB_encoding.h"

size_t _PDCLIB_mb_cur_max( void )
{
    return _PDCLIB_threadlocale()->_Codec->__mb_max;
}

#endif

#ifdef TEST
#include "_PDCLIB_test.h"

int main( void )
{
    TESTCASE( NO_TESTDRIVER );
    return TEST_RESULTS;
}
#endif


text:
function Generate-File()
{
    $map = @{
        "byte[]" = "ForBinary";
        "bool" = "ForBool";
        "DateTimeOffset" = "ForDate";
        "double" = "ForDouble";
        "Guid" = "ForGuid";
        "int" = "ForInt";
        "long" = "ForLong";
        "string" = "";
    }

    $header =
@"
using Microsoft.WindowsAzure.Storage.Table;
using System;

namespace Dashboard.Azure
{
    public static partial class TableQueryUtil
    {
"@;

    write-output $header

    foreach ($type in $map.Keys) {
        $name = $map[$type]

        $item =
@"

        public static string Column(string columnName, $type value, ColumnOperator op = ColumnOperator.Equal)
        {
            return TableQuery.GenerateFilterCondition$name(
                columnName,
                ToQueryComparison(op),
                value);
        }
"@;
        write-output $item
    }

    $footer =
@"
    }
}
"@

    write-output $footer
}

Generate-File | out-file "TableQueryUtil.Generated.cs" -encoding utf8


text:
package org.ftc8702.opmodes.ultimategoal;

import android.nfc.NdefRecord;

import com.qualcomm.robotcore.hardware.DcMotor;

import org.firstinspires.ftc.robotcore.external.Telemetry;
import org.ftc8702.components.motors.MecanumWheelDriveTrain;
import org.ftc8702.utils.SleepUtils;

import ftcbootstrap.ActiveOpMode;
import ftcbootstrap.components.utils.TelemetryUtil;

public class GoToSite {

    private MecanumWheelDriveTrain driveTrain;
    private UltimateGoalArm wobbleArm;
    private UltimateGoalShooter shooter;

    public GoToSite(MecanumWheelDriveTrain driveTrain, UltimateGoalArm wobbleArm, UltimateGoalShooter shooter){
        this.driveTrain = driveTrain;
        this.wobbleArm = wobbleArm;
        this.shooter = shooter;
    }

    public void shootBlueSide()
    {
        wobbleArm.CloseClaw();
        driveTrain.goForwardOdometers(15500, 0.4f);
        driveTrain.stop();
        SleepUtils.sleep(700);
        shooter.shooter.setPower(-0.95);
        driveTrain.rotateRightWithGyro((float)0.3, (float)-12);
        driveTrain.stop();
        SleepUtils.sleep(3000);
        shooter.push();
        //driveTrain.rotateRightWithGyro((float)0.3, (float)-27);
        driveTrain.stop();
        shooter.shooter.setPower(-0.95);
        SleepUtils.sleep(1700);
        shooter.push();
        //driveTrain.rotateRightWithGyro((float)0.3, (float)-31);
        driveTrain.stop();
        SleepUtils.sleep(1700);
        shooter.shooter.setPower(-0.95);
        shooter.push();
        shooter.shooter.setPower(0);
        driveTrain.rotateLeftWithGyro((float)0.3, (float)0);//repositions robot
        SleepUtils.sleep(2000);
    }

    public void shootRedSide()
    {
        wobbleArm.CloseClaw();
        driveTrain.goForwardOdometers(16500, 0.4f);
        //driveTrain.rotateRightWithGyro(0.3f, 0);
        //driveTrain.stop();
        //SleepUtils.sleep(500);
        shooter.shooter.setPower(-0.95);
        //driveTrain.rotateLeftWithGyro((float)0.2, (float)(15));
        driveTrain.stop();
        SleepUtils.sleep(2000);
        shooter.push();
        shooter.shooter.setPower(-0.9);
        //driveTrain.rotateLeftWithGyro((float)0.2, (float)20);
        driveTrain.stop();
        SleepUtils.sleep(1500);
        shooter.push();
        //driveTrain.rotateLeftWithGyro((float)0.2, (float)(24));
        driveTrain.stop();
        shooter.shooter.setPower(-0.95);
        SleepUtils.sleep(1500);
        shooter.push();
        shooter.shooter.setPower(0);
        //driveTrain.rotateRightWithGyro((float)0.2, (float)0);//repositions robot
        SleepUtils.sleep(700);
    }

    public void shootRedSideSecond(){
        driveTrain.stop();
        SleepUtils.sleep(500);
        shooter.shooter.setPower(-1);
        //driveTrain.rotateLeftWithGyro((float)0.2, (float)(15));
        driveTrain.stop();
        SleepUtils.sleep(1500);
        shooter.push();
        shooter.shooter.setPower(-1);
        //driveTrain.rotateLeftWithGyro((float)0.2, (float)20);
        driveTrain.stop();
        SleepUtils.sleep(500);
        shooter.push();
        //driveTrain.rotateLeftWithGyro((float)0.2, (float)(24));
        driveTrain.stop();
        SleepUtils.sleep(500);
        shooter.push();
        shooter.shooter.setPower(0);
        //driveTrain.rotateRightWithGyro((float)0.2, (float)0);//repositions robot
        SleepUtils.sleep(700);
    }

    public void shootRedPark() {
        wobbleArm.CloseClaw();
        driveTrain.goForwardOdometers(15500, 0.4f);
        driveTrain.stop();
        SleepUtils.sleep(1000);
        shooter.shooter.setPower(-0.85f);
        SleepUtils.sleep(1500);
        shooter.push();
        shooter.shooter.setPower(-0.85f);
        SleepUtils.sleep(1500);
        shooter.push();
        shooter.shooter.setPower(-0.85f);
        SleepUtils.sleep(2000);
        shooter.push();
        shooter.shooter.setPower(0);
        driveTrain.strafeLeft(1f);
        SleepUtils.sleep(500);
        //driveTrain.goForwardOdometers(18300, 0.4f);
        //driveTrain.stop();
    }

    public void GoToASite()
    {
        resetEncoders();
        driveTrain.goForwardOdometers(5000, 0.4f);
    }

    public void GoToBSite()
    {
        resetEncoders();
        driveTrain.goForwardOdometers(11000, 0.4f);
        driveTrain.rotateRightWithGyro((float)0.4, -160);
    }

    public void GoToCSite()
    {
        resetEncoders();
        driveTrain.goForwardOdometers(15000, 0.4f);
        driveTrain.rotateRightWithGyro(0.3f, -45);
    }

    public void GoToASiteRed()
    {
        resetEncoders();
        driveTrain.goForwardOdometers(4000, 0.4f);
        driveTrain.rotateRightWithGyro(0.4f,-160);
    }

    public void GoToASiteSecond(){
        driveTrain.rotateLeftWithGyro(0.3f, 0);
        SleepUtils.sleep(500);
        driveTrain.goForwardOdometers(4937, 0.4f);
        wobbleArm.OpenClaw();
        wobbleArm.wobbleMotor.setPower(-0.7);
        SleepUtils.sleep(700);
        driveTrain.strafeLeft(0.3f);
        SleepUtils.sleep(1000);
        wobbleArm.CloseClaw();
        wobbleArm.wobbleMotor.setPower(0.7);
        SleepUtils.sleep(1000);
    }

    public void GoToBSiteRed()
    {
        resetEncoders();
        driveTrain.goForwardOdometers(10229, 0.3f);
        driveTrain.strafeRight(0.4f);
        SleepUtils.sleep(700);
    }

    public void GoToCSiteRed()
    {
        resetEncoders();
        driveTrain.goForwardOdometers(16000, 0.3f);
        driveTrain.rotateRightWithGyro(0.4f, -130);

        //driveTrain.goForwardPIDTime(0.5f, 1, 3000, 100);
    }

    public void goToCSiteRedSecond(){
        resetEncoders();
        driveTrain.goBackwardOdometers(-13000, 0.5f);
        SleepUtils.sleep(200);
        resetEncoders();
        driveTrain.goBackwardOdometers(-5000, 0.5f);
        SleepUtils.sleep(200);
    }

    public void goToCSiteRedThird(){
        resetEncoders();
        driveTrain.goForwardOdometers(11075, 0.4f);
    }

    public void resetEncoders(){
        driveTrain.frontLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
        driveTrain.frontRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
        driveTrain.backRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
        driveTrain.backLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
        driveTrain.frontLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
        driveTrain.frontRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
        driveTrain.backRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
        driveTrain.backLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
    }
    public void dropWobble(){
        wobbleArm.WobbleDown();
        SleepUtils.sleep(1000);
        wobbleArm.Stop();

        wobbleArm.OpenClaw();
        SleepUtils.sleep(100);

        wobbleArm.WobbleUp();
        SleepUtils.sleep(700);
        wobbleArm.Stop();

        wobbleArm.CloseClaw();
    }

    public void dropWobbleSlow(){
        wobbleArm.wobbleDownSlow();
        SleepUtils.sleep(2000);
        wobbleArm.Stop();

        wobbleArm.OpenClaw();
        SleepUtils.sleep(100);

        wobbleArm.WobbleUp();
        SleepUtils.sleep(700);
        wobbleArm.Stop();

        wobbleArm.CloseClaw();
    }
}


text:
require 'test_helper'

class MarkdownTest < Redcarpet::TestCase

  def setup
    @markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
  end

  def render_with(flags, text)
    Redcarpet::Markdown.new(Redcarpet::Render::HTML, flags).render(text)
  end

  def test_that_simple_one_liner_goes_to_html
    assert_respond_to @markdown, :render
    html_equal "
Hello World.
\n", @markdown.render("Hello World.")
  end

  def test_that_inline_markdown_goes_to_html
    markdown = @markdown.render('_Hello World_!')
    html_equal "
Hello World!
\n", markdown
  end

  def test_that_inline_markdown_starts_and_ends_correctly
    markdown = render_with({:no_intra_emphasis => true}, '_start _ foo_bar bar_baz _ end_ *italic* **bold** _blah_')

    html_equal "
start _ foo_bar bar_baz _ end italic bold blah
\n", markdown

    markdown = @markdown.render("Run 'rake radiant:extensions:rbac_base:migrate'")
    html_equal "
Run 'rake radiant:extensions:rbac_base:migrate'
\n", markdown
  end

  def test_that_urls_are_not_doubly_escaped
    markdown = @markdown.render('[Page 2](/search?query=Markdown+Test&page=2)')
    html_equal "
Page 2
\n", markdown
  end

  def test_simple_inline_html
    #markdown = Markdown.new("before\n\n
\n  foo\n
\nafter")
    markdown = @markdown.render("before\n\n
\n  foo\n
\n\nafter")
    html_equal "
before
\n\n
\n  foo\n
\n\n
after
\n", markdown
  end

  def test_that_html_blocks_do_not_require_their_own_end_tag_line
    markdown = @markdown.render("Para 1\n\n

HTML block\n

\n\nPara 2 [Link](#anchor)")
    html_equal "
Para 1
\n\n

HTML block\n

\n\n
Para 2 Link
\n",
      markdown
  end

  # This isn't in the spec but is Markdown.pl behavior.
  def test_block_quotes_preceded_by_spaces
    markdown = @markdown.render(
      "A wise man once said:\n\n" +
      " > Isn't it wonderful just to be alive.\n"
    )
    html_equal "
A wise man once said:
\n\n" +
      "

Isn't it wonderful just to be alive.
\n
\n",
      markdown
  end

  def test_para_before_block_html_should_not_wrap_in_p_tag
    markdown = render_with({:lax_spacing => true},
      "Things to watch out for\n" +
      "
\n
Blah
\n
\n")

    html_equal "
Things to watch out for
\n\n" +
      "
\n
Blah
\n
\n", markdown
  end

  # https://github.com/vmg/redcarpet/issues/111
  def test_p_with_less_than_4space_indent_should_not_be_part_of_last_list_item
    text = <<MARKDOWN
  * a
  * b
  * c

  This paragraph is not part of the list.
MARKDOWN
    expected = <<HTML

a

b

c

This paragraph is not part of the list.

HTML
    html_equal expected, @markdown.render(text)
  end

  # http://github.com/rtomayko/rdiscount/issues/#issue/13
  def test_headings_with_trailing_space
    text = "The Ant-Sugar Tales \n"         +
           "=================== \n\n"        +
           "By Candice Yellowflower   \n"
    html_equal "
The Ant-Sugar Tales
\n\n
By Candice Yellowflower
\n", @markdown.render(text)
  end

  def test_that_intra_emphasis_works
    rd = render_with({}, "foo_bar_baz")
    html_equal "
foobarbaz
\n", rd

    rd = render_with({:no_intra_emphasis => true},"foo_bar_baz")
    html_equal "
foo_bar_baz
\n", rd
  end

  def test_that_autolink_flag_works
    rd = render_with({:autolink => true}, "http://github.com/rtomayko/rdiscount")
    html_equal "
http://github.com/rtomayko/rdiscount
\n", rd
  end

  def test_that_tags_can_have_dashes_and_underscores
    rd = @markdown.render("foo <asdf-qwerty>bar</asdf-qwerty> and <a_b>baz</a_b>")
    html_equal "
foo <asdf-qwerty>bar</asdf-qwerty> and <a_b>baz</a_b>
\n", rd
  end

  def test_link_syntax_is_not_processed_within_code_blocks
    markdown = @markdown.render("    This is a code block\n    This is a link [[1]] inside\n")
    html_equal "
This is a code block\nThis is a link [[1]] inside\n
\n",
      markdown
  end

  def test_whitespace_after_urls
    rd = render_with({:autolink => true}, "Japan: http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm (yes, japan)")
    exp = %{
Japan: http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm (yes, japan)
\n}
    html_equal exp, rd
  end

  def test_memory_leak_when_parsing_char_links
    @markdown.render(<<-leaks)
2. Identify the wild-type cluster and determine all clusters
   containing or contained by it:

       wildtype <- wildtype.cluster(h)
       wildtype.mask <- logical(nclust)
       wildtype.mask[c(contains(h, wildtype),
                       wildtype,
                       contained.by(h, wildtype))] <- TRUE

   This could be more elegant.
    leaks
  end

  def test_infinite_loop_in_header
    html_equal "
Body
\n", @markdown.render(<<-header)
######
#Body#
######
    header
  end

  def test_a_hyphen_and_a_equal_should_not_be_converted_to_heading
    html_equal "
-
\n", @markdown.render("-")
    html_equal "
=
\n", @markdown.render("=")
  end

  def test_that_tables_flag_works
    text = <<EOS
 aaa | bbbb
-----|------
hello|sailor
EOS

    assert render_with({}, text) !~ /
 true}, text) =~ /<table/
  end

  def test_that_tables_work_with_org_table_syntax
    text = <<EOS
| aaa | bbbb |
|-----+------|
|hello|sailor|
EOS

    assert render_with({}, text) !~ /
 true}, text) =~ /<table/
  end

  def test_strikethrough_flag_works
    text = "this is ~some~ striked ~~text~~"

    assert render_with({}, text) !~ / true}, text) =~ /<del/
  end

  def test_underline_flag_works
    text = "this is *some* text that is _underlined_. ___boom___"

    refute render_with({}, text).include? 'underlined'

    output = render_with({:underline => true}, text)
    assert output.include? 'underlined'
    assert output.include? 'some'
  end

  def test_highlight_flag_works
    text = "this is ==highlighted=="

    refute render_with({}, text).include? 'highlighted'

    output = render_with({:highlight => true}, text)
    assert output.include? 'highlighted'
  end

  def test_quote_flag_works
    text = 'this is "quote"'

    refute render_with({}, text).include? '<q>quote</q>'

    output = render_with({:quote => true}, text)
    assert output.include? '<q>quote</q>'
  end

  def test_that_fenced_flag_works
    text = <<fenced
This is a simple test

~~~~~
This is some awesome code
    with tabs and shit
~~~
fenced

    assert render_with({}, text) !~ / true}, text) =~ /<code/
  end

  def test_that_fenced_flag_works_without_space
    text = "foo\nbar\n```\nsome\ncode\n```\nbaz"
    out = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :fenced_code_blocks => true, :lax_spacing => true).render(text)
    assert out.include?("
")

    out = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :fenced_code_blocks => true).render(text)
    assert !out.include?("
")
  end

  def test_that_indented_flag_works
    text = <<indented
This is a simple text

    This is some awesome code
    with shit

And this is again a simple text
indented

    assert render_with({}, text) =~ / true}, text) !~ /<code/
  end

  def test_that_headers_are_linkable
    markdown = @markdown.render('### Hello [GitHub](http://github.com)')
    html_equal "
Hello GitHub
\n", markdown
  end

  def test_autolinking_with_ent_chars
    markdown = render_with({:autolink => true}, <<text)
This a stupid link: https://github.com/rtomayko/tilt/issues?milestone=1&state=open
text
    html_equal "
This a stupid link: https://github.com/rtomayko/tilt/issues?milestone=1&state=open
\n", markdown
  end

  def test_spaced_headers
    rd = render_with({:space_after_headers => true}, "#123 a header yes\n")
    assert rd !~ /
/
  end

  def test_proper_intra_emphasis
    assert render_with({:no_intra_emphasis => true}, "http://en.wikipedia.org/wiki/Dave_Allen_(comedian)") !~ //
    assert render_with({:no_intra_emphasis => true}, "this fails: hello_world_") !~ //
    assert render_with({:no_intra_emphasis => true}, "this also fails: hello_world_#bye") !~ //
    assert render_with({:no_intra_emphasis => true}, "this works: hello_my_world") !~ //
    assert render_with({:no_intra_emphasis => true}, "句中**粗體**測試") =~ //

    markdown = "This is (**bold**) and this_is_not_italic!"
    html = "
This is (bold) and this_is_not_italic!
\n"
    assert_equal html, render_with({:no_intra_emphasis => true}, markdown)

    markdown = "This is \"**bold**\""
    html = "
This is "bold"
\n"
    assert_equal html, render_with({:no_intra_emphasis => true}, markdown)
  end

  def test_emphasis_escaping
    markdown = @markdown.render("**foo\\*** _dd\\_dd_")
    html_equal "
foo* dd_dd
\n", markdown
  end

  def test_char_escaping_when_highlighting
    markdown = "==attribute\\==="
    output = render_with({highlight: true}, markdown)
    html_equal "
attribute=
\n", output
  end

  def test_ordered_lists_with_lax_spacing
    markdown = "Foo:\n1. Foo\n2. Bar"
    output = render_with({lax_spacing: true}, markdown)

    assert_match /
/, output
    assert_match /
Foo<\/li>/, output
  end

  def test_references_with_tabs_after_colon
    markdown = @markdown.render("[Link][id]\n[id]:\t\t\thttp://google.es")
    html_equal "
Link
\n", markdown
  end
end


text:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;

namespace ModuleUpdater.InheritedControls
{
	/// <summary>
	/// This class inherits from the DataGrid class, and creates a specialized datagrid.  This DataGrid has fixed column sizes which the user
	/// cannot resize, and when used in conjuction with DataGridLabelColumn columns, the user cannot select items as well.
	/// </summary>
	public class ColorFixedDataGrid : DataGrid
	{
		private int expandColumn = 0;

		/// <summary>
		/// This function initializes the FixedDataGrid.
		/// </summary>
		public ColorFixedDataGrid()
		{
			this.VisibleChanged += new EventHandler(ColorFixedDataGrid_VisibleChanged);
			this.VertScrollBar.VisibleChanged += new EventHandler(VertScrollBar_VisibleChanged);
			this.HorizScrollBar.VisibleChanged += new EventHandler(HorizScrollBar_VisibleChanged);
		}

		/// <summary>
		/// This function overrides the DataGrid OnMouseDown function, keeping the user from resizing the columns.
		/// </summary>
		/// <param name="e"></param>
		protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
		{
			if(this.HitTest(e.X, e.Y).Type == DataGrid.HitTestType.ColumnResize)
				return;
			base.OnMouseDown(e);
		}

		/// <summary>
		/// This function overrides the DataGrid OnMouseUp function, keeping the user from resizing the columns.
		/// </summary>
		/// <param name="e"></param>
		protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
		{
			if(this.HitTest(e.X, e.Y).Type == DataGrid.HitTestType.ColumnResize)
				return;
			base.OnMouseUp(e);
		}

		/// <summary>
		/// This function overrides the DataGrid OnMouseMove function, keeping the user from resizing the columns.
		/// </summary>
		/// <param name="e"></param>
		protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
		{
			if (this.HitTest(e.X, e.Y).Type == DataGrid.HitTestType.ColumnResize)
				return;
			base.OnMouseMove(e);
		}

		protected override void OnResize(EventArgs e)
		{
			base.OnResize (e);
			this.ResizeColumn();
			base.OnResize (e);
			this.Refresh();
		}

		private void ResizeColumn()
		{
			if (this.TableStyles.Count > 0 && this.DataSource != null)
			{
				int columns = this.TableStyles[0].GridColumnStyles.Count;
				int width = 0;
				for (int i=0; i<columns; i++)
				{
					if (i != this.expandColumn)
						width += this.TableStyles[0].GridColumnStyles[i].Width;
				}

				if (this.VertScrollBar.Visible)
					width += SystemInformation.VerticalScrollBarWidth;

				this.TableStyles[0].GridColumnStyles[this.expandColumn].Width = this.TableStyles[0].DataGrid.ClientSize.Width - width - 5;
			}
		}

		private void VertScrollBar_VisibleChanged(object sender, EventArgs e)
		{
			this.OnResize(new EventArgs());
		}

		protected override void OnDataSourceChanged(EventArgs e)
		{
			this.OnResize(new EventArgs());
		}

		private void ColorFixedDataGrid_VisibleChanged(object sender, EventArgs e)
		{
			this.OnResize(new EventArgs());
		}

		private void HorizScrollBar_VisibleChanged(object sender, EventArgs e)
		{
			this.OnResize(new EventArgs());
		}
	}
}


text:
from keystonemiddleware import auth_token
from oslo_config import cfg
from oslo_middleware import cors
from oslo_middleware import request_id
import pecan

from neutron.api import versions
from neutron.common import exceptions as n_exc
from neutron.pecan_wsgi import hooks
from neutron.pecan_wsgi import startup

CONF = cfg.CONF
CONF.import_opt('bind_host', 'neutron.common.config')
CONF.import_opt('bind_port', 'neutron.common.config')

def setup_app(*args, **kwargs):
    config = {
        'server': {
            'port': CONF.bind_port,
            'host': CONF.bind_host
        },
        'app': {
            'root': 'neutron.pecan_wsgi.controllers.root.RootController',
            'modules': ['neutron.pecan_wsgi'],
        }
        #TODO(kevinbenton): error templates
    }
    pecan_config = pecan.configuration.conf_from_dict(config)

    app_hooks = [
        hooks.ExceptionTranslationHook(),  # priority 100
        hooks.ContextHook(),  # priority 95
        hooks.BodyValidationHook(),  # priority 120
        hooks.OwnershipValidationHook(),  # priority 125
        hooks.QuotaEnforcementHook(),  # priority 130
        hooks.NotifierHook(),  # priority 135
        hooks.PolicyHook(),  # priority 140
    ]

    app = pecan.make_app(
        pecan_config.app.root,
        debug=False,
        wrap_app=_wrap_app,
        force_canonical=False,
        hooks=app_hooks,
        guess_content_type_from_ext=True
    )
    startup.initialize_all()

    return app

def _wrap_app(app):
    app = request_id.RequestId(app)
    if cfg.CONF.auth_strategy == 'noauth':
        pass
    elif cfg.CONF.auth_strategy == 'keystone':
        app = auth_token.AuthProtocol(app, {})
    else:
        raise n_exc.InvalidConfigurationOption(
            opt_name='auth_strategy', opt_value=cfg.CONF.auth_strategy)

    # version can be unauthenticated so it goes outside of auth
    app = versions.Versions(app)

    # This should be the last middleware in the list (which results in
    # it being the first in the middleware chain). This is to ensure
    # that any errors thrown by other middleware, such as an auth
    # middleware - are annotated with CORS headers, and thus accessible
    # by the browser.
    app = cors.CORS(app, cfg.CONF)
    app.set_latent(
        allow_headers=['X-Auth-Token', 'X-Identity-Status', 'X-Roles',
                       'X-Service-Catalog', 'X-User-Id', 'X-Tenant-Id',
                       'X-OpenStack-Request-ID'],
        allow_methods=['GET', 'PUT', 'POST', 'DELETE', 'PATCH'],
        expose_headers=['X-Auth-Token', 'X-Subject-Token', 'X-Service-Token',
                        'X-OpenStack-Request-ID']
    )

    return app


text:
Full example

https://unicode-org.github.io/icu/userguide/format_parse/messages/

{gender_of_host, select,
  female {
    {num_guests, plural, offset:1
      =0 {{host} does not give a party.}
      =1 {{host} invites {guest} to her party.}
      =2 {{host} invites {guest} and one other person to her party.}
      other {{host} invites {guest} and # other people to her party.}}}
  male {
    {num_guests, plural, offset:1
      =0 {{host} does not give a party.}
      =1 {{host} invites {guest} to his party.}
      =2 {{host} invites {guest} and one other person to his party.}
      other {{host} invites {guest} and # other people to his party.}}}
  other {
    {num_guests, plural, offset:1
      =0 {{host} does not give a party.}
      =1 {{host} invites {guest} to their party.}
      =2 {{host} invites {guest} and one other person to their party.}
      other {{host} invites {guest} and # other people to their party.}}}}