text:
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.2">
	<Title>
		<v8:item>
			<v8:lang>ru</v8:lang>
			<v8:content>Мои задачи</v8:content>
		</v8:item>
	</Title>
	<AutoSaveDataInSettings>Use</AutoSaveDataInSettings>
	<AutoTitle>false</AutoTitle>
	<CommandBarLocation>None</CommandBarLocation>
	<AutoCommandBar name="ФормаКоманднаяПанель" id="-1"/>
	<Events>
		<Event name="NotificationProcessing">ОбработкаОповещения</Event>
		<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
		<Event name="BeforeLoadDataFromSettingsAtServer">ПередЗагрузкойДанныхИзНастроекНаСервере</Event>
	</Events>
	<ChildItems>
		<UsualGroup name="ГруппаПользовательскихНастроек" id="126">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Группа пользовательских настроек</v8:content>
				</v8:item>
			</Title>
			<VerticalStretch>false</VerticalStretch>
			<Group>Vertical</Group>
			<Representation>None</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаПользовательскихНастроекРасширеннаяПодсказка" id="127"/>
		</UsualGroup>
		<CommandBar name="ОсновнаяКоманднаяПанель" id="1">
			<ExtendedTooltip name="ОсновнаяКоманднаяПанельExtendedTooltip" id="85"/>
			<ChildItems>
				<Popup name="СгруппироватьПо" id="51">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Сгруппировать по</v8:content>
						</v8:item>
					</Title>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Сгруппировать по колонке</v8:content>
						</v8:item>
					</ToolTip>
					<ExtendedTooltip name="СгруппироватьПоExtendedTooltip" id="92"/>
					<ChildItems>
						<Button name="СписокСгруппироватьПоСроку" id="132">
							<Type>CommandBarButton</Type>
							<CommandName>Form.Command.СгруппироватьПоСроку</CommandName>
							<ExtendedTooltip name="СписокСгруппироватьПоСрокуРасширеннаяПодсказка" id="133"/>
						</Button>
						<Button name="СписокСгруппироватьПоВажности" id="52">
							<Type>CommandBarButton</Type>
							<SkipOnInput>false</SkipOnInput>
							<CommandName>Form.Command.СгруппироватьПоВажности</CommandName>
							<ExtendedTooltip name="СписокСгруппироватьПоВажностиExtendedTooltip" id="93"/>
						</Button>
						<Button name="СписокСгруппироватьПоТочкеМаршрута" id="53">
							<Type>CommandBarButton</Type>
							<SkipOnInput>false</SkipOnInput>
							<CommandName>Form.Command.СгруппироватьПоТочкеМаршрута</CommandName>
							<ExtendedTooltip name="СписокСгруппироватьПоТочкеМаршрутаExtendedTooltip" id="94"/>
						</Button>
						<Button name="СписокСгруппироватьПоАвтору" id="61">
							<Type>CommandBarButton</Type>
							<SkipOnInput>false</SkipOnInput>
							<CommandName>Form.Command.СгруппироватьПоАвтору</CommandName>
							<ExtendedTooltip name="СписокСгруппироватьПоАвторуExtendedTooltip" id="95"/>
						</Button>
						<Button name="СписокСгруппироватьПоПредмету" id="62">
							<Type>CommandBarButton</Type>
							<SkipOnInput>false</SkipOnInput>
							<CommandName>Form.Command.СгруппироватьПоПредмету</CommandName>
							<ExtendedTooltip name="СписокСгруппироватьПоПредметуExtendedTooltip" id="96"/>
						</Button>
						<Button name="СписокСгруппироватьСгруппироватьПоБезГруппировки" id="54">
							<Type>CommandBarButton</Type>
							<SkipOnInput>false</SkipOnInput>
							<CommandName>Form.Command.СгруппироватьПоБезГруппировки</CommandName>
							<ExtendedTooltip name="СписокСгруппироватьСгруппироватьПоБезГруппировкиExtendedTooltip" id="97"/>
						</Button>
					</ChildItems>
				</Popup>
				<ButtonGroup name="ГруппаОткрыть" id="140">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Группа открыть</v8:content>
						</v8:item>
					</Title>
					<ExtendedTooltip name="ГруппаОткрытьРасширеннаяПодсказка" id="141"/>
					<ChildItems>
						<Button name="ФормаИзменить" id="138">
							<Type>CommandBarButton</Type>
							<CommandName>Form.StandardCommand.Change</CommandName>
							<Title>
								<v8:item>
									<v8:lang>ru</v8:lang>
									<v8:content>Открыть задачу</v8:content>
								</v8:item>
							</Title>
							<ExtendedTooltip name="ФормаИзменитьРасширеннаяПодсказка" id="139"/>
						</Button>
						<Button name="ОткрытьПредметЗадачи" id="134">
							<Type>CommandBarButton</Type>
							<OnlyInAllActions>false</OnlyInAllActions>
							<CommandName>Form.Command.ОткрытьПредметЗадачи</CommandName>
							<ExtendedTooltip name="ОткрытьПредметЗадачиРасширеннаяПодсказка" id="135"/>
						</Button>
						<Button name="ОткрытьБизнесПроцесс" id="136">
							<Type>CommandBarButton</Type>
							<OnlyInAllActions>false</OnlyInAllActions>
							<CommandName>Form.Command.ОткрытьБизнесПроцесс</CommandName>
							<ExtendedTooltip name="ОткрытьБизнесПроцессРасширеннаяПодсказка" id="137"/>
						</Button>
					</ChildItems>
				</ButtonGroup>
				<ButtonGroup name="КоманднаяПанельСписка" id="48">
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Командная панель списка</v8:content>
						</v8:item>
					</Title>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Командная панель списка</v8:content>
						</v8:item>
					</ToolTip>
					<CommandSource>Form</CommandSource>
					<ExtendedTooltip name="КоманднаяПанельСпискаExtendedTooltip" id="91"/>
					<ChildItems>
						<Button name="ФормаНайти" id="128">
							<Type>CommandBarButton</Type>
							<OnlyInAllActions>false</OnlyInAllActions>
							<CommandName>Form.StandardCommand.Find</CommandName>
							<ExtendedTooltip name="ФормаНайтиРасширеннаяПодсказка" id="129"/>
						</Button>
						<Button name="ФормаОтменитьПоиск" id="130">
							<Type>CommandBarButton</Type>
							<OnlyInAllActions>false</OnlyInAllActions>
							<CommandName>Form.StandardCommand.CancelSearch</CommandName>
							<ExtendedTooltip name="ФормаОтменитьПоискРасширеннаяПодсказка" id="131"/>
						</Button>
					</ChildItems>
				</ButtonGroup>
				<Button name="ПринятьКИсполнению" id="80">
					<Type>CommandBarButton</Type>
					<CommandName>Form.Command.ПринятьКИсполнению</CommandName>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>К исполнению</v8:content>
						</v8:item>
					</Title>
					<ExtendedTooltip name="ПринятьКИсполнениюРасширеннаяПодсказка" id="86"/>
				</Button>
				<Button name="ЗадачаЗадачаИсполнителяВыполнено" id="82">
					<Type>CommandBarButton</Type>
					<OnlyInAllActions>false</OnlyInAllActions>
					<CommandName>Task.ЗадачаИсполнителя.Command.Выполнено</CommandName>
					<DataPath>Items.Список.CurrentData.Ref</DataPath>
					<ExtendedTooltip name="ЗадачаЗадачаИсполнителяВыполненоExtendedTooltip" id="87"/>
				</Button>
				<Button name="ЗадачаЗадачаИсполнителяПеренаправить" id="83">
					<Type>CommandBarButton</Type>
					<CommandName>Task.ЗадачаИсполнителя.Command.Перенаправить</CommandName>
					<DataPath>Items.Список.CurrentData.Ref</DataPath>
					<ExtendedTooltip name="ЗадачаЗадачаИсполнителяПеренаправитьExtendedTooltip" id="88"/>
				</Button>
				<Button name="ОтменитьПринятиеКИсполнению" id="81">
					<Type>CommandBarButton</Type>
					<OnlyInAllActions>false</OnlyInAllActions>
					<CommandName>Form.Command.ОтменитьПринятиеКИсполнению</CommandName>
					<ExtendedTooltip name="ОтменитьПринятиеКИсполнениюРасширеннаяПодсказка" id="90"/>
				</Button>
				<ButtonGroup name="КоманднаяПанельФормы" id="8">
					<CommandSource>FormCommandPanelGlobalCommands</CommandSource>
					<ExtendedTooltip name="КоманднаяПанельФормыExtendedTooltip" id="98"/>
				</ButtonGroup>
				<Button name="Справка" id="65">
					<Type>CommandBarButton</Type>
					<SkipOnInput>false</SkipOnInput>
					<CommandName>Form.StandardCommand.Help</CommandName>
					<ExtendedTooltip name="СправкаExtendedTooltip" id="100"/>
				</Button>
			</ChildItems>
		</CommandBar>
		<Table name="Список" id="9">
			<Representation>List</Representation>
			<CommandBarLocation>None</CommandBarLocation>
			<SkipOnInput>false</SkipOnInput>
			<DefaultItem>true</DefaultItem>
			<ChangeRowSet>false</ChangeRowSet>
			<ChangeRowOrder>false</ChangeRowOrder>
			<Height>10</Height>
			<EnableStartDrag>true</EnableStartDrag>
			<DataPath>Список</DataPath>
			<RowPictureDataPath>Список.DefaultPicture</RowPictureDataPath>
			<BorderColor>style:BorderColor</BorderColor>
			<CommandSet>
				<ExcludedCommand>SetDeletionMark</ExcludedCommand>
				<ExcludedCommand>Delete</ExcludedCommand>
			</CommandSet>
			<SearchStringLocation>None</SearchStringLocation>
			<ViewStatusLocation>None</ViewStatusLocation>
			<SearchControlLocation>None</SearchControlLocation>
			<AutoRefresh>true</AutoRefresh>
			<AutoRefreshPeriod>60</AutoRefreshPeriod>
			<Period>
				<v8:variant xsi:type="v8:StandardPeriodVariant">Custom</v8:variant>
				<v8:startDate>0001-01-01T00:00:00</v8:startDate>
				<v8:endDate>0001-01-01T00:00:00</v8:endDate>
			</Period>
			<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
			<RestoreCurrentRow>true</RestoreCurrentRow>
			<TopLevelParent xsi:nil="true"/>
			<ShowRoot>false</ShowRoot>
			<AllowRootChoice>false</AllowRootChoice>
			<UpdateOnDataChange>Auto</UpdateOnDataChange>
			<UserSettingsGroup>ГруппаПользовательскихНастроек</UserSettingsGroup>
			<ContextMenu name="СписокКонтекстноеМеню" id="10">
				<ChildItems>
					<Button name="СписокКонтекстноеМенюИзменить" id="70">
						<Type>CommandBarButton</Type>
						<CommandName>Form.Item.Список.StandardCommand.Change</CommandName>
						<Title>
							<v8:item>
								<v8:lang>ru</v8:lang>
								<v8:content>Открыть задачу</v8:content>
							</v8:item>
						</Title>
						<ExtendedTooltip name="СписокКонтекстноеМенюИзменитьExtendedTooltip" id="101"/>
					</Button>
					<Button name="СписокКонтекстноеМенюОткрытьПредметЗадачи" id="142">
						<Type>CommandBarButton</Type>
						<CommandName>Form.Command.ОткрытьПредметЗадачи</CommandName>
						<ExtendedTooltip name="СписокКонтекстноеМенюОткрытьПредметЗадачиРасширеннаяПодсказка" id="143"/>
					</Button>
					<Button name="СписокКонтекстноеМенюОткрытьБизнесПроцесс" id="144">
						<Type>CommandBarButton</Type>
						<CommandName>Form.Command.ОткрытьБизнесПроцесс</CommandName>
						<ExtendedTooltip name="СписокКонтекстноеМенюОткрытьБизнесПроцессРасширеннаяПодсказка" id="145"/>
					</Button>
					<ButtonGroup name="СписокКонтекстноеМенюГруппа" id="71">
						<ExtendedTooltip name="СписокКонтекстноеМенюГруппаExtendedTooltip" id="102"/>
						<ChildItems>
							<Button name="СписокКонтекстноеМенюПринятьКИсполнению" id="68">
								<Type>CommandBarButton</Type>
								<CommandName>Form.Command.ПринятьКИсполнению</CommandName>
								<ExtendedTooltip name="СписокКонтекстноеМенюПринятьКИсполнениюРасширеннаяПодсказка" id="103"/>
							</Button>
							<Button name="СписокКонтекстноеМенюОтменитьПринятиеКИсполнению" id="69">
								<Type>CommandBarButton</Type>
								<OnlyInAllActions>false</OnlyInAllActions>
								<CommandName>Form.Command.ОтменитьПринятиеКИсполнению</CommandName>
								<ExtendedTooltip name="СписокКонтекстноеМенюОтменитьПринятиеКИсполнениюРасширеннаяПодсказка" id="104"/>
							</Button>
						</ChildItems>
					</ButtonGroup>
					<ButtonGroup name="СписокКонтекстноеМенюГруппаДействия" id="79">
						<ExtendedTooltip name="СписокКонтекстноеМенюГруппаДействияExtendedTooltip" id="105"/>
						<ChildItems>
							<Button name="СписокКонтекстноеМенюЗадачаЗадачаИсполнителяВыполнено" id="78">
								<Type>CommandBarButton</Type>
								<CommandName>Task.ЗадачаИсполнителя.Command.Выполнено</CommandName>
								<DataPath>Items.Список.CurrentData.Ref</DataPath>
								<ExtendedTooltip name="СписокКонтекстноеМенюЗадачаЗадачаИсполнителяВыполненоExtendedTooltip" id="106"/>
							</Button>
							<Button name="СписокКонтекстноеМенюЗадачаЗадачаИсполнителяПеренаправить" id="77">
								<Type>CommandBarButton</Type>
								<CommandName>Task.ЗадачаИсполнителя.Command.Перенаправить</CommandName>
								<DataPath>Items.Список.CurrentData.Ref</DataPath>
								<ExtendedTooltip name="СписокКонтекстноеМенюЗадачаЗадачаИсполнителяПеренаправитьExtendedTooltip" id="107"/>
							</Button>
						</ChildItems>
					</ButtonGroup>
					<Button name="СписокКонтекстноеМенюУстановитьИнтервал" id="73">
						<Type>CommandBarButton</Type>
						<CommandName>Form.Item.Список.StandardCommand.SetDateInterval</CommandName>
						<ExtendedTooltip name="СписокКонтекстноеМенюУстановитьИнтервалExtendedTooltip" id="108"/>
					</Button>
					<ButtonGroup name="СписокКонтекстноеМенюГруппаНайти" id="76">
						<ExtendedTooltip name="СписокКонтекстноеМенюГруппаНайтиExtendedTooltip" id="109"/>
						<ChildItems>
							<Button name="СписокКонтекстноеМенюНайти" id="74">
								<Type>CommandBarButton</Type>
								<CommandName>Form.Item.Список.StandardCommand.Find</CommandName>
								<ExtendedTooltip name="СписокКонтекстноеМенюНайтиExtendedTooltip" id="110"/>
							</Button>
							<Button name="СписокКонтекстноеМенюОтменитьПоиск" id="75">
								<Type>CommandBarButton</Type>
								<CommandName>Form.Item.Список.StandardCommand.CancelSearch</CommandName>
								<ExtendedTooltip name="СписокКонтекстноеМенюОтменитьПоискExtendedTooltip" id="111"/>
							</Button>
						</ChildItems>
					</ButtonGroup>
					<Button name="СписокКонтекстноеМенюКопироватьВБуферОбмена" id="72">
						<Type>CommandBarButton</Type>
						<CommandName>Form.Item.Список.StandardCommand.CopyToClipboard</CommandName>
						<ExtendedTooltip name="СписокКонтекстноеМенюКопироватьВБуферОбменаExtendedTooltip" id="112"/>
					</Button>
				</ChildItems>
			</ContextMenu>
			<AutoCommandBar name="СписокКоманднаяПанель" id="11"/>
			<ExtendedTooltip name="СписокExtendedTooltip" id="113"/>
			<SearchStringAddition name="СписокСтрокаПоиска" id="146">
				<AdditionSource>
					<Item>Список</Item>
					<Type>SearchStringRepresentation</Type>
				</AdditionSource>
				<ContextMenu name="СписокСтрокаПоискаКонтекстноеМеню" id="147"/>
				<ExtendedTooltip name="СписокСтрокаПоискаРасширеннаяПодсказка" id="148"/>
			</SearchStringAddition>
			<ViewStatusAddition name="СписокСостояниеПросмотра" id="149">
				<AdditionSource>
					<Item>Список</Item>
					<Type>ViewStatusRepresentation</Type>
				</AdditionSource>
				<ContextMenu name="СписокСостояниеПросмотраКонтекстноеМеню" id="150"/>
				<ExtendedTooltip name="СписокСостояниеПросмотраРасширеннаяПодсказка" id="151"/>
			</ViewStatusAddition>
			<SearchControlAddition name="СписокУправлениеПоиском" id="152">
				<AdditionSource>
					<Item>Список</Item>
					<Type>SearchControl</Type>
				</AdditionSource>
				<ContextMenu name="СписокУправлениеПоискомКонтекстноеМеню" id="153"/>
				<ExtendedTooltip name="СписокУправлениеПоискомРасширеннаяПодсказка" id="154"/>
			</SearchControlAddition>
			<Events>
				<Event name="BeforeAddRow">СписокПередНачаломДобавления</Event>
				<Event name="OnActivateRow">СписокПриАктивизацииСтроки</Event>
			</Events>
			<ChildItems>
				<PictureField name="Важность" id="24">
					<DataPath>Список.ВажностьКартинка</DataPath>
					<ReadOnly>true</ReadOnly>
					<TitleLocation>None</TitleLocation>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Важность</v8:content>
						</v8:item>
					</ToolTip>
					<HeaderPicture>
						<xr:Ref>CommonPicture.ВосклицательныйЗнакСерый</xr:Ref>
						<xr:LoadTransparent>false</xr:LoadTransparent>
					</HeaderPicture>
					<Width>2</Width>
					<HorizontalStretch>false</HorizontalStretch>
					<ValuesPicture>
						<xr:Ref>CommonPicture.КоллекцияВариантыВажности</xr:Ref>
						<xr:LoadTransparent>false</xr:LoadTransparent>
					</ValuesPicture>
					<ContextMenu name="ВажностьКонтекстноеМеню" id="25"/>
					<ExtendedTooltip name="ВажностьExtendedTooltip" id="114"/>
				</PictureField>
				<LabelField name="Номер" id="57">
					<DataPath>Список.Number</DataPath>
					<ContextMenu name="НомерКонтекстноеМеню" id="58"/>
					<ExtendedTooltip name="НомерExtendedTooltip" id="115"/>
				</LabelField>
				<InputField name="Наименование" id="16">
					<DataPath>Список.Description</DataPath>
					<Wrap>false</Wrap>
					<BorderColor>style:BorderColor</BorderColor>
					<ContextMenu name="НаименованиеКонтекстноеМеню" id="17"/>
					<ExtendedTooltip name="НаименованиеExtendedTooltip" id="116"/>
				</InputField>
				<InputField name="ДатаНачала" id="46">
					<DataPath>Список.ДатаНачала</DataPath>
					<Width>10</Width>
					<Wrap>false</Wrap>
					<ContextMenu name="ДатаНачалаКонтекстноеМеню" id="47"/>
					<ExtendedTooltip name="ДатаНачалаExtendedTooltip" id="117"/>
				</InputField>
				<InputField name="СрокИсполнения" id="36">
					<DataPath>Список.СрокИсполнения</DataPath>
					<Wrap>false</Wrap>
					<BorderColor>style:BorderColor</BorderColor>
					<ContextMenu name="СрокИсполненияКонтекстноеМеню" id="37"/>
					<ExtendedTooltip name="СрокИсполненияExtendedTooltip" id="118"/>
				</InputField>
				<InputField name="Автор" id="40">
					<DataPath>Список.Автор</DataPath>
					<Visible>false</Visible>
					<Wrap>false</Wrap>
					<ContextMenu name="АвторКонтекстноеМеню" id="41"/>
					<ExtendedTooltip name="АвторExtendedTooltip" id="119"/>
				</InputField>
				<LabelField name="Предмет" id="63">
					<DataPath>Список.ПредметСтрокой</DataPath>
					<UserVisible>
						<xr:Common>false</xr:Common>
					</UserVisible>
					<ContextMenu name="ПредметКонтекстноеМеню" id="64"/>
					<ExtendedTooltip name="ПредметExtendedTooltip" id="120"/>
				</LabelField>
				<LabelField name="Дата" id="66">
					<DataPath>Список.Date</DataPath>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Записана</v8:content>
						</v8:item>
					</Title>
					<ContextMenu name="ДатаКонтекстноеМеню" id="67"/>
					<ExtendedTooltip name="ДатаExtendedTooltip" id="121"/>
				</LabelField>
				<LabelField name="Ссылка" id="123">
					<DataPath>Список.Ref</DataPath>
					<UserVisible>
						<xr:Common>false</xr:Common>
					</UserVisible>
					<ContextMenu name="СсылкаКонтекстноеМеню" id="124"/>
					<ExtendedTooltip name="СсылкаРасширеннаяПодсказка" id="125"/>
				</LabelField>
			</ChildItems>
		</Table>
		<CheckBoxField name="ПоказыватьВыполненные" id="38">
			<DataPath>ПоказыватьВыполненные</DataPath>
			<TitleLocation>Right</TitleLocation>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Показывать выполненные задачи</v8:content>
				</v8:item>
			</ToolTip>
			<CheckBoxType>Auto</CheckBoxType>
			<ContextMenu name="ПоказыватьВыполненныеКонтекстноеМеню" id="39"/>
			<ExtendedTooltip name="ПоказыватьВыполненныеExtendedTooltip" id="122"/>
			<Events>
				<Event name="OnChange">ПоказыватьВыполненныеПриИзменении</Event>
			</Events>
		</CheckBoxField>
	</ChildItems>
	<Attributes>
		<Attribute name="Список" id="1">
			<Type>
				<v8:Type>cfg:DynamicList</v8:Type>
			</Type>
			<MainAttribute>true</MainAttribute>
			<UseAlways>
				<Field>Список.ПринятаКИсполнению</Field>
				<Field>Список.Предмет</Field>
				<Field>Список.Ref</Field>
				<Field>Список.BusinessProcess</Field>
			</UseAlways>
			<Settings xsi:type="DynamicList">
				<ManualQuery>true</ManualQuery>
				<DynamicDataRead>false</DynamicDataRead>
				<QueryText>ВЫБРАТЬ
	ЗадачиПоИсполнителю.Ссылка,
	ЗадачиПоИсполнителю.ПометкаУдаления,
	ЗадачиПоИсполнителю.Номер,
	ЗадачиПоИсполнителю.Дата,
	ЗадачиПоИсполнителю.БизнесПроцесс,
	ЗадачиПоИсполнителю.ТочкаМаршрута,
	ЗадачиПоИсполнителю.Наименование,
	ЗадачиПоИсполнителю.Выполнена,
	ЗадачиПоИсполнителю.СрокИсполнения,
	ВЫБОР
		КОГДА ЗадачиПоИсполнителю.ДатаНачала = &НезаполненнаяДата
			ТОГДА &НачалоДня
		ИНАЧЕ ЗадачиПоИсполнителю.ДатаНачала
	КОНЕЦ КАК ДатаНачала,
	ЗадачиПоИсполнителю.ДатаИсполнения,
	ЗадачиПоИсполнителю.Важность,
	ЗадачиПоИсполнителю.Описание,
	ЗадачиПоИсполнителю.РольИсполнителя,
	ЗадачиПоИсполнителю.Исполнитель,
	ЗадачиПоИсполнителю.Представление,
	ЗадачиПоИсполнителю.ПредметСтрокой,
	ЗадачиПоИсполнителю.Автор,
	ЗадачиПоИсполнителю.ПринятаКИсполнению,
	ВЫБОР
		КОГДА ЗадачиПоИсполнителю.Важность = ЗНАЧЕНИЕ(Перечисление.ВариантыВажностиЗадачи.Низкая)
			ТОГДА 0
		КОГДА ЗадачиПоИсполнителю.Важность = ЗНАЧЕНИЕ(Перечисление.ВариантыВажностиЗадачи.Высокая)
			ТОГДА 2
		ИНАЧЕ 1
	КОНЕЦ КАК ВажностьКартинка,
	ЗадачиПоИсполнителю.Предмет,
	ВЫБОР
		КОГДА ЗадачиПоИсполнителю.СрокИсполнения <= &ТекущаяДата
			ТОГДА &Просрочено
		КОГДА ЗадачиПоИсполнителю.СрокИсполнения > &ТекущаяДата И ЗадачиПоИсполнителю.СрокИсполнения <= &КонецДня
			ТОГДА &Сегодня
		КОГДА ЗадачиПоИсполнителю.СрокИсполнения > &КонецДня И ЗадачиПоИсполнителю.СрокИсполнения <= &КонецНедели
			ТОГДА &ЭтаНеделя
		КОГДА ЗадачиПоИсполнителю.СрокИсполнения > &КонецНедели И ЗадачиПоИсполнителю.СрокИсполнения <= &КонецСледующейНедели
			ТОГДА &СледующаяНеделя
		ИНАЧЕ &Позднее
	КОНЕЦ КАК СрокДляГруппировки
