text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<title>jQuery plugin: Tablesorter 2.0 - Math Widget (beta)</title>

	<link class="ui-theme" rel="stylesheet" href="css/jquery-ui.min.css">

	<link rel="stylesheet" href="css/jq.css">
	<link href="css/prettify.css" rel="stylesheet">

	<link rel="stylesheet" href="../css/theme.blue.css">

tablesorter

Math Widget (beta)

Flexible client-side table sorting

	Back to documentation

Notes

In v2.17.1,

Values added to the data-attribute set by the textAttribute option will now be used in the calculation instead of the actual cell content.

The Grand Total cells now shows a higher precision value to emphasize this point.

In v2.16.4, added:

Two new options: math_prefix and math_suffix, which will be added before or after the prefix or suffix, respectively.

Added "Mask Examples" section with examples, and how to use the $.tablesorter.formatMask function.

This widget will only work in tablesorter version 2.16+ and jQuery version 1.7+.

It adds basic math capabilities. A full list of default formulas is listed in the "Attribute Settings" section.

Add your own custom formulas which manipulating an array of values gathered from the table by row, column or a column block (above).

This is by no means a comprehensive widget that performs like a spreadsheet, but you can customize the data gathering "type" and available "formula", as desired.

The widget will update the calculations based on filtered rows, and will update if any data within the table changes (using update events).

This widget is not optimized for very large tables, for two reasons:

On initialization, it cycles through every table row, calculates the column index, and adds a data-column attribute.

It uses the update method whenever it recalculates values to make the results sortable. This occurs when any of the update methods are used and after the table is filtered.

When setting tablesorter's debug option to true, this widget will output each {type}-{formula} value found, the array of numbers used and the result.

Options

Math widget default options (added inside of tablesorter widgetOptions)

				TIP! Click on the link in the option column to reveal full details (or toggle|show|hide all) or double click to update the browser location.

Option	Default	Description

						math_data
						'math'

							Set this option to point to the named data-attribute. For example, when set to 'math', the widget looks for settings within the data-math attribute.

						math_ignore
						[ ]

							Set this option the column index of columns of data to ignore.

							To ignore the first and second columns in a table, set this option using zero-based column indexs as follows:

// column index(es) to ignore
math_ignore : [0,1]

						math_mask
						'#,##0.00'

							Set this option with an output formatting mask to use *

							As of v2.16.2, you can set a mask for each math cell by adding a data-math-mask data-attribute (the math part of the data-attribute is obtained from the math_data setting).

<th data-math="all-sum" data-math-mask="##0.00">all-sum</th>

Javascript-number-formatter details

Features

Short, fast, flexible yet standalone. Only 75 lines including MIT license info, blank lines & comments.

Accept standard number formatting like #,##0.00 or with negation -000.####.

Accept any country format like # ##0,00, #,###.##, #'###.## or any type of non-numbering symbol.

Accept any numbers of digit grouping. #,##,#0.000 or #,###0.## are all valid.

Accept any redundant/fool-proof formatting. ##,###,##.# or 0#,#00#.###0# are all OK.

Auto number rounding.

Include a prefix & suffix with the mask

Simple interface, just supply mask & value like this: $.tablesorter.formatMask( "0.0000", 3.141592, "prefix ", " suffix" );

$.tablesorter.formatMask( "$ 0.0000 USD", 1234.567, "prefix ", " suffix" );
// prefix $ 1234.5670 USD suffix

Limitation

No scientific/engineering formatting.

Not for date or phone formation.

No color control.

No prefix or suffix is allowed except leading negation symbol. So $#,##0.00 or #,###.##USD will not yield expected outcome. Use '$'+ $.tablesorter.formatMask('#,##0.00', 123.45) or $.tablesorter.formatMask('#,##0.00', 456.789) + 'USD'