ИЗ
	Задача.ЗадачаИсполнителя.ЗадачиПоИсполнителю КАК ЗадачиПоИсполнителю
ГДЕ
	ЗадачиПоИсполнителю.СостояниеБизнесПроцесса = ЗНАЧЕНИЕ(Перечисление.СостоянияБизнесПроцессов.Активен)</QueryText>
				<MainTable>Task.ЗадачаИсполнителя.TasksByExecutive</MainTable>
				<ListSettings>
					<dcsset:filter>
						<dcsset:viewMode>Normal</dcsset:viewMode>
						<dcsset:userSettingID>dfcece9d-5077-440b-b6b3-45a5cb4538eb</dcsset:userSettingID>
					</dcsset:filter>
					<dcsset:order>
						<dcsset:item xsi:type="dcsset:OrderItemField">
							<dcsset:field>СрокИсполнения</dcsset:field>
							<dcsset:orderType>Asc</dcsset:orderType>
						</dcsset:item>
						<dcsset:item xsi:type="dcsset:OrderItemField">
							<dcsset:field>Важность</dcsset:field>
							<dcsset:orderType>Asc</dcsset:orderType>
						</dcsset:item>
						<dcsset:item xsi:type="dcsset:OrderItemField">
							<dcsset:field>ДатаНачала</dcsset:field>
							<dcsset:orderType>Asc</dcsset:orderType>
						</dcsset:item>
						<dcsset:viewMode>Normal</dcsset:viewMode>
						<dcsset:userSettingID>88619765-ccb3-46c6-ac52-38e9c992ebd4</dcsset:userSettingID>
					</dcsset:order>
					<dcsset:conditionalAppearance>
						<dcsset:viewMode>Normal</dcsset:viewMode>
						<dcsset:userSettingID>b75fecce-942b-4aed-abc9-e6a02e460fb3</dcsset:userSettingID>
					</dcsset:conditionalAppearance>
					<dcsset:itemsViewMode>Normal</dcsset:itemsViewMode>
					<dcsset:itemsUserSettingID>911b6018-f537-43e8-a417-da56b22f9aec</dcsset:itemsUserSettingID>
				</ListSettings>
			</Settings>
		</Attribute>
		<Attribute name="ПоказыватьВыполненные" id="2">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Показывать выполненные</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:boolean</v8:Type>
			</Type>
			<Save>
				<Field>ПоказыватьВыполненные</Field>
			</Save>
		</Attribute>
		<Attribute name="РежимГруппировки" id="3">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Режим группировки</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:string</v8:Type>
				<v8:StringQualifiers>
					<v8:Length>0</v8:Length>
					<v8:AllowedLength>Variable</v8:AllowedLength>
				</v8:StringQualifiers>
			</Type>
			<Save>
				<Field>РежимГруппировки</Field>
			</Save>
		</Attribute>
		<Attribute name="ПараметрыОтбораФормы" id="4">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Параметры отбора формы</v8:content>
				</v8:item>
			</Title>
			<Type/>
		</Attribute>
	</Attributes>
	<Commands>
		<Command name="СгруппироватьПоВажности" id="3">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Важность</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Сгруппировать по важности</v8:content>
				</v8:item>
			</ToolTip>
			<Action>СгруппироватьПоВажности</Action>
		</Command>
		<Command name="СгруппироватьПоТочкеМаршрута" id="4">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Точка маршрута</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Сгруппировать по точке маршрута</v8:content>
				</v8:item>
			</ToolTip>
			<Action>СгруппироватьПоТочкеМаршрута</Action>
		</Command>
		<Command name="СгруппироватьПоБезГруппировки" id="5">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Без группировки</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Убрать группировку</v8:content>
				</v8:item>
			</ToolTip>
			<Action>СгруппироватьПоБезГруппировки</Action>
		</Command>
		<Command name="СгруппироватьПоАвтору" id="6">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Автор</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Сгруппировать по автору</v8:content>
				</v8:item>
			</ToolTip>
			<Action>СгруппироватьПоАвтору</Action>
		</Command>
		<Command name="СгруппироватьПоПредмету" id="7">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Предмет</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Сгруппировать по предмету</v8:content>
				</v8:item>
			</ToolTip>
			<Action>СгруппироватьПоПредмету</Action>
		</Command>
		<Command name="ПринятьКИсполнению" id="1">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Принять к исполнению</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Принять к исполнению</v8:content>
				</v8:item>
			</ToolTip>
			<Action>ПринятьКИсполнению</Action>
		</Command>
		<Command name="ОтменитьПринятиеКИсполнению" id="2">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Отменить принятие к исполнению</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Отменить принятие к исполнению</v8:content>
				</v8:item>
			</ToolTip>
			<Action>ОтменитьПринятиеКИсполнению</Action>
		</Command>
		<Command name="ОбновитьСписокЗадач" id="8">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Обновить</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Обновить список задач</v8:content>
				</v8:item>
			</ToolTip>
			<Shortcut>F5</Shortcut>
			<Picture>
				<xr:Ref>StdPicture.Refresh</xr:Ref>
				<xr:LoadTransparent>true</xr:LoadTransparent>
			</Picture>
			<Action>ОбновитьСписокЗадач</Action>
		</Command>
		<Command name="СгруппироватьПоСроку" id="9">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Срок</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Сгруппировать по сроку</v8:content>
				</v8:item>
			</ToolTip>
			<Action>СгруппироватьПоСроку</Action>
		</Command>
		<Command name="ОткрытьБизнесПроцесс" id="10">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Открыть бизнес-процесс</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Открыть бизнес-процесс</v8:content>
				</v8:item>
			</ToolTip>
			<Action>ОткрытьБизнесПроцесс</Action>
		</Command>
		<Command name="ОткрытьПредметЗадачи" id="11">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Открыть предмет задачи</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Открыть предмет задачи</v8:content>
				</v8:item>
			</ToolTip>
			<Action>ОткрытьПредметЗадачи</Action>
		</Command>
	</Commands>
	<CommandInterface>
		<CommandBar>
			<Item>
				<Command>0:83b807b2-85be-45aa-89fe-364ee411b03a</Command>
				<Type>Auto</Type>
				<CommandGroup>FormCommandBarImportant</CommandGroup>
				<Index>3</Index>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>0:a0351409-4bdc-4f1e-bd6f-97f1c671b644</Command>
				<Type>Auto</Type>
				<CommandGroup>FormCommandBarImportant</CommandGroup>
				<Index>2</Index>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
		</CommandBar>
	</CommandInterface>
</Form>


text:
import testtools

class TestCase(testtools.TestCase):
    """Test case base class for all unit tests."""

    def setUp(self):
        """Run before each method to initialize test environment."""
        super(TestCase, self).setUp()

redpajama_set_name: RedPajamaGithub


text:
package org.apache.calcite.sql;

import org.apache.calcite.rel.type.RelDataType;
import org.apache.calcite.rel.type.RelDataTypeFactory;
import org.apache.calcite.sql.parser.SqlParserPos;
import org.apache.calcite.sql.type.SqlTypeName;
import org.apache.calcite.util.DateString;

/**
 * A SQL literal representing a DATE value, such as DATE
 * '2004-10-22'.
 *
 *
Create values using {@link SqlLiteral#createDate}.
 */
public class SqlDateLiteral extends SqlAbstractDateTimeLiteral {
  //~ Constructors -----------------------------------------------------------

  SqlDateLiteral(DateString d, SqlParserPos pos) {
    super(d, false, SqlTypeName.DATE, 0, pos);
  }

  //~ Methods ----------------------------------------------------------------

  /** Converts this literal to a {@link DateString}. */
  protected DateString getDate() {
    return (DateString) value;
  }

  @Override public SqlDateLiteral clone(SqlParserPos pos) {
    return new SqlDateLiteral((DateString) value, pos);
  }

  @Override public String toString() {
    return "DATE '" + toFormattedString() + "'";
  }

  /**
   * Returns e.g. '1969-07-21'.
   */
  public String toFormattedString() {
    return getDate().toString();
  }

  public RelDataType createSqlType(RelDataTypeFactory typeFactory) {
    return typeFactory.createSqlType(getTypeName());
  }

  public void unparse(
      SqlWriter writer,
      int leftPrec,
      int rightPrec) {
    writer.getDialect().unparseDateTimeLiteral(writer, this, leftPrec, rightPrec);
  }
}


text:
/* @flow */

import {ok, throws} from 'assert';

import fixtures from './fixtures';

import t from '../globalContext';

describe('fixtures', () => {
  for (const [name, {pass, fail}] of fixtures) {
    const context = t.createContext();
    if (pass) {
      it(`fixture: ${name} should pass`, () => {
        ok(pass(context));
      });
    }
    if (fail) {
      it(`fixture: ${name} should fail`, () => {
        throws(() => fail(context));
      });
    }
  }
});


text:
package org.wildfly.extension.nosql.cdi;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanAttributes;
import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.InjectionTarget;
import javax.enterprise.inject.spi.InjectionTargetFactory;

import org.jboss.as.server.CurrentServiceContainer;
import org.wildfly.extension.nosql.subsystem.neo4j.Neo4jSubsystemService;
import org.wildfly.nosql.common.ConnectionServiceAccess;
import org.wildfly.nosql.common.SubsystemService;
import org.wildfly.nosql.common.spi.NoSQLConnection;

/**
 * This CDI Extension registers a Driver
 * defined by CDI Inject in application beans
 * Registration will be aborted if user defines her own Driver bean or producer
 *
 * @author Antoine Sabot-Durand
 * @author Scott Marlow
 */
public class Neo4jExtension implements Extension {

    private static final Logger log = Logger.getLogger(Neo4jExtension.class.getName());

    private final Class driverClass;
    public Neo4jExtension(Class driverClass) {
        this.driverClass = driverClass;
    }

    void registerNoSQLSourceBeans(@Observes AfterBeanDiscovery abd, BeanManager bm) {
        if (bm.getBeans(driverClass, DefaultLiteral.INSTANCE).isEmpty()) {
            for(String profile: getService().profileNames()) {
                log.log(Level.INFO, "Registering bean for profile {0}", profile);
                abd.addBean(bm.createBean(
                        new DriverBeanAttributes(bm.createBeanAttributes(bm.createAnnotatedType(driverClass)), profile),
                        driverClass, new DriverProducerFactory(profile, driverClass)));
//                TODO: uncomment or delete the following.
//                abd.addBean(bm.createBean(new SessionBeanAttributes(bm.createBeanAttributes(bm.createAnnotatedType(Session.class)),profile),
//                        Session.class, new SessionProducerFactory(profile)));
            }
         } else {
            log.log(Level.INFO, "Application contains a default Driver Bean, automatic registration will be disabled");
        }
    }

    private SubsystemService getService() {
        return (SubsystemService) CurrentServiceContainer.getServiceContainer().getService(Neo4jSubsystemService.serviceName()).getValue();
    }

    private static class DriverBeanAttributes<T> implements BeanAttributes<T> {

        private BeanAttributes<T> delegate;
        private final String profile;

        DriverBeanAttributes(BeanAttributes<T> beanAttributes, String profile) {
            delegate = beanAttributes;
            this.profile = profile;
        }

        @Override
        public String getName() {
            return delegate.getName();
        }

        @Override
        public Set<Annotation> getQualifiers() {
            Set<Annotation> qualifiers = new HashSet<>(delegate.getQualifiers());
            NamedLiteral namedLiteral = new NamedLiteral(profile);
            qualifiers.add(namedLiteral);
            return qualifiers;
        }

        @Override
        public Class<? extends Annotation> getScope() {
            return ApplicationScoped.class;
        }