The prefix or suffix can not include any numbers (0-9), hashes (#), dashes (-), or plus signs (+)

Note

When there's only one symbol is supplied, system will always treat the single symbol as Decimal. For instance, $.tablesorter.formatMask( '#,###', 1234567.890) will output 1234567,890.

To force a single symbol as Separator, add a trailing dot to the end like this: $.tablesorter.formatMask( '#,###.', 1234567.890) which will then output 1,234,567.

Original plugin demo

							* The number formatter code was copied from javascript-number-formatter (MIT) - now forked on GitHub.

						math_complete
						null

							This function is called after each calculation is made to allow re-formatting, adding prefixes, suffixes, etc to the result.

							Use this option as follows:

// complete executed after each function
math_complete : function($cell, wo, result, value, arry){
    return '$ ' + result + $cell.attr('data-suffix');
}

$cell - the target cell (jQuery object)

wo - tablesorter's widget options (from table.config.widgetOptions).

result - the formatted result of the calculation.

value - an unformatted result of the calculation.

arry - the array of values gathered by the widget.

							In this function, if a anything is returned, it will be automatically added to the $cell as html. Or, return false and no change is made to the cell contents; use this method if you manipulate the $cell contents and don't want the widget to do it.

							If you need to format the data output after manipulating the value, you can use wo.math_mask, or a different mask, by using the $.tablesorter.formatMask( mask, value ); function. For example:

math_complete : function($cell, wo, result, value, arry){
    var percent = Math.round( value * 1e4 ) / 100; // percent with two decimal places
    return $.tablesorter.formatMask( wo.math_mask, percent ) + ' %';
}

							More details can be found in the math_mask description.

						math_priority
						[ 'row', 'above', 'col' ]

							This is the order of calculations.

By default, the widget cycles through the calculated cells as follows:

Search all non-informational tbodies for data-math table cells (data-attribute set by math_data option).

Cycle through these cells by priority: row, above, col (set by this option).

Search all informational tbodies, and tfoot for data-math table cells.

Cycle through these cells by priority: row, above, col (set by this option).

Search the entire table for data-math cells of the "all" type.

So, all row calculations are made first, followed by "above" calculations then "col" (column) calculations.

The "all" type calculations are always performed last, and therefore the type is not included in this list.

Change this order if the order of calculations needs to be made column first, followed by rows.

For more details about the differences between "col" and "above" types, see the next section.

						math_prefix
						''

							Add content before the value formatted by the math_mask option (v2.16.4).

This option adds content before the mask.

If the mask includes any content for the prefix, then this value is added before it.

If this option contains a {content} tag, the prefix within the mask will replace this tag.

math_mask   : '$ #,##0.00',
math_prefix : '{content}'

// result of the value 12345.67
// <span class="blue">$ </span>12,345.67

									You can experiment with this option in the "Mask Examples" section.

						math_suffix
						''

							Add content after the value formatted by the math_mask option (v2.16.4).

This option adds content after the mask.

If the mask includes any content for the suffix, then this value is added after it.

If this option contains a {content} tag, the suffix within the mask will replace this tag.

math_mask   : '#,##0.00 USD',
math_suffix : '{content}!'

// result of the value 12345.67
// 12,345.67 USD<span class="red">!</span>

									You can experiment with this option in the "Mask Examples" section.

Attribute Settings

			The math widget data-attibute setting requires two parts: type & formula

<td data-math="{type}-{formula}"></td>

			When set, the data is gathered based on the math type ("row", "column", "above" or "all") and passed to the formula as an array.

{type} (data gathering)

row - gather the table cell values from the same row as the data-math attribute.

above - gather the table cell values from the same column as the data-math attribute, but stop when the first table cell is reached, or when another cell with a data-attribute with an "above" type is reached; see the first table demo below to see why this is useful.

col - gather the table cell values from the same column as the data-math attribute.

all - gather all table cell values with a data-math attribute that start with "all".

{formula} (defaults)

count - returns the count (length) of the data set.

sum - returns the sum of all values in the data set.

max - returns the maximum value in the data set.

min - returns the minimum values in the data set.

mean - returns the mean (average) of all values in the data set; it uses the sum formula in part of the calculation.

median - returns the median (middle value) of the data set.

mode - returns an array of the mode(s) (most frequent value or values) in the data set; an array is always returned, even if only one mode exists (see the second demo below).

range - returns the range (highest minus lowest value) of the data set.

varp - returns the variance of the data set (population).

vars - returns the variance of the data set (sample).

stdevp - returns the standard deviation of the data set (population).

stdevs - returns the standard deviation of the data set (sample).

custom (not a default)

Custom formulas can have any name

Return your result after making whatever calculation from the array of data passed to the formula

For example:

// adding a custom equation... named "product"
// access from data-math="row-product" (or "above-product", or "col-product")
$.tablesorter.equations['product'] = function(arry) {
    // multiple all array values together
    var product = 1;
    $.each(arry, function(i,v){
        // oops, we shouldn't have any zero values in the array
        if (v !== 0) {
            product *= v;
        }
    });
    return product;
};

Ignoring cells

Entire row: if the <tr> math data-attribute contains the keyword "ignore" then that entire row of cells will be skipped when building the array of data to be used for calculations.

<tr data-math="ignore"><td>1</td><td>2</td><td>3</td></tr>

Cell: if the table cell math data-attribute contains the keyword "ignore" then that cell will be skipped when building the array of data to be used for calculations.

<td data-math="ignore">1</td>

Column: set the widget math_ignore option with an array of zero-based column indexes of columns to ignore or skip when building the array of data for calculations.

math_ignore : [0,1]

Mask Examples

			The formatting function can be used separately from the math widget:

// $.tablesorter.formatMask(mask, value, prefix, suffix);
$.tablesorter.formatMask('$#,##0.00 USD', 12345.678, 'prefix ', ' suffix');
// result: "prefix $12,345.68 USD suffix"

The $.tablesorter.formatMask function has the following parameters:

mask - please refer to the math_mask option for more details.

value - number to be formatted.

prefix - please refer to the math_prefix option for more details (v2.16.4).

suffix - please refer to the math_suffix option for more details (v2.16.4).

Experiment with the mask:

			<textarea class="source">$#,##0.00 USD
##.000,00 ¥
£-##¿000$00 xx
test:### ###. ing
prefix with a comma, ok? #.00 yep!
prefix with a periods? ok?... #.00 yep!
    prefix with spaces   ##^000*00 suffix, with comma
prefix (#,###.00) suffix

BAD => mask starts with a decimal .00 <= BAD
BAD => mask starts with a comma ,##.00 <= BAD
BAD => No hash (#) outside of mask $#,###.00 No # in suffix <= BAD
BAD => No plus (+) here! #,###.00 ¢ or [+] here <= BAD
BAD => No minus (-) here! $#,###.00 or [-] here either <= BAD</textarea>

		Value to use: <input class="value" type="text" value="1234567.8955" />

		Prefix: <input class="prefix" type="text" value='{content}' /> ( add {content} to include the mask prefix )

		Suffix: <input class="suffix" type="text" value='{content}' /> ( add {content} to include the mask suffix )

		<button>Process</button>

Demo

Row & Column Sums

			Region
			Salesman
			FastCar
			RapidZoo
			SuperGlue
			Grand Total

			Column Totals
			col-sum
			col-sum
			col-sum
			col-sum

			Grand Total
			all-sum

Middle	Joseph	$ 423	$ 182	$ 255	row-sum

Middle	Lawrence	$ 5,908	$ 4,642	$ 4,593	row-sum

Middle	Maria	$ 6,502	$ 3,969	$ 5,408	row-sum

Middle	Matt	$ 4,170	$ 6,093	$ 5,039	row-sum

			Middle Total
			above-sum
			above-sum
			above-sum
			above-sum

North	Joseph	$ 3,643	$ 5,846	$ 6,574	row-sum

North	Lawrence	$ 4,456	$ 6,658	$ 7,685	row-sum

North	Maria	$ 6,235	$ 4,616.99	$ 3,612.33	row-sum

North	Matt	$ 3,868	$ 3,926	$ 3,254	row-sum

			North Total
			above-sum
			above-sum
			above-sum
			above-sum

West	Joseph	$ 5,507	$ 5,186	$ 4,882	row-sum

West	Lawrence	$ 4,082	$ 5,272	$ 6,124	row-sum

West	Maria	$ 5,520	$ 5,461	$ 4,872	row-sum

West	Matt	$ 6,737	$ 4,598	$ 4,233	row-sum

			West Total
			above-sum
			above-sum
			above-sum
			above-sum

Math Formulas

Formula	A	B	C	D	E	F	Result (expected result)

Default Formulas

Count (row-count)	10	10	10	10	20	20

Sum (row-sum)	10	20	10	10	30	20

Max (row-max)	20	60	30	15	30	5

Min (row-min)	20	60	30	15	30	5

Mean (row-mean)	10	20	30	10	30	20

Median (row-median)	10	5	3	4	4	3

Mode (row-mode)	1	2	2	2	3	2

Mode (row-mode)	1	2	2	1	3	4

Range (row-range)	1	-2	2	4	6	0

Variance [population] (row-varp)	2	7	4	5	5	4

Standard Deviation [population] (row-stdevp)	2	7	4	5	5	4

Variance [sample] (row-vars)	2	7	4	5	5	4

Standard Deviation [sample] (row-stdevs)	2	7	4	5	5	4

Custom Formulas

Custom ( (A+B+C)*D - (E/F)*100 )	5	2	3	20	1	2

Product ( A*B*C*D*E*F )	1	2	3	4	5	10

Javascript

Javascript

CSS

HTML


text:
package io.github.chronoscala

import java.time.{Duration, LocalDateTime, Period}
import java.time.format.DateTimeFormatter
import java.time.temporal.{ChronoUnit, TemporalAmount}

class RichLocalDateTime(val underlying: LocalDateTime) extends AnyVal with Ordered[LocalDateTime] {

  def +(millis: Long): LocalDateTime = underlying.plus(millis, ChronoUnit.MILLIS)

  def +(amount: TemporalAmount): LocalDateTime = underlying.plus(amount)

  def +(duration: Duration): LocalDateTime = underlying.plus(duration)

  def +(period: Period): LocalDateTime = underlying.plus(period)

  def -(millis: Long): LocalDateTime = underlying.minus(millis, ChronoUnit.MILLIS)

  def -(amount: TemporalAmount): LocalDateTime = underlying.minus(amount)

  def -(duration: Duration): LocalDateTime = underlying.minus(duration)

  def -(period: Period): LocalDateTime = underlying.minus(period)

  def compare(that: LocalDateTime): Int = underlying.compareTo(that)

  def format(pattern: String): String = underlying.format(DateTimeFormatter.ofPattern(pattern))

}

redpajama_set_name: RedPajamaGithub


text:
namespace hoTools.Extensions
{
    partial class ExtensionGui
    {
        /// <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 Component 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.components = new System.ComponentModel.Container();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.txtSearchTerm = new System.Windows.Forms.TextBox();
            this.btnRunScriptForSql = new System.Windows.Forms.Button();
            this.btnRunScriptForSqlWithAsk = new System.Windows.Forms.Button();
            this.dataGridViewExtensions = new System.Windows.Forms.DataGridView();
            this.contextMenuStripDataGrid = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.runTreeSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.runScriptSelectedItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
            this.runScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.runScriptAndAskToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
            this.loadScriptsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
            this.showScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.ShowErrorToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.tabControlSql = new System.Windows.Forms.TabControl();
            this.btnUndo = new System.Windows.Forms.Button();
            this.btnRedo = new System.Windows.Forms.Button();
            this.btnSave = new System.Windows.Forms.Button();
            this.btnSaveAll = new System.Windows.Forms.Button();
            this.btnSaveAs = new System.Windows.Forms.Button();
            this.btnRun = new System.Windows.Forms.Button();
            this.btnLoadScripts = new System.Windows.Forms.Button();
            this.lblTitle = new System.Windows.Forms.Label();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this._loadTabCtrlLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this._loadTabFromRecentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this._reloadTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this._newTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this._newTabWithFileDialogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this._newTabFromRecentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.runToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
            this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
            this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.loadStandardScriptsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.doToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.exportSQLResultsToExcelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.exportCSVClipboartToExcelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.lastsqlErrorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.lastSqlStringSentToEAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
            this.templatesAndMacrosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
            this.gitHubWiKiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.gitHubWiKiSQLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.gitHubWiKiScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.gitHubRepositoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
            this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.splitContainer = new System.Windows.Forms.SplitContainer();
            this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel();
            this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.menuStrip2 = new System.Windows.Forms.MenuStrip();
            this.fileToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.settingsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.hOtOOLSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.wiKiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.dataGridExtensions = new System.Windows.Forms.DataGridView();
            this.panel1 = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewExtensions)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
            this.splitContainer.SuspendLayout();
            this.menuStrip2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridExtensions)).BeginInit();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            //
            // txtSearchTerm
            //
            this.txtSearchTerm.Location = new System.Drawing.Point(0, 0);
            this.txtSearchTerm.Name = "txtSearchTerm";
            this.txtSearchTerm.Size = new System.Drawing.Size(100, 20);
            this.txtSearchTerm.TabIndex = 0;
            //
            // btnRunScriptForSql
            //
            this.btnRunScriptForSql.Location = new System.Drawing.Point(0, 0);
            this.btnRunScriptForSql.Name = "btnRunScriptForSql";
            this.btnRunScriptForSql.Size = new System.Drawing.Size(75, 23);
            this.btnRunScriptForSql.TabIndex = 0;
            //
            // btnRunScriptForSqlWithAsk
            //
            this.btnRunScriptForSqlWithAsk.Location = new System.Drawing.Point(0, 0);
            this.btnRunScriptForSqlWithAsk.Name = "btnRunScriptForSqlWithAsk";
            this.btnRunScriptForSqlWithAsk.Size = new System.Drawing.Size(75, 23);
            this.btnRunScriptForSqlWithAsk.TabIndex = 0;
            //
            // dataGridViewExtensions
            //
            this.dataGridViewExtensions.Location = new System.Drawing.Point(0, 0);
            this.dataGridViewExtensions.Name = "dataGridViewExtensions";
            this.dataGridViewExtensions.Size = new System.Drawing.Size(240, 150);
            this.dataGridViewExtensions.TabIndex = 0;
            //
            // contextMenuStripDataGrid
            //
            this.contextMenuStripDataGrid.Name = "contextMenuStripDataGrid";
            this.contextMenuStripDataGrid.Size = new System.Drawing.Size(61, 4);
            //
            // runTreeSelectedToolStripMenuItem
            //
            this.runTreeSelectedToolStripMenuItem.Name = "runTreeSelectedToolStripMenuItem";
            this.runTreeSelectedToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // runScriptSelectedItemToolStripMenuItem
            //
            this.runScriptSelectedItemToolStripMenuItem.Name = "runScriptSelectedItemToolStripMenuItem";
            this.runScriptSelectedItemToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator10
            //
            this.toolStripSeparator10.Name = "toolStripSeparator10";
            this.toolStripSeparator10.Size = new System.Drawing.Size(6, 6);
            //
            // runScriptToolStripMenuItem
            //
            this.runScriptToolStripMenuItem.Name = "runScriptToolStripMenuItem";
            this.runScriptToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // runScriptAndAskToolStripMenuItem
            //
            this.runScriptAndAskToolStripMenuItem.Name = "runScriptAndAskToolStripMenuItem";
            this.runScriptAndAskToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator5
            //
            this.toolStripSeparator5.Name = "toolStripSeparator5";
            this.toolStripSeparator5.Size = new System.Drawing.Size(6, 6);
            //
            // loadScriptsToolStripMenuItem
            //
            this.loadScriptsToolStripMenuItem.Name = "loadScriptsToolStripMenuItem";
            this.loadScriptsToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator6
            //
            this.toolStripSeparator6.Name = "toolStripSeparator6";
            this.toolStripSeparator6.Size = new System.Drawing.Size(6, 6);
            //
            // showScriptToolStripMenuItem
            //
            this.showScriptToolStripMenuItem.Name = "showScriptToolStripMenuItem";
            this.showScriptToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // ShowErrorToolStripMenuItem1
            //
            this.ShowErrorToolStripMenuItem1.Name = "ShowErrorToolStripMenuItem1";
            this.ShowErrorToolStripMenuItem1.Size = new System.Drawing.Size(32, 19);
            //
            // tabControlSql
            //
            this.tabControlSql.Location = new System.Drawing.Point(0, 0);
            this.tabControlSql.Name = "tabControlSql";
            this.tabControlSql.SelectedIndex = 0;
            this.tabControlSql.Size = new System.Drawing.Size(200, 100);
            this.tabControlSql.TabIndex = 0;
            //
            // btnUndo
            //
            this.btnUndo.Location = new System.Drawing.Point(0, 0);
            this.btnUndo.Name = "btnUndo";
            this.btnUndo.Size = new System.Drawing.Size(75, 23);
            this.btnUndo.TabIndex = 0;
            //
            // btnRedo
            //
            this.btnRedo.Location = new System.Drawing.Point(0, 0);
            this.btnRedo.Name = "btnRedo";
            this.btnRedo.Size = new System.Drawing.Size(75, 23);
            this.btnRedo.TabIndex = 0;
            //
            // btnSave
            //
            this.btnSave.Location = new System.Drawing.Point(0, 0);
            this.btnSave.Name = "btnSave";
            this.btnSave.Size = new System.Drawing.Size(75, 23);
            this.btnSave.TabIndex = 0;
            //
            // btnSaveAll
            //
            this.btnSaveAll.Location = new System.Drawing.Point(0, 0);
            this.btnSaveAll.Name = "btnSaveAll";
            this.btnSaveAll.Size = new System.Drawing.Size(75, 23);
            this.btnSaveAll.TabIndex = 0;
            //
            // btnSaveAs
            //
            this.btnSaveAs.Location = new System.Drawing.Point(0, 0);
            this.btnSaveAs.Name = "btnSaveAs";
            this.btnSaveAs.Size = new System.Drawing.Size(75, 23);
            this.btnSaveAs.TabIndex = 0;
            //
            // btnRun
            //
            this.btnRun.Location = new System.Drawing.Point(0, 0);
            this.btnRun.Name = "btnRun";
            this.btnRun.Size = new System.Drawing.Size(75, 23);
            this.btnRun.TabIndex = 0;
            //
            // btnLoadScripts
            //
            this.btnLoadScripts.Location = new System.Drawing.Point(0, 0);
            this.btnLoadScripts.Name = "btnLoadScripts";
            this.btnLoadScripts.Size = new System.Drawing.Size(75, 23);
            this.btnLoadScripts.TabIndex = 0;
            //
            // lblTitle
            //
            this.lblTitle.Location = new System.Drawing.Point(0, 0);
            this.lblTitle.Name = "lblTitle";
            this.lblTitle.Size = new System.Drawing.Size(100, 23);
            this.lblTitle.TabIndex = 0;
            //
            // menuStrip1
            //
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(200, 24);
            this.menuStrip1.TabIndex = 0;
            //
            // fileToolStripMenuItem
            //
            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            this.fileToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // _loadTabCtrlLToolStripMenuItem
            //
            this._loadTabCtrlLToolStripMenuItem.Name = "_loadTabCtrlLToolStripMenuItem";
            this._loadTabCtrlLToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // _loadTabFromRecentToolStripMenuItem
            //
            this._loadTabFromRecentToolStripMenuItem.Name = "_loadTabFromRecentToolStripMenuItem";
            this._loadTabFromRecentToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // _reloadTabToolStripMenuItem
            //
            this._reloadTabToolStripMenuItem.Name = "_reloadTabToolStripMenuItem";
            this._reloadTabToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator2
            //
            this.toolStripSeparator2.Name = "toolStripSeparator2";
            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 6);
            //
            // _newTabToolStripMenuItem
            //
            this._newTabToolStripMenuItem.Name = "_newTabToolStripMenuItem";
            this._newTabToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // _newTabWithFileDialogToolStripMenuItem
            //
            this._newTabWithFileDialogToolStripMenuItem.Name = "_newTabWithFileDialogToolStripMenuItem";
            this._newTabWithFileDialogToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // _newTabFromRecentToolStripMenuItem
            //
            this._newTabFromRecentToolStripMenuItem.Name = "_newTabFromRecentToolStripMenuItem";
            this._newTabFromRecentToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator1
            //
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 6);
            //
            // runToolStripMenuItem
            //
            this.runToolStripMenuItem.Name = "runToolStripMenuItem";
            this.runToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator3
            //
            this.toolStripSeparator3.Name = "toolStripSeparator3";
            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 6);
            //
            // saveToolStripMenuItem
            //
            this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
            this.saveToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // saveAsToolStripMenuItem
            //
            this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
            this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // saveAllToolStripMenuItem
            //
            this.saveAllToolStripMenuItem.Name = "saveAllToolStripMenuItem";
            this.saveAllToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator4
            //
            this.toolStripSeparator4.Name = "toolStripSeparator4";
            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 6);
            //
            // settingsToolStripMenuItem
            //
            this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
            this.settingsToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // loadStandardScriptsToolStripMenuItem
            //
            this.loadStandardScriptsToolStripMenuItem.Name = "loadStandardScriptsToolStripMenuItem";
            this.loadStandardScriptsToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // doToolStripMenuItem
            //
            this.doToolStripMenuItem.Name = "doToolStripMenuItem";
            this.doToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // exportSQLResultsToExcelToolStripMenuItem
            //
            this.exportSQLResultsToExcelToolStripMenuItem.Name = "exportSQLResultsToExcelToolStripMenuItem";
            this.exportSQLResultsToExcelToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // exportCSVClipboartToExcelToolStripMenuItem
            //
            this.exportCSVClipboartToExcelToolStripMenuItem.Name = "exportCSVClipboartToExcelToolStripMenuItem";
            this.exportCSVClipboartToExcelToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // helpToolStripMenuItem
            //
            this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
            this.helpToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // lastsqlErrorToolStripMenuItem
            //
            this.lastsqlErrorToolStripMenuItem.Name = "lastsqlErrorToolStripMenuItem";
            this.lastsqlErrorToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // lastSqlStringSentToEAToolStripMenuItem
            //
            this.lastSqlStringSentToEAToolStripMenuItem.Name = "lastSqlStringSentToEAToolStripMenuItem";
            this.lastSqlStringSentToEAToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator8
            //
            this.toolStripSeparator8.Name = "toolStripSeparator8";
            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 6);
            //
            // templatesAndMacrosToolStripMenuItem
            //
            this.templatesAndMacrosToolStripMenuItem.Name = "templatesAndMacrosToolStripMenuItem";
            this.templatesAndMacrosToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator7
            //
            this.toolStripSeparator7.Name = "toolStripSeparator7";
            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 6);
            //
            // gitHubWiKiToolStripMenuItem
            //
            this.gitHubWiKiToolStripMenuItem.Name = "gitHubWiKiToolStripMenuItem";
            this.gitHubWiKiToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // gitHubWiKiSQLToolStripMenuItem
            //
            this.gitHubWiKiSQLToolStripMenuItem.Name = "gitHubWiKiSQLToolStripMenuItem";
            this.gitHubWiKiSQLToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // gitHubWiKiScriptToolStripMenuItem
            //
            this.gitHubWiKiScriptToolStripMenuItem.Name = "gitHubWiKiScriptToolStripMenuItem";
            this.gitHubWiKiScriptToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // gitHubRepositoryToolStripMenuItem
            //
            this.gitHubRepositoryToolStripMenuItem.Name = "gitHubRepositoryToolStripMenuItem";
            this.gitHubRepositoryToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // toolStripSeparator9
            //
            this.toolStripSeparator9.Name = "toolStripSeparator9";
            this.toolStripSeparator9.Size = new System.Drawing.Size(6, 6);
            //
            // aboutToolStripMenuItem
            //
            this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
            this.aboutToolStripMenuItem.Size = new System.Drawing.Size(32, 19);
            //
            // splitContainer
            //
            this.splitContainer.Location = new System.Drawing.Point(0, 0);
            this.splitContainer.Name = "splitContainer";
            this.splitContainer.Size = new System.Drawing.Size(150, 100);
            this.splitContainer.TabIndex = 0;
            //
            // flowLayoutPanel4
            //
            this.flowLayoutPanel4.Location = new System.Drawing.Point(0, 0);
            this.flowLayoutPanel4.Name = "flowLayoutPanel4";
            this.flowLayoutPanel4.Size = new System.Drawing.Size(200, 100);
            this.flowLayoutPanel4.TabIndex = 0;
            //
            // flowLayoutPanel2
            //
            this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0);
            this.flowLayoutPanel2.Name = "flowLayoutPanel2";
            this.flowLayoutPanel2.Size = new System.Drawing.Size(200, 100);
            this.flowLayoutPanel2.TabIndex = 0;
            //
            // tableLayoutPanel1
            //
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.Size = new System.Drawing.Size(200, 100);
            this.tableLayoutPanel1.TabIndex = 0;
            //
            // menuStrip2
            //
            this.menuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem1,
            this.helpToolStripMenuItem1,
            this.toolStripMenuItem1});
            this.menuStrip2.Location = new System.Drawing.Point(0, 0);
            this.menuStrip2.Name = "menuStrip2";
            this.menuStrip2.Size = new System.Drawing.Size(471, 25);
            this.menuStrip2.TabIndex = 1;
            this.menuStrip2.Text = "menuStrip2";
            //
            // fileToolStripMenuItem1
            //
            this.fileToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.settingsToolStripMenuItem1});
            this.fileToolStripMenuItem1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.fileToolStripMenuItem1.Name = "fileToolStripMenuItem1";
            this.fileToolStripMenuItem1.Size = new System.Drawing.Size(39, 21);
            this.fileToolStripMenuItem1.Text = "File";
            //
            // settingsToolStripMenuItem1
            //
            this.settingsToolStripMenuItem1.Name = "settingsToolStripMenuItem1";
            this.settingsToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
            this.settingsToolStripMenuItem1.Text = "Settings";
            this.settingsToolStripMenuItem1.Click += new System.EventHandler(this.settingsToolStripMenuItem1_Click);
            //
            // helpToolStripMenuItem1
            //
            this.helpToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.hOtOOLSToolStripMenuItem,
            this.wiKiToolStripMenuItem});
            this.helpToolStripMenuItem1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
            this.helpToolStripMenuItem1.Size = new System.Drawing.Size(47, 21);
            this.helpToolStripMenuItem1.Text = "Help";
            //
            // hOtOOLSToolStripMenuItem
            //
            this.hOtOOLSToolStripMenuItem.Name = "hOtOOLSToolStripMenuItem";
            this.hOtOOLSToolStripMenuItem.Size = new System.Drawing.Size(122, 22);
            this.hOtOOLSToolStripMenuItem.Text = "hoTools";
            //
            // wiKiToolStripMenuItem
            //
            this.wiKiToolStripMenuItem.Name = "wiKiToolStripMenuItem";
            this.wiKiToolStripMenuItem.Size = new System.Drawing.Size(122, 22);
            this.wiKiToolStripMenuItem.Text = "WiKi";
            //
            // toolStripMenuItem1
            //
            this.toolStripMenuItem1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size = new System.Drawing.Size(26, 21);
            this.toolStripMenuItem1.Text = "?";
            //
            // dataGridExtensions
            //
            this.dataGridExtensions.BackgroundColor = System.Drawing.SystemColors.ControlLight;
            this.dataGridExtensions.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridExtensions.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dataGridExtensions.Location = new System.Drawing.Point(0, 25);
            this.dataGridExtensions.Name = "dataGridExtensions";
            this.dataGridExtensions.Size = new System.Drawing.Size(471, 231);
            this.dataGridExtensions.TabIndex = 4;
            //
            // panel1
            //
            this.panel1.Controls.Add(this.button2);
            this.panel1.Controls.Add(this.button1);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel1.Location = new System.Drawing.Point(0, 256);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(471, 25);
            this.panel1.TabIndex = 5;
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(3, -1);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 6;
            this.button1.Text = "Reload All";
            this.toolTip1.SetToolTip(this.button1, "Reload all c# Extensions that are in the Extension path.\r\n\r\nSee Settings.");
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(84, 0);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 7;
            this.button2.Text = "Details";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            //
            // ExtensionGui
            //
            this.Controls.Add(this.dataGridExtensions);
            this.Controls.Add(this.menuStrip2);
            this.Controls.Add(this.panel1);
            this.Name = "ExtensionGui";
            this.Size = new System.Drawing.Size(471, 281);
            this.Load += new System.EventHandler(this.ExtensionGui_Load);
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewExtensions)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
            this.splitContainer.ResumeLayout(false);
            this.menuStrip2.ResumeLayout(false);
            this.menuStrip2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridExtensions)).EndInit();
            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
        private System.Windows.Forms.ToolTip toolTip1;
        private System.Windows.Forms.Label lblTitle;
        private System.Windows.Forms.Button btnLoadScripts;
        private System.Windows.Forms.DataGridView dataGridViewExtensions;
        private System.Windows.Forms.Button btnRunScriptForSql;
        private System.Windows.Forms.TabControl tabControlSql;
        private System.Windows.Forms.ContextMenuStrip contextMenuStripDataGrid;
        private System.Windows.Forms.ToolStripMenuItem ShowErrorToolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem runScriptToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem showScriptToolStripMenuItem;
        private System.Windows.Forms.TextBox txtSearchTerm;
        private System.Windows.Forms.Button btnRunScriptForSqlWithAsk;
        private System.Windows.Forms.ToolStripMenuItem _newTabToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem lastsqlErrorToolStripMenuItem;
        private System.Windows.Forms.SplitContainer splitContainer;
        private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
        private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4;
        private System.Windows.Forms.ToolStripMenuItem _loadTabFromRecentToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem _newTabFromRecentToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
        private System.Windows.Forms.ToolStripMenuItem runToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
        private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
        private System.Windows.Forms.ToolStripMenuItem saveAllToolStripMenuItem;
        private System.Windows.Forms.Button btnUndo;
        private System.Windows.Forms.Button btnRedo;
        private System.Windows.Forms.ToolStripMenuItem lastSqlStringSentToEAToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem _loadTabCtrlLToolStripMenuItem;
        private System.Windows.Forms.Button btnSave;
        private System.Windows.Forms.Button btnSaveAll;
        private System.Windows.Forms.Button btnSaveAs;
        private System.Windows.Forms.Button btnRun;
        private System.Windows.Forms.ToolStripMenuItem templatesAndMacrosToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem runScriptAndAskToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
        private System.Windows.Forms.ToolStripMenuItem loadScriptsToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
        private System.Windows.Forms.ToolStripMenuItem loadStandardScriptsToolStripMenuItem;
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
        private System.Windows.Forms.ToolStripMenuItem _reloadTabToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem _newTabWithFileDialogToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
        private System.Windows.Forms.ToolStripMenuItem gitHubWiKiToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem gitHubWiKiSQLToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem gitHubWiKiScriptToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem gitHubRepositoryToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
        private System.Windows.Forms.ToolStripMenuItem runScriptSelectedItemToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem runTreeSelectedToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
        private System.Windows.Forms.ToolStripMenuItem doToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem exportSQLResultsToExcelToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem exportCSVClipboartToExcelToolStripMenuItem;
        private System.Windows.Forms.MenuStrip menuStrip2;
        private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem hOtOOLSToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem wiKiToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem1;
        private System.Windows.Forms.DataGridView dataGridExtensions;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
    }
}