        @Override
        public Set<Class<? extends Annotation>> getStereotypes() {
            return delegate.getStereotypes();
        }

        @Override
        public Set<Type> getTypes() {
            return delegate.getTypes();
        }

        @Override
        public boolean isAlternative() {
            return delegate.isAlternative();
        }
    }

    private static class DriverProducerFactory<T>
            implements InjectionTargetFactory<T> {
        private final String profile;

        private final Class driverClass;
        DriverProducerFactory(String profile, Class driverClass) {
            this.profile = profile;
            this.driverClass = driverClass;
        }

        @Override
        public InjectionTarget<T> createInjectionTarget(Bean<T> bean) {
            return new InjectionTarget<T>() {
                @Override
                public void inject(T instance, CreationalContext<T> ctx) {
                }

                @Override
                public void postConstruct(T instance) {
                }

                @Override
                public void preDestroy(T instance) {
                }

                @Override
                public T produce(CreationalContext<T> ctx) {
                    NoSQLConnection noSQLConnection = ConnectionServiceAccess.connection(profile);
                    return (T)noSQLConnection.unwrap(driverClass);
                }

                @Override
                public void dispose(T driver) {
                    // no need to close the shared driver, its thread safe and shared by all application deployments.
                }

                @Override
                public Set<InjectionPoint> getInjectionPoints() {
                    return Collections.EMPTY_SET;
                }
            };
        }
    }
/* TODO: delete this commented out code or uncomment
    private static class SessionBeanAttributes implements BeanAttributes<Session> {

        private BeanAttributes<Session> delegate;
        private final String profile;

        SessionBeanAttributes(BeanAttributes<Session> beanAttributes, String profile) {
            delegate = beanAttributes;
            this.profile = profile;
        }

        @Override
        public String getName() {
            return delegate.getName();
        }

        @Override
        public Set<Annotation> getQualifiers() {
            Set<Annotation> qualifiers = new HashSet<>(delegate.getQualifiers());
            NamedLiteral namedLiteral = new NamedLiteral(profile);
            qualifiers.add(namedLiteral);
            return qualifiers;
        }

        @Override
        public Class<? extends Annotation> getScope() {
            return RequestScoped.class;                     // Session is not thread safe, so ensure each app request has its own session
        }

        @Override
        public Set<Class<? extends Annotation>> getStereotypes() {
            return delegate.getStereotypes();
        }

        @Override
        public Set<Type> getTypes() {
            return delegate.getTypes();
        }

        @Override
        public boolean isAlternative() {
            return delegate.isAlternative();
        }
    }

    private static class SessionProducerFactory
            implements InjectionTargetFactory<Session> {
        private final String profile;

        SessionProducerFactory(String profile) {
            this.profile = profile;
        }

        @Override
        public InjectionTarget<Session> createInjectionTarget(Bean<Session> bean) {
            return new InjectionTarget<Session>() {
                @Override
                public void inject(Session instance, CreationalContext<Session> ctx) {
                }

                @Override
                public void postConstruct(Session instance) {
                }

                @Override
                public void preDestroy(Session instance) {
                }

                @Override
                public Session produce(CreationalContext<Session> ctx) {
                    NoSQLConnection noSQLConnection = ConnectionServiceAccess.connection(profile);
                    return noSQLConnection.unwrap(Session.class);
                }

                 *
                 * Injected session should be closed as soon as RequestScoped request completes,
                 * to ensure that the (not thread safe) session can then be used for another request.
                 *
                 * @param session
                 *
                @Override
                public void dispose(Session session) {
                    session.close();
                }

                @Override
                public Set<InjectionPoint> getInjectionPoints() {
                    return Collections.EMPTY_SET;
                }
            };
        }
    }
*/
}


text:
'use strict';

var _ = require('lodash');
var mctCore = require('../../core');

var api = {};

api.model = function() {
  mctCore.model.create();
};

api.connection = function() {
  mctCore.connection.create();
};

var menuEntries = [{
  name: 'Model',
  value: 'model'
}, {
  name: 'Rest Connection',
  value: 'connection'
}, {
  name: 'Take me back home',
  value: {
    method: '_home'
  }
}];

module.exports = function () {

  this._requireProject();

  // Delegate shorthand like `mcap component model`
  // to the target function.
  if (this.args[1]) {
    return api[this.args[1]]();
  }

  this.prompt([{
    name: 'whatNext',
    type: 'list',
    message: 'Which component would you like to add?',
    choices: menuEntries
  }], function (answer) {

    if (_.isFunction(api[answer.whatNext])) {
      // Call methode from the api object
      api[answer.whatNext]();
    } else {
      // Return the user back to home
      this[answer.whatNext.method]();
    }

  }.bind(this));
};


text:
import React, { FunctionComponent } from 'react';
import i18n from '../i18n';
import styles from './styles.scss';

interface QueueLabelProps {
  gateName: string;
  gateId: string;
  currentLocale: string;
}

const QueueLabel: FunctionComponent<QueueLabelProps> = ({
  gateName,
  gateId,
  currentLocale,
}) => {
  return (

{gateName}

      {gateId !== '-1' ? (

          {i18n.getString('queueID', currentLocale)}: {gateId}

      ) : null}

  );
};

export { QueueLabel };


text:
/**
  If true, then all SC.Controls can be focused when the
  user presses the tab key. Otherwise, only TextFieldViews
  will be focused.

  @type String
  @constant
*/
SC.FOCUS_ALL_CONTROLS = NO;

/*
  TODO [CC @ 1.5] Remove this deprecation warning eventually
*/
SC.ready(function() {
  var focus = SC.SAFARI_FOCUS_BEHAVIOR;
  if (focus !== null && focus !== undefined) {
    // @if (debug)
    SC.Logger.warn("SC.SAFARI_FOCUS_BEHAVIOR is deprecated. Please use SC.FOCUS_ALL_CONTROLS instead");
    // @endif
    SC.FOCUS_ALL_CONTROLS = SC.SAFARI_FOCUS_BEHAVIOR;
  }
});


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Pressed -->
    <item android:drawable="@drawable/ic_back_press" android:state_pressed="true" />
    <item android:drawable="@drawable/ic_back_normal"/>
</selector>


text:
package com.alorma.github.sdk.bean.dto.response.events.payload;

import com.alorma.github.sdk.bean.dto.response.UserType;

/**
 * Created by Bernat on 05/10/2014.
 */
public class CreatedEventPayload extends DeleteEventPayload {
	public String master_branch;
	public String description;
}


text:
'use strict';
const os = require('os');

const getIp = family => {
	const interfaces = os.networkInterfaces();

	return Object.keys(interfaces).reduce((arr, x) => {
		const interfce = interfaces[x];

		return arr.concat(Object.keys(interfce)
			.filter(x => interfce[x].family === family && !interfce[x].internal)
			.map(x => interfce[x].address));
	}, []);
};

module.exports = () => getIp('IPv4');
module.exports.v6 = () => getIp('IPv6');


text:
namespace syncer {

FCMSyncNetworkChannel::FCMSyncNetworkChannel() : received_messages_count_(0) {}

FCMSyncNetworkChannel::~FCMSyncNetworkChannel() {}

void FCMSyncNetworkChannel::SetMessageReceiver(
    MessageCallback incoming_receiver) {
  incoming_receiver_ = std::move(incoming_receiver);
}

void FCMSyncNetworkChannel::SetTokenReceiver(TokenCallback token_receiver) {
  token_receiver_ = token_receiver;
  if (!token_.empty())
    token_receiver_.Run(token_);
}

void FCMSyncNetworkChannel::AddObserver(Observer* observer) {
  observers_.AddObserver(observer);
}

void FCMSyncNetworkChannel::RemoveObserver(Observer* observer) {
  observers_.RemoveObserver(observer);
}

void FCMSyncNetworkChannel::NotifyChannelStateChange(FcmChannelState state) {
  for (auto& observer : observers_)
    observer.OnFCMChannelStateChanged(state);
}

bool FCMSyncNetworkChannel::DeliverIncomingMessage(
    const std::string& payload,
    const std::string& private_topic,
    const std::string& public_topic,
    int64_t version) {
  if (!incoming_receiver_) {
    DLOG(ERROR) << "No receiver for incoming notification";
    return false;
  }
  received_messages_count_++;
  incoming_receiver_.Run(payload, private_topic, public_topic, version);
  return true;
}

bool FCMSyncNetworkChannel::DeliverToken(const std::string& token) {
  token_ = token;
  if (!token_receiver_) {
    DLOG(ERROR) << "No receiver for token";
    return false;
  }
  token_receiver_.Run(token_);
  return true;
}

}  // namespace syncer


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Package com.hazelcast.mapreduce.impl.operation (Hazelcast Root 3.3.3 API)</title>
<meta name="date" content="2014-11-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
com.hazelcast.mapreduce.impl.operation

Packages that use com.hazelcast.mapreduce.impl.operation

Package
Description

com.hazelcast.mapreduce.impl

This package contains the default implementation for the map reduce framework
 internals.

com.hazelcast.mapreduce.impl.operation

This package contains all remote operations that are needed to control work on
 supervising or worker nodes.

Classes in com.hazelcast.mapreduce.impl.operation used by com.hazelcast.mapreduce.impl

Class and Description

ProcessingOperation

This is the base class for all map reduce framework operations, it always contains the name of
 the JobTracker and the unique jobId

Classes in com.hazelcast.mapreduce.impl.operation used by com.hazelcast.mapreduce.impl.operation

Class and Description

ProcessingOperation

This is the base class for all map reduce framework operations, it always contains the name of
 the JobTracker and the unique jobId

RequestPartitionResult.ResultState

This enum is used to define the basic state of an operations result

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.


text:
FROM ubuntu:zesty

RUN apt-get -qq update && \
    apt-get install -y sudo docker.io git make golang golint btrfs-tools libdevmapper-dev libgpgme-dev libostree-dev


text:
namespace blink {

class StyleTraversalRootTestImpl : public StyleTraversalRoot {
  STACK_ALLOCATED();

 public:
  StyleTraversalRootTestImpl() = default;
  void MarkDirty(const Node* node) { dirty_nodes_.insert(node); }
  bool IsSingleRoot() const { return root_type_ == RootType::kSingleRoot; }
  bool IsCommonRoot() const { return root_type_ == RootType::kCommonRoot; }

 private:
  virtual ContainerNode* ParentInternal(const Node& node) const {
    return node.parentNode();
  }
#if DCHECK_IS_ON()
  ContainerNode* Parent(const Node& node) const override {
    return ParentInternal(node);
  }
#endif  // DCHECK_IS_ON()
  bool IsDirty(const Node& node) const final {
    return dirty_nodes_.Contains(&node);
  }
  void RootRemoved(ContainerNode& parent) override {
    Clear();
  }

  HeapHashSet<Member<const Node>> dirty_nodes_;
};

class StyleTraversalRootTest : public testing::Test {
 protected:
  enum ElementIndex { kA, kB, kC, kD, kE, kF, kG, kElementCount };
  void SetUp() final {
    document_ = MakeGarbageCollected<Document>();
    elements_ = MakeGarbageCollected<HeapVector<Member<Element>, 7>>();
    for (size_t i = 0; i < kElementCount; i++) {
      elements_->push_back(GetDocument().CreateRawElement(html_names::kDivTag));
    }
    GetDocument().appendChild(DivElement(kA));
    DivElement(kA)->appendChild(DivElement(kB));
    DivElement(kA)->appendChild(DivElement(kC));
    DivElement(kB)->appendChild(DivElement(kD));
    DivElement(kB)->appendChild(DivElement(kE));
    DivElement(kC)->appendChild(DivElement(kF));
    DivElement(kC)->appendChild(DivElement(kG));

    // Tree Looks like this:
    // div#a
    // |-- div#b
    // |   |-- div#d
    // |   `-- div#e
    // `-- div#c
    //     |-- div#f
    //     `-- div#g
  }
  Document& GetDocument() { return *document_; }
  Element* DivElement(ElementIndex index) { return elements_->at(index); }