text:
'use strict';

module.exports = function (options) {

    options.grid = {

        columns: '16',
        'gutter-width': '20px',

        'float-breakpoint': options['screen-sm-min']

    };

    options.grid['float-breakpoint-max'] = parseInt(options.grid['float-breakpoint']) - 1 + 'px';

    return options;
};


text:
package com.lifeonwalden.etl4j.workflow;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.lifeonwalden.etl4j.BaseTest;

public class LoadTest extends BaseTest {
  @Before
  public void setup() throws ClassNotFoundException, SQLException {
    super.setup();

    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);
    connection.createStatement().executeUpdate(
        "create table \"People\" (\"id\" varchar(32), \"age\" int, \"income\" decimal(20,6), \"birthday\" datetime)");
  }

  @Test
  public void paramMetadata_insert() throws SQLException, ClassNotFoundException {
    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);

    Load load = new Load("insert into \"People\" values(?,?,?,?)", connection);

    Assert.assertFalse(load.getParamMapping().isEmpty());

    connection.close();
  }

  @Test
  public void paramMetadata_update() throws SQLException, ClassNotFoundException {
    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);

    Load load = new Load("update \"People\" set \"age\" = ? where \"id\"=?", connection);

    Assert.assertFalse(load.getParamMapping().isEmpty());

    connection.close();
  }

  @Test
  public void paramMetadata_part() throws SQLException, ClassNotFoundException {
    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);

    Load load = new Load("insert into \"People\"(\"id\",\"age\") values(?,?)", connection);

    Assert.assertFalse(load.getParamMapping().isEmpty());

    connection.close();
  }

  @Test
  public void load_full() throws SQLException, ClassNotFoundException {
    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);

    Load load = new Load("insert into \"People\" values(?,?,?,?)", connection);
    Extract extract = new Extract("User", connection);
    extract.query(null);
    while (extract.next()) {
      load.writeAtIndex(extract.fetchNextWithIndex());
    }
    load.close();
    extract.close();

    Extract extractPeople = new Extract("People", connection);
    extractPeople.query(null);
    Assert.assertTrue(extractPeople.next());

    connection.close();
  }

  @Test
  public void load_part() throws SQLException, ClassNotFoundException {
    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);

    Load load = new Load("insert into \"People\"(\"id\",\"birthday\") values(?,?)", connection);
    Extract extract = new Extract("select \"id\",\"birthday\" from \"User\"", connection);
    extract.query(null);
    while (extract.next()) {
      load.writeAtIndex(extract.fetchNextWithIndex());
    }
    load.close();
    extract.close();

    Extract extractPeople = new Extract("People", connection);
    extractPeople.query(null);
    Assert.assertTrue(extractPeople.next());

    connection.close();
  }

  @Test
  public void load_mixOrder() throws SQLException, ClassNotFoundException {
    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);

    Load load = new Load("insert into \"People\"(\"id\",\"birthday\",\"income\", \"age\") values(?,?,?,?)", connection);
    Extract extract = new Extract("select \"id\",\"birthday\",\"income\", \"age\" from \"User\"", connection);
    extract.query(null);
    while (extract.next()) {
      load.writeAtIndex(extract.fetchNextWithIndex());
    }
    load.close();
    extract.close();

    Extract extractPeople = new Extract("People", connection);
    extractPeople.query(null);
    Assert.assertTrue(extractPeople.next());

    connection.close();
  }

  @Test
  public void load_null() throws SQLException, ClassNotFoundException {
    Class.forName("org.hsqldb.jdbcDriver");

    Connection connection = DriverManager.getConnection(CONNECTION_STRING, USER_NAME, PASSWORD);

    Load load = new Load("insert into \"People\"(\"id\",\"birthday\",\"income\", \"age\") values(?,?,?,?)", connection);
    Extract extract = new Extract("select \"id\",null,\"income\", \"age\" from \"User\"", connection);
    extract.query(null);
    while (extract.next()) {
      load.writeAtIndex(extract.fetchNextWithIndex());
    }
    load.close();
    extract.close();

    Extract extractPeople = new Extract("People", connection);
    extractPeople.query(null);
    Assert.assertTrue(extractPeople.next());

    connection.close();
  }
}