 private:
  Persistent<Document> document_;
  Persistent<HeapVector<Member<Element>, 7>> elements_;
};

TEST_F(StyleTraversalRootTest, Update_SingleRoot) {
  StyleTraversalRootTestImpl root;
  root.MarkDirty(DivElement(kA));

  // A single dirty node becomes a single root.
  root.Update(nullptr, DivElement(kA));
  EXPECT_EQ(DivElement(kA), root.GetRootNode());
  EXPECT_TRUE(root.IsSingleRoot());
}

TEST_F(StyleTraversalRootTest, Update_CommonRoot) {
  StyleTraversalRootTestImpl root;
  root.MarkDirty(DivElement(kC));

  // Initially make B a single root.
  root.Update(nullptr, DivElement(kB));
  EXPECT_EQ(DivElement(kB), root.GetRootNode());
  EXPECT_TRUE(root.IsSingleRoot());

  // Adding C makes A a common root.
  root.MarkDirty(DivElement(kB));
  root.Update(DivElement(kA), DivElement(kC));
  EXPECT_EQ(DivElement(kA), root.GetRootNode());
  EXPECT_FALSE(root.IsSingleRoot());
  EXPECT_TRUE(root.IsCommonRoot());
}

TEST_F(StyleTraversalRootTest, Update_CommonRootDirtySubtree) {
  StyleTraversalRootTestImpl root;
  root.MarkDirty(DivElement(kA));
  root.Update(nullptr, DivElement(kA));

  // Marking descendants of a single dirty root makes the single root a common
  // root as long as the new common ancestor is the current root.
  root.MarkDirty(DivElement(kD));
  root.Update(DivElement(kA), DivElement(kD));
  EXPECT_EQ(DivElement(kA), root.GetRootNode());
  EXPECT_FALSE(root.IsSingleRoot());
  EXPECT_TRUE(root.IsCommonRoot());
}

TEST_F(StyleTraversalRootTest, Update_CommonRootDocumentFallback) {
  StyleTraversalRootTestImpl root;

  // Initially make B a common root for D and E.
  root.MarkDirty(DivElement(kD));
  root.Update(nullptr, DivElement(kD));
  root.MarkDirty(DivElement(kE));
  root.Update(DivElement(kB), DivElement(kE));
  EXPECT_EQ(DivElement(kB), root.GetRootNode());
  EXPECT_FALSE(root.IsSingleRoot());
  EXPECT_TRUE(root.IsCommonRoot());

  // Adding C falls back to using the document as the root because we don't know
  // if A is above or below the current common root B.
  root.MarkDirty(DivElement(kC));
  root.Update(DivElement(kA), DivElement(kC));
  EXPECT_EQ(&GetDocument(), root.GetRootNode());
  EXPECT_FALSE(root.IsSingleRoot());
  EXPECT_TRUE(root.IsCommonRoot());
}

TEST_F(StyleTraversalRootTest, ChildrenRemoved) {
  StyleTraversalRootTestImpl root;
  // Initially make E a single root.
  root.MarkDirty(DivElement(kE));
  root.Update(nullptr, DivElement(kE));
  EXPECT_EQ(DivElement(kE), root.GetRootNode());
  EXPECT_TRUE(root.IsSingleRoot());

  // Removing D not affecting E.
  DivElement(kD)->remove();
  root.ChildrenRemoved(*DivElement(kB));
  EXPECT_EQ(DivElement(kE), root.GetRootNode());
  EXPECT_TRUE(root.IsSingleRoot());

  // Removing B
  DivElement(kB)->remove();
  root.ChildrenRemoved(*DivElement(kA));
  EXPECT_FALSE(root.GetRootNode());
  EXPECT_TRUE(root.IsSingleRoot());
}

class StyleTraversalRootFlatTreeTestImpl : public StyleTraversalRootTestImpl {
 private:
  ContainerNode* ParentInternal(const Node& node) const final {
    // Flat tree does not include Document or ShadowRoot.
    return FlatTreeTraversal::ParentElement(node);
  }
};

TEST_F(StyleTraversalRootTest, Update_CommonRoot_FlatTree) {
  StyleTraversalRootFlatTreeTestImpl root;

  // The single dirty node D becomes a single root.
  root.MarkDirty(DivElement(kD));
  root.Update(nullptr, DivElement(kD));

  EXPECT_EQ(DivElement(kD), root.GetRootNode());
  EXPECT_TRUE(root.IsSingleRoot());

  // A becomes a common root.
  root.MarkDirty(DivElement(kA));
  root.Update(nullptr, DivElement(kA));

  EXPECT_EQ(DivElement(kA), root.GetRootNode());
  EXPECT_TRUE(root.IsCommonRoot());

  // Making E dirty and the document becomes the common root.
  root.MarkDirty(DivElement(kE));
  root.Update(DivElement(kB), DivElement(kE));

  EXPECT_EQ(&GetDocument(), root.GetRootNode());
  EXPECT_TRUE(root.IsCommonRoot());
}

}  // namespace blink


text:
require 'spec_helper'

describe InterimStreamHackinessHelper, :type => :helper do
  describe 'commenting_disabled?' do
    include Devise::TestHelpers
    before do
      sign_in alice
      def user_signed_in?
        true
      end
    end

    it 'returns true if no user is signed in' do
      def user_signed_in?
        false
      end
      expect(commenting_disabled?(double)).to eq(true)
    end

    it 'returns true if @commenting_disabled is set' do
      @commenting_disabled = true
      expect(commenting_disabled?(double)).to eq(true)
      @commenting_disabled = false
      expect(commenting_disabled?(double)).to eq(false)
    end

    it 'returns @stream.can_comment? if @stream is set' do
      post = double
      @stream = double
      expect(@stream).to receive(:can_comment?).with(post).and_return(true)
      expect(commenting_disabled?(post)).to eq(false)

      expect(@stream).to receive(:can_comment?).with(post).and_return(false)
      expect(commenting_disabled?(post)).to eq(true)
    end
  end
end


text:
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using CinemaBooking.Data;

namespace CinemaBooking.Migrations
{
    [DbContext(typeof(CinemaContext))]
    [Migration("20161127092553_MyFirstMigration")]
    partial class MyFirstMigration
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
            modelBuilder
                .HasAnnotation("ProductVersion", "1.1.0-rtm-22752");

            modelBuilder.Entity("CinemaBooking.Models.Movie", b =>
                {
                    b.Property<int>("MovieId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Title");

                    b.HasKey("MovieId");

                    b.ToTable("Movies");
                });

            modelBuilder.Entity("CinemaBooking.Models.Room", b =>
                {
                    b.Property<int>("RoomId")
                        .ValueGeneratedOnAdd();

                    b.Property<int?>("MovieId");

                    b.Property<string>("RoomName");

                    b.HasKey("RoomId");

                    b.HasIndex("MovieId");

                    b.ToTable("Rooms");
                });

            modelBuilder.Entity("CinemaBooking.Models.Screening", b =>
                {
                    b.Property<int>("ScreeningId")
                        .ValueGeneratedOnAdd();

                    b.Property<int?>("MovieId");

                    b.Property<int?>("RoomId");

                    b.Property<DateTime>("Time");

                    b.HasKey("ScreeningId");

                    b.HasIndex("MovieId");

                    b.HasIndex("RoomId");

                    b.ToTable("Screenings");
                });

            modelBuilder.Entity("CinemaBooking.Models.Room", b =>
                {
                    b.HasOne("CinemaBooking.Models.Movie")
                        .WithMany("PlayingAt")
                        .HasForeignKey("MovieId");
                });

            modelBuilder.Entity("CinemaBooking.Models.Screening", b =>
                {
                    b.HasOne("CinemaBooking.Models.Movie", "Movie")
                        .WithMany()
                        .HasForeignKey("MovieId");

                    b.HasOne("CinemaBooking.Models.Room", "Room")
                        .WithMany()
                        .HasForeignKey("RoomId");
                });
        }
    }
}


text:
package org.apache.flink.table.sinks;

import org.apache.flink.annotation.Experimental;
import org.apache.flink.api.common.io.OutputFormat;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.DataStreamSink;
import org.apache.flink.table.api.Table;
import org.apache.flink.table.connector.sink.DynamicTableSink;

/**
 * Defines an external {@link TableSink} to emit a bounded {@link Table}.
 *
 * @param <T> Type of the bounded {@link OutputFormat} that this {@link TableSink} expects and
 *     supports.
 * @deprecated This interface has been replaced by {@link DynamicTableSink}. The new interface
 *     consumes internal data structures. See FLIP-95 for more information.
 */
@Deprecated
@Experimental
public abstract class OutputFormatTableSink<T> implements StreamTableSink<T> {

    /** Returns an {@link OutputFormat} for writing the data of the table. */
    public abstract OutputFormat<T> getOutputFormat();

    @Override
    public final DataStreamSink<T> consumeDataStream(DataStream<T> dataStream) {
        return dataStream
                .writeUsingOutputFormat(getOutputFormat())
                .setParallelism(dataStream.getParallelism());
    }
}


text:
package com.sun.tools.javac.v8.code;

import com.sun.tools.javac.v8.util.Context;
import com.sun.tools.javac.v8.util.Hashtable;
import com.sun.tools.javac.v8.util.Options;

/**
 * The classfile version target.
 */
public final class Target {
	private static final Context.Key targetKey = new Context.Key();

	public static Target instance(Context context) {
		Target instance = (Target) context.get(targetKey);
		if (instance == null) {
			Options options = Options.instance(context);
			String targetString = (String) options.get("-target");
			if (targetString != null)
				instance = lookup(targetString);
			if (instance == null)
				instance = DEFAULT;
			context.put(targetKey, instance);
		}
		return instance;
	}

	private static Target MIN;

	public static Target MIN() {
		return MIN;
	}

	private static Target MAX;

	public static Target MAX() {
		return MAX;
	}

	private static int nextOrdinal = 0;
	private static final Hashtable tab = new Hashtable();
	public final int ordinal = nextOrdinal++;
	public final String name;
	public final int majorVersion;
	public final int minorVersion;

	private Target(String name, int majorVersion, int minorVersion) {
		super();
		this.name = name;
		this.majorVersion = majorVersion;
		this.minorVersion = minorVersion;
		tab.put(name, this);
		if (MIN == null)
			MIN = this;
		MAX = this;
	}

	public static final Target JDK1_1 = new Target("1.1", 45, 3);
	public static final Target JDK1_2 = new Target("1.2", 46, 0);
	public static final Target JDK1_3 = new Target("1.3", 47, 0);
	public static final Target JDK1_4 = new Target("1.4", 48, 0);
	public static final Target JDK1_4_1 = new Target("1.4.1", 48, 0);
	public static final Target JDK1_4_2 = new Target("1.4.2", 48, 0);
	public static final Target DEFAULT = JDK1_2;

	public static Target lookup(String name) {
		return (Target) tab.get(name);
	}

	/**
	 * In -target 1.1 and earlier, the compiler is required to emit synthetic
	 * method definitions in abstract classes for interface methods that are not
	 * overridden. We call them "Miranda" methods.
	 */
	public boolean requiresIproxy() {
		return ordinal <= JDK1_1.ordinal;
	}

	/**
	 * Begining in 1.4, we take advantage of the possibility of emitting code to
	 * initialize fields before calling the superclass constructor. This is
	 * allowed by the VM spec, but the verifier refused to allow it until 1.4.
	 * This is necesary to translate some code involving inner classes. See, for
	 * example, 4030374.
	 */
	public boolean initializeFieldsBeforeSuper() {
		return ordinal >= JDK1_4.ordinal;
	}

	/**
	 * Beginning with -target 1.2 we obey the JLS rules for binary
	 * compatibility, emitting as the qualifying type of a reference to a method
	 * or field the type of the qualifier. In earlier targets we use as the
	 * qualifying type the class in which the member was found. The following
	 * methods named *binaryCompatibility() indicate places where we vary from
	 * this general rule.
	 */
	public boolean obeyBinaryCompatibility() {
		return ordinal >= JDK1_2.ordinal;
	}

	/**
	 * In -target 1.4.1 and later, the compiler uses an array type as the
	 * qualifier for method calls (such as clone) where required by the language
	 * and VM spec. Earlier versions of the compiler qualified them by Object.
	 */
	public boolean arrayBinaryCompatibility() {
		return ordinal > JDK1_4.ordinal;
	}

	/**
	 * Beginning after 1.2, we follow the binary compatibility rules for
	 * interface fields. The 1.2 VMs had bugs handling interface fields when
	 * compiled using binary compatibility (see 4400598), so this is an
	 * accomodation to them.
	 */
	public boolean interfaceFieldsBinaryCompatibility() {
		return ordinal > JDK1_2.ordinal;
	}