text:
<?php

namespace Magento\Indexer\Block\Backend\Grid\Column\Renderer;

class Scheduled extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
    /**
     * Render whether indexer is scheduled
     *
     * @param \Magento\Framework\DataObject $row
     * @return string
     */
    public function render(\Magento\Framework\DataObject $row)
    {
        if ($this->_getValue($row)) {
            $class = 'grid-severity-notice';
            $text = __('Update by Schedule');
        } else {
            $class = 'grid-severity-major';
            $text = __('Update on Save');
        }
        return '' . $text . '';
    }
}


text:
var nodeunit = require("nodeunit");
var reporter = nodeunit.reporters.default;
var fs = require("fs");
var path = require("path");

var testRe = /^test.*\.js$/i

// recursively check files / directories for test files
var checkFile = function(checkPath) {
    var paths = [];
    var stat = fs.statSync(checkPath);
    if (stat.isDirectory()) {
        var subPaths = fs.readdirSync(checkPath);
        for (var p=0; p<subPaths.length; p++) {
            var subPath = subPaths[p];
            paths = paths.concat(checkFile(path.join(checkPath, subPath)));
        }
    } else if (path.basename(checkPath).match(testRe)) {
        paths.push(checkPath);
    }
    return paths;
}

var argPaths = [];
var args = process.argv;

if (args.length < 3) {
    // default test lookup directory is cwd
    args.push("./");
}

// parse arguments for paths
for (var i=2; i<args.length; i++) {
    var argPath = args[i];
    argPaths = argPaths.concat(checkFile(argPath));
}

// run tests on "discovered" test files
reporter.run(argPaths);


text:
<?php

namespace Path\Entity;

use Position\Entity\PositionInterface;
use Position\Entity\PositionTrait;

class Path implements PositionInterface
{
	use PositionTrait;

	/**
	 * @var integer
	 */
	protected $cost;

	/**
	 * @param integer $cost
	 *
	 * @return $this
	 */
	public function setCost($cost)
	{
		$this->cost = $cost;

		return $this;
	}

	public function getCost()
	{
		return $this->cost;
	}
}


text:
package com.bt.pi.core.past;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import com.bt.pi.core.continuation.PiContinuation;
import com.bt.pi.core.continuation.UpdateResolvingPiContinuation;
import com.bt.pi.core.dht.DhtReader;
import com.bt.pi.core.dht.DhtWriter;
import com.bt.pi.core.id.PId;

public class MergePastAfterSplittingRing extends DhtIntegrationTestBase {
    private static final Log LOG = LogFactory.getLog(MergePastAfterSplittingRing.class);
    private PId[] myPiEntityIds;
    private AtomicInteger count;

    @Before
    public void before() throws Exception {
        numberOfNodes = 5;
        super.before();

        count = new AtomicInteger(0);
    }

    @Override
    protected void seedInitialDhtRecords() {
        myPiEntityIds = new PId[lordOfTheRings.getRingSize()];
        for (int i = 0; i < myPiEntityIds.length; i++) {
            MyDhtPiEntity myPiEntity = new MyDhtPiEntity(String.format("[%d] Let's play ball: ", i));
            myPiEntityIds[i] = currentKoalaIdFactory.buildPId(myPiEntity.getUrl()).forLocalAvailabilityZone();
            currentDhtClientFactory.createBlockingWriter().put(myPiEntityIds[i], myPiEntity);
        }
    }

    private void readEntity(final int nodeNumber) {
        changeContextToNode(nodeNumber);

        DhtReader dhtReader = currentDhtClientFactory.createReader();
        dhtReader.getAsync(myPiEntityIds[nodeNumber], new PiContinuation<MyDhtPiEntity>() {
            @Override
            public void handleResult(MyDhtPiEntity result) {
                LOG.debug("Read result" + result);
                if (count.incrementAndGet() % 10 == 0)
                    throw new NullPointerException();
            }

            @Override
            public void handleException(Exception e) {
                LOG.error("Unable to read my pi entity from node " + nodeNumber, e);
            }
        });
    }

    private void updateEntityInNode(int nodeNumber, final String name) throws Exception {
        changeContextToNode(nodeNumber);

        final CountDownLatch latch = new CountDownLatch(1);
        DhtWriter dhtWriter = currentDhtClientFactory.createWriter();
        dhtWriter.update(myPiEntityIds[nodeNumber], new UpdateResolvingPiContinuation<MyDhtPiEntity>() {
            @Override
            public void handleResult(MyDhtPiEntity result) {
                LOG.info("Updated my pi entity to " + result);
                latch.countDown();
                if (count.incrementAndGet() % 10 == 0)
                    throw new NullPointerException();
            }

            @Override
            public MyDhtPiEntity update(MyDhtPiEntity existingEntity, MyDhtPiEntity requestedEntity) {
                if (existingEntity == null)
                    return new MyDhtPiEntity(name);

                existingEntity.setName(existingEntity.getName() + " " + name);
                return existingEntity;
            }
        });

        // // wait for dht update to complete
        // for (int i = 0; i < 500 && !latch.await(50, TimeUnit.MILLISECONDS); i++)
        // ;
        //
        // LOG.info(String.format("Result of dht update on node %d to name %s was %s", nodeNumber, name, latch.await(1,
        // TimeUnit.NANOSECONDS) ? "successful" : "unsuccessful"));
    }

    @Ignore("The test might fail due to the occasional exception")
    @Test
    public void testSplittingOfRingAndMergingOfData() throws Exception {
        takeNodesDown(2);
        LOG.info("Nodes 0 and 1 have gone down");

        updateEntityInNode(4, "strike 1,");
        LOG.info("Strike 1");
        updateEntityInNode(4, "strike 2,");
        LOG.info("Strike 2");
        updateEntityInNode(4, "strike 3, out.");
        LOG.info("1st Out");

        bringUpNodes(2, true);
        LOG.info("Nodes 1 and 2 have come back up in their own ring");

        updateEntityInNode(0, "ball 1,");
        LOG.info("Ball 1");
        updateEntityInNode(0, "ball 2,");
        LOG.info("Ball 2");
        updateEntityInNode(0, "ball 3,");
        LOG.info("Ball 3");
        updateEntityInNode(0, "ball 4, walk.");
        LOG.info("Walk");

        updateEntityInNode(4, "strike 1,");
        LOG.info("Strike 1");
        updateEntityInNode(4, "double, runners on 2nd & 3rd.");
        LOG.info("Double, 2nd and 3rd base");

        takeNodesDown(2);
        LOG.info("Nodes 0 and 1 have gone down again");

        bringUpNodes(2, false);
        LOG.info("Nodes 1 and 2 have come back up in the original ring");

        updateEntityInNode(4, "ground ball to 2B, out 2.");
        LOG.info("Out 2");

        updateEntityInNode(0, "fly ball to left field, inning over.");
        LOG.info("Inning over");

        Thread.sleep(30 * 1000);

        for (int i = 0; i < myPiEntityIds.length; i++) {
            MyDhtPiEntity result = (MyDhtPiEntity) currentDhtClientFactory.createBlockingReader().get(myPiEntityIds[i]);
            LOG.info("Final value in the dht is : " + result);
        }
    }