	/**
	 * Beginning after -target 1.4, we follow the binary compatibility rules for
	 * interface methods that redefine Object methods. Earlier VMs had bugs
	 * handling such methods compiled using binary compatibility (see 4392595,
	 * 4398791, 4392595, 4400415). The VMs were fixed during or soon after 1.4.
	 */
	public boolean interfaceObjectOverridesBinaryCompatibility() {
		return ordinal > JDK1_4.ordinal;
	}
}


text:
package com.tiarebalbi.kupo.test.configuration.security;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.tiarebalbi.kupo.configuration.security.KupoPasswordEncoder;

/**
 *
 * Teste da classe {@link KupoPasswordEncoder}
 *
 *
 * @author Tiarê Balbi Bonamini
 * @package com.tiarebalbi.kupo.test.configuration.security
 * @since 1.0.0
 *
 */
public class KupoPasswordEncoderTest {

	/**
	 *
	 */
	@Test
	public void deveValidarPasswordIgual() {
		KupoPasswordEncoder pass = new KupoPasswordEncoder();
		String senha = pass.encode("481200");
		assertNotEquals("481200", senha);
		System.out.println(senha);
		assertTrue(pass.matches("481200", senha));
	}

	/**
	 *
	 */
	@Test
	public void deveGerarErroComSenhaIncorreta() {
		KupoPasswordEncoder pass = new KupoPasswordEncoder();
		String senha = pass.encode("tiare");
		assertFalse(pass.matches("tiare2", senha));
	}

}


text:
============
Installation
============

Check dependencies
------------------
We currently support ``Python 3.5+``.

For the package: ``numpy>=1.11``, ``scipy>=0.17``, ``scikit-learn>=0.18``

Additionally, for examples: ``pandas>=0.20``

Both `Canopy <https://www.enthought.com/products/canopy/>`__
and `Anaconda <https://www.continuum.io/downloads>`__
ship with a recent version of all these packages.

Additionally, for development, tests and coverage: ``pytest``, ``pytest-cov``, ``coverage``, ``flake8``

Additionally, for building documentation: ``sphinx``, ``sphinx-gallery``, ``sphinx_bootstrap_theme``, ``pillow``, ``numpydoc``, ``matplotlib``, ``spykes``

In case you have other distributions of Python, you can install
the dependencies using ``pip``.

.. code-block:: bash

   pip install numpy scipy
   pip install -U scikit-learn

Get pyglmnet
------------
If you would like to install the latest stable release:

.. code-block:: bash

    pip install pyglmnet

To install the development version of ``pyglmnet``, first clone the repository

.. code-block:: bash

	pip install https://api.github.com/repos/glm-tools/pyglmnet/zipball/master


text:
package moe.crowdhopper.imgurapi.Exceptions;

//Thrown when the status code from an HTTP Request was anything other than 200, indicating an error.
public class HTTPRequestException extends Exception {
	private static final long serialVersionUID = -6162953634325143247L;
	private int status_code;

	public HTTPRequestException(int status_code) {
		super(status(status_code));
		this.status_code = status_code;
	}

	public HTTPRequestException(String arg0) {
		super(arg0);
	}

	public HTTPRequestException(Throwable arg0) {
		super(arg0);
	}

	public HTTPRequestException(String arg0, Throwable arg1) {
		super(arg0, arg1);
	}

	public HTTPRequestException(String arg0, Throwable arg1, boolean arg2, boolean arg3) {
		super(arg0, arg1, arg2, arg3);
	}

	private static String status(int status_code) {
		switch(status_code) {
		case 400:
			return "Missing or Invalid Parameter";
		case 401:
			return "Requires User Authentication";
		case 403:
			return "Forbidden";
		case 404:
			return "Resource Does Not Exist";
		case 429:
			return "Rate Limiting";
		case 500:
			return "Internal Error";
		default:
			return "Something went wrong.";
		}
	}

	public int getCode() {return status_code;}
}


text:
module Bosh::Workspace
  class Release
    REFSPEC = ['HEAD:refs/remotes/origin/HEAD']
    attr_reader :name, :git_url, :repo_dir

    def initialize(release, releases_dir, credentials_callback, options = {})
      @name                 = release["name"]
      @ref                  = release["ref"]
      @path                 = release["path"]
      @spec_version         = release["version"].to_s
      @git_url              = release["git"]
      @repo_dir             = File.join(releases_dir, @name)
      @url                  = release["url"]
      @credentials_callback = credentials_callback
      @offline              = options[:offline]
    end

    def update_repo(options = {})
      fetch_repo
      hash = ref || release[:commit]
      update_repo_with_ref(repo, hash)
      update_submodules
    end

    def manifest_file
      File.join(repo_dir, manifest)
    end

    def manifest
      release[:manifest]
    end

    def name_version
      "#{name}/#{version}"
    end

    def version
      release[:version]
    end

    def ref
      @ref && repo.lookup(@ref).oid
    end

    def release_dir
      @path ? File.join(@repo_dir, @path) : @repo_dir
    end

    def url
      @url && @url.gsub("^VERSION^", version)
    end

    private

    def update_submodules
      required_submodules.each do |submodule|
        fetch_repo(submodule_repo(submodule.path, submodule.url))
        update_repo_with_ref(submodule.repository, submodule.head_oid)
      end
    end

    def required_submodules
      symlink_templates.map { |t| submodule_for(t) }.compact
    end

    def repo_path(path)
      File.join(@repo_dir, path)
    end

    def submodule_repo(path, url)
      dir = repo_path(path)
      repo_exists?(dir) ? open_repo(dir) : init_repo(dir, url)
    end

    def repo
      repo_exists? ? open_repo : init_repo
    end

    def fetch_repo(repo = repo)
      return if offline?
      repo.fetch('origin', REFSPEC, credentials: @credentials_callback)
      commit = repo.references['refs/remotes/origin/HEAD'].resolve.target_id
      update_repo_with_ref(repo, commit)
    end

    def repo_exists?(dir = @repo_dir)
      File.exist?(File.join(dir, '.git'))
    end

    def open_repo(dir = @repo_dir)
      Rugged::Repository.new(dir)
    end

    def init_repo(dir = @repo_dir, url = @git_url)
      offline_err(url) if offline?
      FileUtils.mkdir_p File.dirname(dir)
      Rugged::Repository.init_at(dir).tap do |repo|
        repo.remotes.create('origin', url)
      end
    end

    def offline_err(url)
      err "Cloning repo: '#{url}' not allowed in offline mode"
    end

    def update_repo_with_ref(repository, ref)
      repository.checkout_tree ref, strategy: :force
      repository.checkout ref, strategy: :force
    end

    def new_style_repo
      base = @path ? File.join(@path, 'releases') : 'releases'
      dir = File.join(repo_dir, base, @name)
      File.directory?(dir) && !File.symlink?(dir)
    end

    def releases_dir
      dir = new_style_repo ? "releases/#{@name}" : "releases"
      @path ? File.join(@path, dir) : dir
    end

    def releases_tree
      repo.lookup(repo.head.target.tree.path(releases_dir)[:oid])
    end

    # transforms releases/foo-1.yml, releases/bar-2.yml to:
    # [ { version: "1", manifest: releases/foo-1.yml } ]
    def final_releases
      @final_releases ||= begin
        final_releases = []
        releases_tree.walk_blobs(:preorder) do |_, entry|
          next if entry[:filemode] == 40960 # Skip symlinks
          next unless version = entry[:name][/#{@name}-(.+)\.yml/, 1]
          final_releases << { version: version, manifest: entry[:name] }
        end
        final_releases.sort! { |a, b| a[:version].to_i <=> b[:version].to_i }
      end
    end

    def repo_blame(path)
      Rugged::Blame.new(repo, path).reduce do |m, h|
        return h unless m
        return h if h[:final_signature][:time] > m[:final_signature][:time]
        return m
      end
    end

    def release
      return @release if @release
      latest_offline_warning if latest? && offline?
      release = final_releases.last if latest?
      release ||= final_releases.find { |v| v[:version] == @spec_version }
      missing_release_err(@spec_version, @name) unless release
      @release = lookup_release_ref(release)
    end

    def lookup_release_ref(release)
      b = repo_blame(File.join(releases_dir, release[:manifest]))
      release.merge(manifest: b[:orig_path], commit: b[:final_commit_id])
    end

    def missing_release_err(version, name)
      err "Could not find version: #{version} for release: #{name}"
    end

    def latest_offline_warning
      warning "Using 'latest' local version since in offline mode"
    end

    def templates_dir
      repo_path 'templates'
    end

    def symlink_target(file)
      return File.readlink(file) if File.readlink(file).start_with?("/")
      File.expand_path(File.join(File.dirname(file), File.readlink(file)))
    end

    def submodule_for(file)
      repo.submodules.find { |s| file.start_with? repo_path(s.path) }
    end

    def symlink_templates
      return [] unless File.exist?(templates_dir)
      Find.find(templates_dir)
        .select { |f| File.symlink?(f) }.map { |f| symlink_target(f) }
    end

    def offline?
      @offline
    end

    def latest?
      @spec_version == "latest"
    end
  end
end


text:
package org.jboss.resteasy.api.validation;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name="violationReport")
@XmlAccessorType(XmlAccessType.FIELD)
public class ViolationReport
{
   private String exception;

   private ArrayList<ResteasyConstraintViolation> fieldViolations = new ArrayList<ResteasyConstraintViolation>();
   private ArrayList<ResteasyConstraintViolation> propertyViolations = new ArrayList<ResteasyConstraintViolation>();
   private ArrayList<ResteasyConstraintViolation> classViolations = new ArrayList<ResteasyConstraintViolation>();
   private ArrayList<ResteasyConstraintViolation> parameterViolations = new ArrayList<ResteasyConstraintViolation>();
   private ArrayList<ResteasyConstraintViolation> returnValueViolations = new ArrayList<ResteasyConstraintViolation>();

   public ViolationReport(ResteasyViolationException exception)
   {
      Exception e = exception.getException();
      if (e != null)
      {
         this.exception = e.toString();
      }
      this.fieldViolations = (ArrayList<ResteasyConstraintViolation>) exception.getFieldViolations();
      this.propertyViolations = (ArrayList<ResteasyConstraintViolation>) exception.getPropertyViolations();
      this.classViolations = (ArrayList<ResteasyConstraintViolation>) exception.getClassViolations();
      this.parameterViolations = (ArrayList<ResteasyConstraintViolation>) exception.getParameterViolations();
      this.returnValueViolations = (ArrayList<ResteasyConstraintViolation>) exception.getReturnValueViolations();
   }

   public ViolationReport()
   {
   }

   public String getException()
   {
      return exception;
   }

   public ArrayList<ResteasyConstraintViolation> getFieldViolations()
   {
      return fieldViolations;
   }

   public ArrayList<ResteasyConstraintViolation> getPropertyViolations()
   {
      return propertyViolations;
   }

   public ArrayList<ResteasyConstraintViolation> getClassViolations()
   {
      return classViolations;
   }

   public ArrayList<ResteasyConstraintViolation> getParameterViolations()
   {
      return parameterViolations;
   }

   public ArrayList<ResteasyConstraintViolation> getReturnValueViolations()
   {
      return returnValueViolations;
   }

   public void setException(String exception)
   {
      this.exception = exception;
   }

   public void setFieldViolations(ArrayList<ResteasyConstraintViolation> fieldViolations)
   {
      this.fieldViolations = fieldViolations;
   }

   public void setPropertyViolations(ArrayList<ResteasyConstraintViolation> propertyViolations)
   {
      this.propertyViolations = propertyViolations;
   }

   public void setClassViolations(ArrayList<ResteasyConstraintViolation> classViolations)
   {
      this.classViolations = classViolations;
   }

   public void setParameterViolations(ArrayList<ResteasyConstraintViolation> parameterViolations)
   {
      this.parameterViolations = parameterViolations;
   }

   public void setReturnValueViolations(ArrayList<ResteasyConstraintViolation> returnValueViolations)
   {
      this.returnValueViolations = returnValueViolations;
   }
}


text:
using System.Collections.Generic;
using Machine.Specifications;

namespace Stripe.Tests
{
    public class when_updating_an_application_fee_refund
    {
        private static StripeCharge _charge;
        private static StripeApplicationFeeRefund _createdRefund;
        private static StripeApplicationFeeRefund _updatedRefund;

        private static readonly Dictionary<string, string> _metaData = new Dictionary<string, string>
        {
            { "ApprovedBy", "Robert" },
            { "ApprovedReason", "Buckets!" }
        };