    @Ignore("The test might fail due to the occasional exception")
    @Test
    public void testSplittingOfRingAndCausingNetworkQueueExceptions() throws Exception {
        takeNodesDown(2);
        LOG.info("Nodes 0 and 1 have gone down");

        for (int i = 0; i < 20; i++) {
            updateEntityInNode(2, "strike 1,");
            updateEntityInNode(3, "strike 2,");
            updateEntityInNode(4, "strike 3, out.");
        }
        Thread.sleep(100 * 1000);
        LOG.info("Round 1 over");

        for (int i = 2; i < lordOfTheRings.getRingSize(); i++) {
            readEntity(i);
        }
        LOG.info("Round 1.5 over");

        bringUpNodes(2, true);
        LOG.info("Nodes 1 and 2 have come back up in their own ring");

        for (int i = 0; i < 20; i++) {
            updateEntityInNode(0, "ball 1,");
            updateEntityInNode(1, "ball 2,");
            updateEntityInNode(2, "strike 1,");
            updateEntityInNode(3, "strike 2,");
            updateEntityInNode(4, "strike 3, out.");
        }
        LOG.info("Round 2 over");

        for (int i = 0; i < lordOfTheRings.getRingSize(); i++) {
            readEntity(i);
        }
        LOG.info("Round 2.5 over");

        takeNodesDown(2);
        LOG.info("Nodes 0 and 1 have gone down again");

        bringUpNodes(2, false);
        LOG.info("Nodes 1 and 2 have come back up in the original ring");

        for (int i = 0; i < 20; i++) {
            updateEntityInNode(0, "ball 1,");
            updateEntityInNode(1, "ball 2,");
            updateEntityInNode(2, "strike 1,");
            updateEntityInNode(3, "strike 2,");
            updateEntityInNode(4, "strike 3, out.");
        }
        LOG.info("Round 3 over");

        for (int i = 0; i < lordOfTheRings.getRingSize(); i++) {
            readEntity(i);
        }
        LOG.info("Round 3.5 over");

        Thread.sleep(30 * 1000);

        for (int i = 0; i < myPiEntityIds.length; i++) {
            MyDhtPiEntity result = (MyDhtPiEntity) currentDhtClientFactory.createBlockingReader().get(myPiEntityIds[i]);
            LOG.info("Final value in the dht is : " + result);
        }
    }
}


text:
/**
 * Transformation from EPSG:4326 to EPSG:3857.
 *
 * @param {Array<number>} input Input array of coordinate values.
 * @param {Array<number>} [opt_output] Output array of coordinate values.
 * @param {number} [opt_dimension] Dimension (default is `2`).
 * @return {Array<number>} Output array of coordinate values.
 */
export function fromEPSG4326(input: Array<number>, opt_output?: Array<number>, opt_dimension?: number): Array<number>;
/**
 * Transformation from EPSG:3857 to EPSG:4326.
 *
 * @param {Array<number>} input Input array of coordinate values.
 * @param {Array<number>} [opt_output] Output array of coordinate values.
 * @param {number} [opt_dimension] Dimension (default is `2`).
 * @return {Array<number>} Output array of coordinate values.
 */
export function toEPSG4326(input: Array<number>, opt_output?: Array<number>, opt_dimension?: number): Array<number>;
/**
 * Radius of WGS84 sphere
 *
 * @const
 * @type {number}
 */
export const RADIUS: number;
/**
 * @const
 * @type {number}
 */
export const HALF_SIZE: number;
/**
 * @const
 * @type {import("../extent.js").Extent}
 */
export const EXTENT: import("../extent.js").Extent;
/**
 * @const
 * @type {import("../extent.js").Extent}
 */
export const WORLD_EXTENT: import("../extent.js").Extent;
/**
 * Maximum safe value in y direction
 * @const
 * @type {number}
 */
export const MAX_SAFE_Y: number;
/**
 * Projections equal to EPSG:3857.
 *
 * @const
 * @type {Array<import("./Projection.js").default>}
 */
export const PROJECTIONS: Array<import("./Projection.js").default>;
//# sourceMappingURL=epsg3857.d.ts.map


text:
import { ComponentContainer, GoldenLayout, LayoutConfig } from '../..';

describe('component creation', function () {

	let layout: GoldenLayout;
	const eventListener = globalThis.jasmine.createSpyObj<{itemCreated(): void}>(['itemCreated']);

	beforeAll(function () {
		layout = new GoldenLayout();

		function Recorder(container: ComponentContainer) {
			const span = document.createElement('span');
			span.innerText = 'that worked';
			container.element.appendChild(span);
            return;
		}

		layout.registerComponentFactoryFunction('testComponent', Recorder);

		layout.addEventListener('itemCreated', eventListener.itemCreated);
	});

	afterAll(function () {
		layout.destroy();
	});

	it('results in an event emitted for each component in the layout', function () {
		expect(eventListener.itemCreated).not.toHaveBeenCalled();

		const config: LayoutConfig = {
			root: {
				type: 'column',
				content: [
					{
						type: 'stack',
						content: [
							{
								type: 'component',
								componentType: 'testComponent'
							}
						]
					}
				]
			}
		};

		layout.loadLayout(config);

		expect(eventListener.itemCreated.calls.count()).toBe(3);
	});
});


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.

/** @fileoverview Suite of tests for cr-settings-prefs. */
cr.define('cr_settings_prefs', function() {
  /**
   * Mock of chrome.settingsPrivate API.
   * @constructor
   * @extends {chrome.settingsPrivate}
   */
  function MockSettingsApi() {
    this.prefs = {};
    this.listener_ = null;

    // Hack alert: bind this instance's onPrefsChanged members to this.
    this.onPrefsChanged = {
      addListener: this.onPrefsChanged.addListener.bind(this),
      removeListener: this.onPrefsChanged.removeListener.bind(this),
    };

    for (var testCase of prefsTestCases)
      this.addPref_(testCase.type, testCase.key, testCase.values[0]);
  }

  MockSettingsApi.prototype = {
    // chrome.settingsPrivate overrides.
    onPrefsChanged: {
      addListener: function(listener) {
        this.listener_ = listener;
      },

      removeListener: function(listener) {
        expectNotEquals(null, this.listener_);
        this.listener_ = null;
      },
    },

    getAllPrefs: function(callback) {
      // Send a copy of prefs to keep our internal state private.
      var prefs = [];
      for (var key in this.prefs)
        prefs.push(Object.assign({}, this.prefs[key]));

      callback(prefs);
    },

    setPref: function(key, value, pageId, callback) {
      var pref = this.prefs[key];
      assertNotEquals(undefined, pref);
      assertEquals(typeof value, typeof pref.value);
      assertEquals(Array.isArray(value), Array.isArray(pref.value));

      if (this.failNextSetPref_) {
        callback(false);
        this.failNextSetPref_ = false;
        return;
      }
      assertNotEquals(true, this.disallowSetPref_);

      // TODO(michaelpg): support list and dict prefs.
      var changed = pref.value != value;
      pref.value = value;
      callback(true);

      // Like chrome.settingsPrivate, send a notification when prefs change.
      if (changed)
        this.sendPrefChanges([{key: key, value: value}]);
    },

    getPref: function(key, callback) {
      var pref = this.prefs[key];
      assertNotEquals(undefined, pref);
      callback(Object.assign({}, pref));
    },

    // Functions used by tests.

    /** Instructs the API to return a failure when setPref is next called. */
    failNextSetPref: function() {
      this.failNextSetPref_ = true;
    },

    /** Instructs the API to assert (fail the test) if setPref is called. */
    disallowSetPref: function() {
      this.disallowSetPref_ = true;
    },

    allowSetPref: function() {
      this.disallowSetPref_ = false;
    },

    /**
     * Notifies the listener of pref changes.
     * @param {!Object<{key: string, value: *}>} changes
     */
    sendPrefChanges: function(changes) {
      var prefs = [];
      for (var change of changes) {
        var pref = this.prefs[change.key];
        assertNotEquals(undefined, pref);
        pref.value = change.value;
        prefs.push(Object.assign({}, pref));
      }
      this.listener_(prefs);
    },

    // Private methods for use by the mock API.

    /**
     * @param {!chrome.settingsPrivate.PrefType} type
     * @param {string} key
     * @param {*} value
     */
    addPref_: function(type, key, value) {
      this.prefs[key] = {
        type: type,
        key: key,
        value: value,
      };
    },
  };

  function registerTests() {
    suite('CrSettingsPrefs', function() {
      /**
       * Prefs instance created before each test.
       * @type {CrSettingsPrefs}
       */
      var prefs;

      /** @type {MockSettingsApi} */
      var mockApi = null;

      /**
       * @param {!Object} prefStore Pref store from <cr-settings-prefs>.
       * @param {string} key Pref key of the pref to return.
       * @return {(chrome.settingsPrivate.PrefObject|undefined)}
       */
      function getPrefFromKey(prefStore, key) {
        var path = key.split('.');
        var pref = prefStore;
        for (var part of path) {
          pref = pref[part];
          if (!pref)
            return undefined;
        }
        return pref;
      }

      /**
       * Checks that the mock API pref store contains the expected values.
       * @param {number} testCaseValueIndex The index of possible values from
       *     the test case to check.
       */
      function expectMockApiPrefsSet(testCaseValueIndex) {
        for (var testCase of prefsTestCases) {
          var expectedValue = JSON.stringify(
              testCase.values[testCaseValueIndex]);
          var actualValue = JSON.stringify(mockApi.prefs[testCase.key].value);
          expectEquals(expectedValue, actualValue);
        }
      }

      /**
       * Checks that the <cr-settings-prefs> contains the expected values.
       * @param {number} testCaseValueIndex The index of possible values from
       *     the test case to check.
       */
      function expectPrefsSet(testCaseValueIndex) {
        for (var testCase of prefsTestCases) {
          var expectedValue = JSON.stringify(
              testCase.values[testCaseValueIndex]);
          var actualValue = JSON.stringify(
              prefs.get('prefs.' + testCase.key + '.value'));
          expectEquals(expectedValue, actualValue);
        }
      }

      // Initialize a <cr-settings-prefs> element before each test.
      setup(function(done) {
        mockApi = new MockSettingsApi();
        // TODO(michaelpg): don't use global variables to inject the API.
        window.mockApi = mockApi;

        // Create and attach the <cr-settings-prefs> element.
        PolymerTest.clearBody();
        prefs = document.createElement('cr-settings-prefs');
        document.body.appendChild(prefs);

        window.mockApi = undefined;

        // Wait for CrSettingsPrefs.INITIALIZED.
        if (!CrSettingsPrefs.isInitialized) {
          var listener = function() {
            document.removeEventListener(CrSettingsPrefs.INITIALIZED, listener);
            done();
          };
          document.addEventListener(CrSettingsPrefs.INITIALIZED, listener);
          return;
        }

        done();
      });

      test('receives and caches prefs', function() {
        // Test that each pref has been successfully copied to the Polymer
        // |prefs| property.
        for (var key in mockApi.prefs) {
          var expectedPref = mockApi.prefs[key];
          var actualPref = getPrefFromKey(prefs.prefs, key);
          if (!expectNotEquals(undefined, actualPref)) {
            // We've already registered an error, so skip the pref.
            continue;
          }

          expectEquals(JSON.stringify(expectedPref),
                       JSON.stringify(actualPref));
        }
      });

      test('forwards pref changes to API', function() {
        // Test that cr-settings-prefs uses the setPref API.
        for (var testCase of prefsTestCases)
          prefs.set('prefs.' + testCase.key + '.value', testCase.values[1]);

        // Check that setPref has been called for the right values.
        expectMockApiPrefsSet(1);

        // Test that when setPref fails, the pref is reverted locally.
        for (var testCase of prefsTestCases) {
          mockApi.failNextSetPref();
          prefs.set('prefs.' + testCase.key + '.value', testCase.values[2]);
        }

        expectPrefsSet(1);

        // Test that setPref is not called when the pref doesn't change.
        mockApi.disallowSetPref();
        for (var testCase of prefsTestCases)
          prefs.set('prefs.' + testCase.key + '.value', testCase.values[1]);

        expectMockApiPrefsSet(1);
        mockApi.allowSetPref();
      });

      test('responds to API changes', function() {
        // Changes from the API should not result in those changes being sent
        // back to the API, as this could trigger a race condition.
        mockApi.disallowSetPref();
        var prefChanges = [];
        for (var testCase of prefsTestCases)
          prefChanges.push({key: testCase.key, value: testCase.values[1]});

        // Send a set of changes.
        mockApi.sendPrefChanges(prefChanges);
        expectPrefsSet(1);

        prefChanges = [];
        for (var testCase of prefsTestCases)
          prefChanges.push({key: testCase.key, value: testCase.values[2]});

        // Send a second set of changes.
        mockApi.sendPrefChanges(prefChanges);
        expectPrefsSet(2);

        // Send the same set of changes again -- nothing should happen.
        mockApi.sendPrefChanges(prefChanges);
        expectPrefsSet(2);
      });
    });
  }

  return {
    registerTests: registerTests,
  };
});


text:
Since the beginning of Aurelia days the **[Aurelia Skeleton Navigation Application](https://github.com/aurelia/skeleton-navigation)** is used as a start of almost any Aurelia project. At the same time there were many "newbie" questions in **[Aurelia Gitter chat room](https://gitter.im/Aurelia/Discuss)** about the details of this application's structure.

So, Aurelia-Guides presents the process of building this application gradually from its basic components explaining all necessary details as we go along.

----------

## Tools we will use

- [Sublime 3](http://www.sublimetext.com/3) text editor
-  [Cmder](http://cmder.net/) console
- [Chrome](https://www.google.com/intl/en/chrome/browser/desktop/index.html#brand=CHMB&utm_campaign=en&utm_source=en-ha-na-us-sk&utm_medium=ha) browser
- [WebStorm](https://www.jetbrains.com/webstorm/) in all cases that require the server side debugging

**Note** See [Aurelia Development Environment and Tools](http://blog.aurelia-guides.com/2015/08/22/aurelia-development-environment-and-tools/#comment-33) and [What you need to know before writing your first Aurelia application](http://blog.aurelia-guides.com/2015/08/17/what-you-need-to-know-before-writing-your-first-aurelia-application/) for a more information.

----------

## Building and Running Aurelia Skeleton Navigation application

While a typical application structure seems complicated, when you understand the **application build workflow** everything becomes a lot simpler - which is why we are starting with a graphical rendering of this workflow:

1. The build workflow is run by **[gulp](http://gulpjs.com/)** and it starts by **[transpiling](https://en.wikipedia.org/wiki/Source-to-source_compiler)** the application source code written in **[ECMAScript 6](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts)**
2. The transpiler generated code is written into the ``dist`` folder at which point gulp invokes the **[browserify tool](http://browserify.org/)** to render the application in the browser.

![](http://i.imgur.com/qZEjGlL.png)

----------

## Structure of the Aurelia Skeleton Navigation application

We are building the application which  will at the end have this **final** structure (shown is the version 0.18.1 being current at the time of writing this tutoria)

![](http://i.imgur.com/Xn1J8jh.png)

----------

#### Let's start with the **smallest** meaningful subset of the application skeleton by following next 5 steps

### Step 1

**Create the ``src`` folder and add the 4 minimally required files**

- ``app.html``  Application View

```html
<template>
  ${message}
</template>
```

- ``app.js``  Application View-Model

```javascript
export class App {

  constructor() {
    this.message = "";
  }

  activate() {
    this.message = 'hello world';
  }
}
```

- ``main.js`` Application "entry-point"

```javascript
export function configure(aurelia) {
  aurelia.use
    .standardConfiguration()
    .developmentLogging();

  aurelia.start().then(a => a.setRoot());
}
```

- ``index.html``  This file should **not** be in the ``src`` folder - it should be located at the "root" level - sibling of the ``src`` folder

```html
<!doctype html>
<html>
  <head>
    <title>Aurelia Mini</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body aurelia-app="main">
    <h3>Loading...</h3>

    <script src="jspm_packages/system.js"></script>
    <script src="config.js"></script>
    <script>
      System.import('aurelia-bootstrapper');
    </script>
  </body>
</html>
```

This results with the complete set of source code files, where the **app.js** and **app.html** represent the very basic model / view model pair and the **main.js** file is defined as the application starting point (note the line `` <body aurelia-app="main">`` in the ``index.html``)

Next, note the two "key" lines in ``index.html``

```html
...
<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
...
```
which define the location where to get the [systemjs]() loader.

Lastly observe
```html
<script>
      System.import('aurelia-bootstrapper');
</script>
```

telling the **[systemjs](https://github.com/systemjs/systemjs)** loader fetch and run ``aurelia-bootstrapper`` using the before mentioned ``main.js`` as the start of the execution.

At this point our application skeleton is just this:

![](http://i.imgur.com/Xz91mHF.png)

### Step 2

**Add all runtime (system) components to our application**

It is the package.json file that defineds all "external" runtime components needeed by our application to able to run (in the context of the browser - you can find more details in the [Build - Debug - Deploy Workflow](https://github.com/aurelia-guides/aurelia-guides.md-articles/blob/master/Build-Debug-Deploy-Workflow.md) article). In order to keep this tutorial reasonably short, we will use the package.json that defines all packages needed by this skeleton application in its final state; most of these packages are not needed at this time when our application just shows the string "hello world!" on the screen.

Once the content of the package.json is defined, adding all runtime components is done by the two consecutive commands

```
npm install
jspm install
```

Running the first command takes several minutes (dependent on your computer) and it may emit hundreds of red warning lines caused by the absence of correct set of Microsoft's C++ DLLs used to compile parts of npm modules if you are using Windows as your development environment. None of these messages are fatal, as you will still be able to use JavaScript versions of those components that failed to compile.

The second line ``jspm install`` invokes the [jspm package manager](http://jspm.io/) which is a layer on top of npm and which will fetch all Aurelia Framework components and their direct dependencies. After this step, the project structure grew to be this:

![](http://i.imgur.com/cjaYJOe.png)

### Step 3

**Compile (build) our application**

Again, you can find more details of this step  in the [Build - Debug - Deploy Workflow](https://github.com/aurelia-guides/aurelia-guides.md-articles/blob/master/Build-Debug-Deploy-Workflow.md) article. Here we will just summarize the process that this step requires.

- **Add the ``build`` folder at the application root level, with the content shown below**:

![](http://i.imgur.com/rH7siUt.png)

The javascript files in the tasks folder are **[Gulp](http://gulpjs.com/)** scriptfiles - see **[this](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md)** for details. Just to "show-off", here is the build.js script:

```javascript
var gulp = require('gulp');
var runSequence = require('run-sequence');
var changed = require('gulp-changed');
var plumber = require('gulp-plumber');
var to5 = require('gulp-babel');
var sourcemaps = require('gulp-sourcemaps');
var paths = require('../paths');
var compilerOptions = require('../babel-options');
var assign = Object.assign || require('object.assign');
var notify = require("gulp-notify");

// transpiles changed es6 files to SystemJS format
// the plumber() call prevents 'pipe breaking' caused
// by errors from other gulp plugins
// https://www.npmjs.com/package/gulp-plumber
gulp.task('build-system', function () {
  return gulp.src(paths.source)
    .pipe(plumber({errorHandler: notify.onError("Error: <%= error.message %>")}))
    .pipe(changed(paths.output, {extension: '.js'}))
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(to5(assign({}, compilerOptions, {modules:'system'})))
    .pipe(sourcemaps.write({includeContent: true}))
    .pipe(gulp.dest(paths.output));
});

// copies changed html files to the output directory
gulp.task('build-html', function () {
  return gulp.src(paths.html)
    .pipe(changed(paths.output, {extension: '.html'}))
    .pipe(gulp.dest(paths.output));
});

// copies changed css files to the output directory
gulp.task('build-css', function () {
  return gulp.src(paths.css)
    .pipe(changed(paths.output, {extension: '.css'}))
    .pipe(gulp.dest(paths.output));
});

// this task calls the clean task (located
// in ./clean.js), then runs the build-system
// and build-html tasks in parallel
// https://www.npmjs.com/package/gulp-run-sequence
gulp.task('build', function(callback) {
  return runSequence(
    'clean',
    ['build-system', 'build-html', 'build-css'],
    callback
  );
});

```

- **Add the ``dist`` folder which will contain the output of the build step**

- **Add the ``gulpfile.js`` file  with the following content**

```javascript
// all gulp tasks are located in the ./build/tasks directory
// gulp configuration is in files in ./build directory
require('require-dir')('build/tasks');
```

At this point we can issue ``gulp build`` command which will result with:

```
[17:54:14] Using gulpfile C:\work\Aurelia-Guides\ag-samples\AG_Aurelia_Application_Skeleton\gulpfile.js
[17:54:14] Starting 'build'...
[17:54:14] Starting 'clean'...
[17:54:14] Finished 'clean' after 26 ms
[17:54:14] Starting 'build-system'...
[17:54:14] Starting 'build-html'...
[17:54:14] Starting 'build-css'...
[17:54:14] Finished 'build-css' after 7.84 ms
[17:54:14] Finished 'build-html' after 154 ms
[17:54:15] Finished 'build-system' after 237 ms
[17:54:15] Finished 'build' after 272 ms
```

as a consequence of this process of building, observe that the initially empty ``dist`` folder now contains the compiled versions of our source files. Indeed it is the term ``transpiled`` that shoud be used instead of compiled - see **[this](http://k33g.github.io/2015/05/02/ES6.html)** for more information.

In particular that our original ES6 app.js code

```javascript
export class App {

  constructor() {
    this.message = "";
  }

  activate() {
    this.message = 'hello world';
  }
}
```

got transpiled into

```javascript
System.register([], function (_export) {
  "use strict";

  var App;

  var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  return {
    setters: [],
    execute: function () {
      App = (function () {
        function App() {
          _classCallCheck(this, App);

          this.message = "";
        }

        _createClass(App, [{
          key: "activate",
          value: function activate() {
            this.message = 'hello world';
          }
        }]);

        return App;
      })();

      _export("App", App);
    }
  };
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7TUFBYSxHQUFHOzs7Ozs7Ozs7QUFBSCxTQUFHO0FBRUgsaUJBRkEsR0FBRyxHQUVBO2dDQUZILEdBQUc7O0FBR1osY0FBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUM7U0FDbkI7O3FCQUpVLEdBQUc7O2lCQU1OLG9CQUFHO0FBQ1QsZ0JBQUksQ0FBQyxPQUFPLEdBQUcsYUFBYSxDQUFDO1dBQzlCOzs7ZUFSVSxHQUFHIiwiZmlsZSI6ImFwcC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBBcHAge1xyXG5cclxuICBjb25zdHJ1Y3RvcigpIHtcclxuICAgIHRoaXMubWVzc2FnZSA9IFwiXCI7XHJcbiAgfVxyXG5cclxuICBhY3RpdmF0ZSgpIHtcclxuICAgIHRoaXMubWVzc2FnZSA9ICdoZWxsbyB3b3JsZCc7XHJcbiAgfSAgXHJcbn0iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
```

This is a small but a nice example of why are we using ES6 JavaScript syntax for Aurelia.

### Step 4

**Running our application**

At this point we have everything in place - as we need to execute the ``gulp serve`` command defined as

```javascript
var gulp = require('gulp');
var browserSync = require('browser-sync');

// this task utilizes the browsersync plugin
// to create a dev server instance
// at http://localhost:9000
gulp.task('serve', ['build'], function(done) {
  browserSync({
    open: false,
    port: 9000,
    server: {
      baseDir: ['.'],
      middleware: function (req, res, next) {
        res.setHeader('Access-Control-Allow-Origin', '*');
        next();
      }
    }
  }, done);
});
```

**Important** before running the app (with assistance from **[Browsersync](http://www.browsersync.io/)** tool (see the above defined ``gulp serve`` command, we need to modify the file config.js, created by the ``jspm install'' command we executed before in **Step 2**. Here is the modifed section of this file (the added lines highlighted)

**config.js**

![](http://i.imgur.com/U5tbAwg.png)

Running this (``gulp serve``) command results with

```
λ gulp serve
[18:14:15] Using gulpfile C:\work\Aurelia-Guides\ag-samples\AG_Aurelia_Application_Skeleton\gulpfile.js
[18:14:15] Starting 'build'...
[18:14:15] Starting 'clean'...
[18:14:15] Finished 'clean' after 634 ms
[18:14:15] Starting 'build-system'...
[18:14:15] Starting 'build-html'...
[18:14:15] Starting 'build-css'...
[18:14:15] Finished 'build-css' after 22 ms
[18:14:15] Finished 'build-html' after 41 ms
[18:14:15] Finished 'build-system' after 80 ms
[18:14:15] Finished 'build' after 725 ms
[18:14:15] Starting 'serve'...
[BS] Local URL: http://localhost:9000
[BS] External URL: http://192.168.2.53:9000
[BS] Serving files from: .
[18:14:21] Finished 'serve' after 5.08 s
```

When setting the url to ``http://localhost:9000`` we get the expected view:

![](http://i.imgur.com/pHOZBus.png)

----------

### Adding Navigation (menu bar)

The application we developed so far is nearly complete - it still misses the complete testing infrastructure, that will be addressed in a different article. Aside from that, adding more functionality to the application is relatively very easy, as all we need to do is to add more view / view model pairs and add them to the ``src`` folder which at this point has just three files:

![](http://i.imgur.com/Xz91mHF.png)

While in the general case we will make the content of the ``src`` folder a nested structure to separate files by functionality (or some other preferred way), we can add the basic support for navigation quite simply - since we already added Boostrap and Fonts Awesome files in the **Step 2** above (check the content of the  ``package.json`` file).

Here are the updated versions of the the original  four files, needed to implement navigation.:

**app.html**

```html
<template>
  <require from="nav-bar.html"></require>
  <require from="bootstrap/css/bootstrap.css"></require>

  <nav-bar router.bind="router"></nav-bar>

  <div class="page-host">
    <router-view></router-view>
  </div>
</template>
```

**app.js**

Instead of the trivial initial version of the app.js, where we simply defined the "hello world " string to be printed as the only functionality of the application, here we are defining the three navigation routes, that should (together with **app.html**) result with this menu bar:

![](http://i.imgur.com/AjCDDZb.png)

```javascript
export class App {
  configureRouter(config, router){
    config.title = 'Aurelia';
    config.map([
      { route: ['','welcome'],  name: 'welcome',      moduleId: 'welcome',      nav: true, title:'Welcome' },
      { route: 'users',         name: 'users',        moduleId: 'users',        nav: true, title:'Github Users' },
      { route: 'child-router',  name: 'child-router', moduleId: 'child-router', nav: true, title:'Child Router' }
    ]);

    this.router = router;
  }
}

```
**main.js** - stays as is no changes needed

**index.html**

Almost no changes here - we just added two lines that define the references to .css files we need:

- **font-awesome.min.css** which was added to the project in the **Step 2** above
- **styles/styles.css** -  copied from the [original Navigation Skeleton Application](https://github.com/aurelia/skeleton-navigation)

```html
<!DOCTYPE html>
<html>
  <head>
    <title>Aurelia</title>
    <link rel="stylesheet" href="jspm_packages/npm/font-awesome@4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="styles/styles.css">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>

  <body aurelia-app="main">

    <script src="jspm_packages/system.js"></script>
    <script src="config.js"></script>
    <script>
      System.import('aurelia-bootstrapper');
    </script>
  </body>
</html>

```

The rest of the files:
- blur-image.js
- child-router.html
- child-router.js
- users.html
- users.js
- welcome.html
- welcome.js

are copied from the [original Navigation Skeleton Application](https://github.com/aurelia/skeleton-navigation) as well, without changes.

Finally, run ``gulp serve`` command to see the familiar rendering of our app:

![](http://i.imgur.com/iTD5vcu.png)

This concludes the tutorial


text:
using Digirati.IIIF.Model.JsonLD;
using Newtonsoft.Json;

namespace Digirati.IIIF.Model.Extension
{
    public class SearchResultAnnotationResource : JSONLDBase
    {
        public override string Type
        {
            get { return "cnt:ContentAsText"; }
        }

        // these are not yet in the presentation context
        [JsonProperty(Order = 10, PropertyName = "chars")]
        public string Chars { get; set; }
    }
}


text:
<!DOCTYPE HTML>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>APM, the agile project manager</title>

    <link rel="stylesheet" href="../public/apm-main.css">

APM Demo

        This is a demo of the 'Agile Project Manager'.
        See file README.md for more information.

Loading...