        Establish context = () =>
        {
            // create a managed account
            var accountOptions = test_data.stripe_account_create_options.ValidAccountWithBankAccount();
            accountOptions.Managed = true;

            var managedAccount = new StripeAccountService().Create(accountOptions);

            // since stripe will error without using a token from stripe.js, we will use the
            // token service from stripe.net for this test. you should use stripe.js to receive
            // the token in your implementation for PCI compliance - unless you know all the rules
            // for making your server PCI compliant. Hint: you probably don't, it's a lot. use stripe.js :D
            var token = new StripeTokenService().Create(test_data.stripe_token_create_options.Valid());

            // create a charge on that managed account with an application fee of 10 cents
            var chargeCreateOptions = test_data.stripe_charge_create_options.ValidToken(token.Id);
            chargeCreateOptions.ApplicationFee = 10;

            _charge = new StripeChargeService().Create(chargeCreateOptions,
                new StripeRequestOptions
                {
                    StripeConnectAccountId = managedAccount.Id
                }
            );

            _createdRefund = new StripeApplicationFeeRefundService().CreateAsync(_charge.ApplicationFeeId).Result;
        };

        Because of = () =>
            _updatedRefund = new StripeApplicationFeeRefundService().Update(_charge.ApplicationFeeId, _createdRefund.Id,
                new StripeApplicationFeeRefundUpdateOptions { Metadata = _metaData });

        It should_have_a_refund_object = () =>
            _updatedRefund.ShouldNotBeNull();

        It should_have_the_right_id = () =>
            _updatedRefund.Id.ShouldEqual(_createdRefund.Id);

        It should_have_a_refund_amount_of_ten_cents = () =>
            _updatedRefund.Amount.ShouldEqual(10);

        It should_have_the_right_metadata = () =>
            _updatedRefund.Metadata.ShouldEqual(_metaData);
    }
}


text:
require_relative "../core.rb"
require_relative "../sonicpi/lib/sonicpi/synthinfo"
require_relative "../sonicpi/lib/sonicpi/util"

include SonicPi::Util

File.open( "#{cheatsheets_path}/synths.md", 'w' ) do |f|
 f << SonicPi::SynthInfo.synth_doc_markdown
end

File.open( "#{cheatsheets_path}/fx.md", 'w') do |f|
 f << SonicPi::SynthInfo.fx_doc_markdown
end

File.open( "#{cheatsheets_path}/samples.md", 'w') do |f|
 f << SonicPi::SynthInfo.samples_doc_markdown
end


text:
module Axlsx
require 'axlsx/rels/relationship.rb'

  # Relationships are a collection of Relations that define how package parts are related.
  # @note The package automatically manages releationships.
  class Relationships < SimpleTypedList

    # Creates a new Relationships collection based on SimpleTypedList
    def initialize
      super Relationship
    end

    def to_xml_string(str = '')
      str << '<?xml version="1.0" encoding="UTF-8"?>'
      str << '<Relationships xmlns="' << RELS_R << '">'
      each_with_index { |rel, index| rel.to_xml_string(index+1, str) }
      str << '</Relationships>'
    end

  end
end


text:
package org.apache.phoenix.end2end;

import org.apache.hadoop.hbase.HConstants;
import org.apache.phoenix.query.BaseTest;
import org.junit.After;

/**
 * Base class for tests that need their own mini cluster. Classes that extend this base class don't necessarily have to
 * use unique names for tables and sequences. Any new integration tests that need their own mini cluster should be
 * extending {@link BaseTest} class directly.
 */
public abstract class BaseOwnClusterIT extends BaseTest {
    @After
    public void cleanUpAfterTest() throws Exception {
        deletePriorMetaData(HConstants.LATEST_TIMESTAMP, getUrl());
    }
}


text:
template <typename T>
T swap_endian(T u)
{
	static_assert(CHAR_BIT == 8, "CHAR_BIT != 8");

	union {
		T u;
		unsigned char u8[sizeof(T)];
	} source, dest;

	source.u = u;

	for (size_t k = 0; k < sizeof(T); k++)
		dest.u8[k] = source.u8[sizeof(T) - k - 1];

	return dest.u;
}

namespace PR {
PlyLoader::PlyLoader(const std::string& name)
	: mName(name)
	, mScale(1)
	, mFlipNormal(false)
{
}

PlyLoader::~PlyLoader()
{
}

struct Header {
	int VertexCount		  = 0;
	int FaceCount		  = 0;
	int XElem			  = -1;
	int YElem			  = -1;
	int ZElem			  = -1;
	int NXElem			  = -1;
	int NYElem			  = -1;
	int NZElem			  = -1;
	int UElem			  = -1;
	int VElem			  = -1;
	int VertexPropCount	  = 0;
	int IndElem			  = -1;
	bool SwitchEndianness = false;

	inline bool hasVertices() const { return XElem >= 0 && YElem >= 0 && ZElem >= 0; }
	inline bool hasNormals() const { return NXElem >= 0 && NYElem >= 0 && NZElem >= 0; }
	inline bool hasUVs() const { return UElem >= 0 && VElem >= 0; }
	inline bool hasIndices() const { return IndElem >= 0; }
};

std::unique_ptr<MeshBase> read(std::fstream& stream, const Header& header, bool ascii)
{
	const auto readFloat = [&]() {
		float val;
		stream.read(reinterpret_cast<char*>(&val), sizeof(val));
		if (header.SwitchEndianness)
			val = swap_endian<float>(val);
		return val;
	};
	std::vector<float> vertices;
	std::vector<float> normals;
	std::vector<float> uvs;

	vertices.reserve(header.VertexCount * 3);
	if (header.hasNormals())
		normals.reserve(header.VertexCount * 3);
	if (header.hasUVs())
		uvs.reserve(header.VertexCount * 2);

	for (int i = 0; i < header.VertexCount; ++i) {

		float x = 0, y = 0, z = 0;
		float nx = 0, ny = 0, nz = 0;
		float u = 0, v = 0;

		if (ascii) {
			std::string line;
			if (!std::getline(stream, line)) {
				PR_LOG(L_ERROR) << "Not enough vertices given" << std::endl;
				return nullptr; // Failed
			}
			std::stringstream sstream(line);
			int elem = 0;
			while (sstream) {
				float val;
				sstream >> val;

				if (header.XElem == elem)
					x = val;
				else if (header.YElem == elem)
					y = val;
				else if (header.ZElem == elem)
					z = val;
				else if (header.NXElem == elem)
					nx = val;
				else if (header.NYElem == elem)
					ny = val;
				else if (header.NZElem == elem)
					nz = val;
				else if (header.UElem == elem)
					u = val;
				else if (header.VElem == elem)
					v = val;
				++elem;
			}
		} else {
			for (int elem = 0; elem < header.VertexPropCount; ++elem) {
				float val = readFloat();
				if (header.XElem == elem)
					x = val;
				else if (header.YElem == elem)
					y = val;
				else if (header.ZElem == elem)
					z = val;
				else if (header.NXElem == elem)
					nx = val;
				else if (header.NYElem == elem)
					ny = val;
				else if (header.NZElem == elem)
					nz = val;
				else if (header.UElem == elem)
					u = val;
				else if (header.VElem == elem)
					v = val;
			}
		}

		vertices.push_back(x);
		vertices.push_back(y);
		vertices.push_back(z);

		if (header.hasNormals()) {
			float norm = sqrt(nx * nx + ny * ny + nz * nz);
			if (norm <= PR_EPSILON)
				norm = 1.0f;
			normals.push_back(nx / norm);
			normals.push_back(ny / norm);
			normals.push_back(nz / norm);
		}

		if (header.hasUVs()) {
			uvs.push_back(u);
			uvs.push_back(v);
		}
	}

	std::vector<uint32> indices;
	std::vector<uint8> vertPerFace;

	indices.reserve(header.FaceCount * 4);
	vertPerFace.reserve(header.FaceCount);

	if (ascii) {
		for (int i = 0; i < header.FaceCount; ++i) {
			std::string line;
			if (!std::getline(stream, line)) {
				PR_LOG(L_ERROR) << "Not enough indices given" << std::endl;
				return nullptr; // Failed
			}

			std::stringstream sstream(line);

			uint32 elems;
			sstream >> elems;
			for (uint32 j = 0; j < elems; ++j) {
				uint32 ind;
				sstream >> ind;
				indices.push_back(ind);
			}
			vertPerFace.push_back(elems);

			if (elems != 3 && elems != 4) {
				PR_LOG(L_ERROR) << "Only triangle or quads allowed in ply files" << std::endl;
				return nullptr;
			}
		}
	} else {
		for (int i = 0; i < header.FaceCount; ++i) {
			uint8 elems;
			stream.read(reinterpret_cast<char*>(&elems), sizeof(elems));
			for (uint32 j = 0; j < elems; ++j) {
				uint32 ind;
				stream.read(reinterpret_cast<char*>(&ind), sizeof(ind));
				if (header.SwitchEndianness)
					ind = swap_endian(ind);
				indices.push_back(ind);
			}
			vertPerFace.push_back(elems);

			if (elems != 3 && elems != 4) {
				PR_LOG(L_ERROR) << "Only triangle or quads allowed in ply files" << std::endl;
				return nullptr;
			}
		}
	}

	// Build
	std::unique_ptr<MeshBase> cnt = std::make_unique<MeshBase>();
	cnt->setVertexComponent(MeshComponent::Vertex, std::move(vertices));
	cnt->setVertexComponentIndices(MeshComponent::Vertex, std::move(indices));
	if (header.hasNormals())
		cnt->setVertexComponent(MeshComponent::Normal, std::move(normals));
	if (header.hasUVs())
		cnt->setVertexComponent(MeshComponent::Texture, std::move(uvs));
	cnt->setFaceVertexCount(vertPerFace);

	return cnt;
}

static inline bool isAllowedVertIndType(const std::string& str)
{
	return str == "uchar"
		   || str == "int"
		   || str == "uint8"
		   || str == "uint";
}

void PlyLoader::load(const std::filesystem::path& file, SceneLoadContext& ctx)
{
	std::fstream stream(file.c_str(), std::ios::in | std::ios::binary);
	if (!stream) {
		PR_LOG(L_ERROR) << "Could not open ply file " << file << std::endl;
		return;
	}

	// Header
	std::string magic;
	stream >> magic;
	if (magic != "ply") {
		PR_LOG(L_WARNING) << "Given file " << file << " is not a ply file." << std::endl;
		return;
	}

	std::string method;
	Header header;

	int facePropCounter = 0;
	for (std::string line; std::getline(stream, line);) {
		std::stringstream sstream(line);

		std::string action;
		sstream >> action;
		if (action == "comment")
			continue;
		else if (action == "format") {
			sstream >> method;
		} else if (action == "element") {
			std::string type;
			sstream >> type;
			if (type == "vertex")
				sstream >> header.VertexCount;
			else if (type == "face")
				sstream >> header.FaceCount;
		} else if (action == "property") {
			std::string type;
			sstream >> type;
			if (type == "float") {
				std::string name;
				sstream >> name;
				if (name == "x")
					header.XElem = header.VertexPropCount;
				else if (name == "y")
					header.YElem = header.VertexPropCount;
				else if (name == "z")
					header.ZElem = header.VertexPropCount;
				else if (name == "nx")
					header.NXElem = header.VertexPropCount;
				else if (name == "ny")
					header.NYElem = header.VertexPropCount;
				else if (name == "nz")
					header.NZElem = header.VertexPropCount;
				else if (name == "u")
					header.UElem = header.VertexPropCount;
				else if (name == "v")
					header.VElem = header.VertexPropCount;
				++header.VertexPropCount;
			} else if (type == "list") {
				++facePropCounter;

				std::string countType;
				sstream >> countType;

				std::string indType;
				sstream >> indType;

				std::string name;
				sstream >> name;
				if (!isAllowedVertIndType(countType)) {
					PR_LOG(L_WARNING) << "Only 'property list uchar int' is supported" << std::endl;
					continue;
				}

				if (name == "vertex_indices")
					header.IndElem = facePropCounter - 1;
			} else {
				PR_LOG(L_WARNING) << "Only float or list properties allowed. Ignoring..." << std::endl;
				++header.VertexPropCount;
			}
		} else if (action == "end_header")
			break;
	}

	// Content
	if (!header.hasVertices() || !header.hasIndices() || header.VertexCount <= 0 || header.FaceCount <= 0) {
		PR_LOG(L_WARNING) << "Ply file does not contain valid mesh data" << std::endl;
		return;
	}

	header.SwitchEndianness		  = (method == "binary_big_endian");
	std::unique_ptr<MeshBase> cnt = read(stream, header, (method == "ascii"));

	std::string errMsg;
	if (!cnt->isValid(&errMsg)) {
		PR_LOG(L_WARNING) << "Ply file could not construct a valid mesh data: " << errMsg << std::endl;
		return;
	}

	if (cnt) {
		PR_LOG(L_INFO) << "Added mesh '" << mName << "' with " << cnt->triangleCount() << " triangles and " << cnt->quadCount() << " quads" << std::endl;
		ctx.addMesh(mName, std::move(cnt));
	}
}
} // namespace PR


text:
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using NsqSharp.Utils;

namespace NsqSharp.Api
{
    /// An nsqd HTTP client.
    public class NsqdHttpClient : NsqHttpApi
    {
        private readonly int _timeoutMilliseconds;

        /// Initializes a new instance of <see cref="NsqLookupdHttpClient" /> class.
        /// <param name="nsqdHttpAddress">The nsqlookupd HTTP address.</param>
        /// <param name="httpRequestTimeout">The HTTP request timeout.</param>
        public NsqdHttpClient(string nsqdHttpAddress, TimeSpan httpRequestTimeout)
            : base(nsqdHttpAddress, httpRequestTimeout)
        {
            _timeoutMilliseconds = (int)httpRequestTimeout.TotalMilliseconds;
        }

        ///
        /// Publishes a message.
        ///
        /// <param name="topic">The topic.</param>
        /// <param name="message">The message.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string Publish(string topic, string message)
        {
            ValidateTopic(topic);
            if (message == null)
                throw new ArgumentNullException("message");

            return Publish(topic, Encoding.UTF8.GetBytes(message));
        }

        ///
        /// Publishes a message.
        ///
        /// <param name="topic">The topic.</param>
        /// <param name="message">The message.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string Publish(string topic, byte[] message)
        {
            ValidateTopic(topic);
            if (message == null)
                throw new ArgumentNullException("message");

            string route = string.Format("/pub?topic={0}", topic);
            return Post(route, message);
        }

        ///
        /// Publishes multiple messages. More efficient than calling Publish several times for the same message type.
        /// See http://nsq.io/components/nsqd.html#mpub.
        ///
        /// <param name="topic">The topic.</param>
        /// <param name="messages">The messages.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string PublishMultiple(string topic, IEnumerable<string> messages)
        {
            ValidateTopic(topic);
            if (messages == null)
                throw new ArgumentNullException("messages");

            var messagesArray = messages.ToArray();
            if (messagesArray.Length == 0)
                return null;

            string body = string.Join("\n", messagesArray);

            string route = string.Format("/mpub?topic={0}", topic);
            return Post(route, Encoding.UTF8.GetBytes(body));
        }

        ///
        /// Publishes multiple messages. More efficient than calling Publish several times for the same message type.
        /// See http://nsq.io/components/nsqd.html#mpub.
        ///
        /// <param name="topic">The topic.</param>
        /// <param name="messages">The messages.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        [SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")]
        public string PublishMultiple(string topic, IEnumerable<byte[]> messages)
        {
            ValidateTopic(topic);
            if (messages == null)
                throw new ArgumentNullException("messages");

            ICollection<byte[]> msgList = messages as ICollection<byte[]> ?? messages.ToList();

            if (msgList.Count == 0)
                return null;

            byte[] body;
            using (var memoryStream = new MemoryStream())
            {
                using (var binaryWriter = new BinaryWriter(memoryStream))
                {
                    Binary.BigEndian.PutUint32(binaryWriter, msgList.Count);

                    foreach (var msg in msgList)
                    {
                        Binary.BigEndian.PutUint32(binaryWriter, msg.Length);
                        binaryWriter.Write(msg);
                    }
                }

                body = memoryStream.ToArray();
            }

            string route = string.Format("/mpub?topic={0}&binary=true", topic);
            return Post(route, body);
        }

        ///
        /// Empty a topic.
        ///
        /// <param name="topic">The topic.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string EmptyTopic(string topic)
        {
            ValidateTopic(topic);

            string route = string.Format("/topic/empty?topic={0}", topic);
            return Post(route);
        }

        ///
        /// Empty a channel.
        ///
        /// <param name="topic">The topic.</param>
        /// <param name="channel">The channel.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string EmptyChannel(string topic, string channel)
        {
            ValidateTopicAndChannel(topic, channel);

            string route = string.Format("/channel/empty?topic={0}&channel={1}", topic, channel);
            return Post(route);
        }

        ///
        /// Pause a topic.
        ///
        /// <param name="topic">The topic.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string PauseTopic(string topic)
        {
            ValidateTopic(topic);

            string route = string.Format("/topic/pause?topic={0}", topic);
            return Post(route);
        }

        ///
        /// Unpause a topic.
        ///
        /// <param name="topic">The topic.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string UnpauseTopic(string topic)
        {
            ValidateTopic(topic);

            string route = string.Format("/topic/unpause?topic={0}", topic);
            return Post(route);
        }

        ///
        /// Pause a channel.
        ///
        /// <param name="topic">The topic.</param>
        /// <param name="channel">The channel.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string PauseChannel(string topic, string channel)
        {
            ValidateTopicAndChannel(topic, channel);

            string route = string.Format("/channel/pause?topic={0}&channel={1}", topic, channel);
            return Post(route);
        }

        ///
        /// Unpause a channel.
        ///
        /// <param name="topic">The topic.</param>
        /// <param name="channel">The channel.</param>
        /// <returns>The response from the nsqd HTTP server.</returns>
        public string UnpauseChannel(string topic, string channel)
        {
            ValidateTopicAndChannel(topic, channel);

            string route = string.Format("/channel/unpause?topic={0}&channel={1}", topic, channel);
            return Post(route);
        }

        ///
        /// Returns internal instrumented statistics.
        ///
        /// <returns>The response from the nsqd HTTP server.</returns>
        public NsqdStats GetStats()
        {
            string endpoint = GetFullUrl("/stats?format=json");
            byte[] respBody = Request(endpoint, HttpMethod.Get, _timeoutMilliseconds);

            var serializer = new DataContractJsonSerializer(typeof(NsqdStats));
            using (var memoryStream = new MemoryStream(respBody))
            {
                return ((NsqdStats)serializer.ReadObject(memoryStream));
            }
        }
    }

    ///
    /// Statistics information for nsqd. See <see cref="NsqdHttpClient.GetStats"/>.
    ///
    [DataContract]
    public class NsqdStats
    {
        ///version
        [DataMember(Name = "version")]
        public string Version { get; set; }
        ///health
        [DataMember(Name = "health")]
        public string Health { get; set; }
        ///topics
        [DataMember(Name = "topics")]
        public NsqdStatsTopic[] Topics { get; set; }
    }

    ///
    /// Topic information for nsqd. See <see cref="NsqdHttpClient.GetStats"/>.
    ///
    [DataContract]
    public class NsqdStatsTopic
    {
        ///topic_name
        [DataMember(Name = "topic_name")]
        public string TopicName { get; set; }
        ///channels
        [DataMember(Name = "channels")]
        public NsqdStatsChannel[] Channels { get; set; }
        ///depth
        [DataMember(Name = "depth")]
        public int Depth { get; set; }
        ///backend_depth
        [DataMember(Name = "backend_depth")]
        public int BackendDepth { get; set; }
        ///message_count
        [DataMember(Name = "message_count")]
        public int MessageCount { get; set; }
        ///paused
        [DataMember(Name = "paused")]
        public bool Paused { get; set; }
        ///e2e_processing_latency
        [DataMember(Name = "e2e_processing_latency")]
        public NsqdStatsEndToEndProcessingLatency EndToEndProcessingLatency { get; set; }
    }

    ///
    /// Channel information for nsqd. See <see cref="NsqdHttpClient.GetStats"/>.
    ///
    [DataContract]
    public class NsqdStatsChannel
    {
        ///channel_name
        [DataMember(Name = "channel_name")]
        public string ChannelName { get; set; }
        ///depth
        [DataMember(Name = "depth")]
        public int Depth { get; set; }
        ///backend_depth
        [DataMember(Name = "backend_depth")]
        public int BackendDepth { get; set; }
        ///in_flight_count
        [DataMember(Name = "in_flight_count")]
        public int InFlightCount { get; set; }
        ///deferred_count
        [DataMember(Name = "deferred_count")]
        public int DeferredCount { get; set; }
        ///message_count
        [DataMember(Name = "message_count")]
        public int MessageCount { get; set; }
        ///requeue_count
        [DataMember(Name = "requeue_count")]
        public int RequeueCount { get; set; }
        ///timeout_count
        [DataMember(Name = "timeout_count")]
        public int TimeoutCount { get; set; }
        ///clients
        [DataMember(Name = "clients")]
        public NsqdStatsClient[] Clients { get; set; }
        ///paused
        [DataMember(Name = "paused")]
        public bool Paused { get; set; }
        // TODO
        //[DataMember(Name = "e2e_processing_latency")]
        //public NsqdStatsEndToEndProcessingLatency EndToEndProcessingLatency { get; set; }
    }

    ///
    /// Client information for nsqd. See <see cref="NsqdHttpClient.GetStats"/>.
    ///
    [DataContract]
    public class NsqdStatsClient
    {
        ///name
        [DataMember(Name = "name")]
        public string Name { get; set; }
        ///client_id
        [DataMember(Name = "client_id")]
        public string ClientId { get; set; }
        ///hostname
        [DataMember(Name = "hostname")]
        public string Hostname { get; set; }
        ///version
        [DataMember(Name = "version")]
        public string Version { get; set; }
        ///remote_address
        [DataMember(Name = "remote_address")]
        public string RemoteAddress { get; set; }
        ///state
        [DataMember(Name = "state")]
        public int State { get; set; }
        ///ready_count
        [DataMember(Name = "ready_count")]
        public int ReadyCount { get; set; }
        ///in_flight_count
        [DataMember(Name = "in_flight_count")]
        public int InFlightCount { get; set; }
        ///message_count
        [DataMember(Name = "message_count")]
        public int MessageCount { get; set; }
        ///finish_count
        [DataMember(Name = "finish_count")]
        public int FinishCount { get; set; }
        ///requeue_count
        [DataMember(Name = "requeue_count")]
        public int RequeueCount { get; set; }
        ///connect_ts
        [DataMember(Name = "connect_ts")]
        public int ConnectTimestamp { get; set; }
        ///sample_rate
        [DataMember(Name = "sample_rate")]
        public int SampleRate { get; set; }
        ///deflate
        [DataMember(Name = "deflate")]
        public bool Deflate { get; set; }
        ///snappy
        [DataMember(Name = "snappy")]
        public bool Snappy { get; set; }
        ///user_agent
        [DataMember(Name = "user_agent")]
        public string UserAgent { get; set; }
        ///tls
        [DataMember(Name = "tls")]
        public bool Tls { get; set; }
        ///tls_cipher_suite
        [DataMember(Name = "tls_cipher_suite")]
        public string TlsCipherSuite { get; set; }
        ///tls_version
        [DataMember(Name = "tls_version")]
        public string TlsVersion { get; set; }
        ///tls_negotiated_protocol
        [DataMember(Name = "tls_negotiated_protocol")]
        public string TlsNegotiatedProtocol { get; set; }
        ///tls_negotiated_protocol_is_mutual
        [DataMember(Name = "tls_negotiated_protocol_is_mutual")]
        public bool TlsNegotiatedProtocolIsMutual { get; set; }
    }

    ///
    [DataContract]
    public class NsqdStatsEndToEndProcessingLatency
    {
        /// count
        [DataMember(Name = "count")]
        public int Count { get; set; }
        /// percentiles
        [DataMember(Name = "percentiles")]
        public NsqdStatsEndToEndProcessingLatencyPercentile[] Percentiles { get; set; }
    }

    ///
    [DataContract]
    public class NsqdStatsEndToEndProcessingLatencyPercentile
    {
        /// quantile
        [DataMember(Name = "quantile")]
        public double Quantile { get; set; }
        /// value
        [DataMember(Name = "value")]
        public long Value { get; set; }
        /// time
        public TimeSpan Time
        {
            get { return TimeSpan.FromSeconds(Value / 1000000000.0); }
        }
    }
}


text:
let result = xmldom.evaluate("employee/name", xmldom.documentElement, null,
                  XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);

if (result !== null) {
  let element = result.iterateNext();
  while(element) {
    console.log(element.tagName);
    node = result.iterateNext();
  }
}