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

<TITLE>
PackedSpriteSheet (Slick - The 2D Library)
</TITLE>

<META NAME="keywords" CONTENT="org.newdawn.slick.PackedSpriteSheet class">

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

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.newdawn.slick

Class PackedSpriteSheet

java.lang.Object
  org.newdawn.slick.PackedSpriteSheet

public class PackedSpriteSheet
extends java.lang.Object

A sprite sheet packed and defined by the Pacific Software Image Packer available
 from:

 http://homepage.ntlworld.com/config/imagepacker/

Author:

kevin

Constructor Summary

PackedSpriteSheet(java.lang.String def)

          Create a new packed sprite sheet based on a ImagePacker definition file

PackedSpriteSheet(java.lang.String def,
                  Color trans)

          Create a new packed sprite sheet based on a ImagePacker definition file

PackedSpriteSheet(java.lang.String def,
                  int filter)

          Create a new packed sprite sheet based on a ImagePacker definition file

PackedSpriteSheet(java.lang.String def,
                  int filter,
                  Color trans)

          Create a new packed sprite sheet based on a ImagePacker definition file

Method Summary

 Image
getFullImage()

          Get the full image contaning all the sprites/sections

 Image
getSprite(java.lang.String name)

          Get a single named sprite from the sheet

 SpriteSheet
getSpriteSheet(java.lang.String name)

          Get a sprite sheet that has been packed into the greater image

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def)
                  throws SlickException

Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read

Throws:

SlickException - Indicates a failure to read the definition file

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def,
                         Color trans)
                  throws SlickException

Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read
trans - The color to be treated as transparent

Throws:

SlickException - Indicates a failure to read the definition file

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def,
                         int filter)
                  throws SlickException

Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read
filter - The image filter to use when loading the packed sprite image

Throws:

SlickException - Indicates a failure to read the definition file

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def,
                         int filter,
                         Color trans)
                  throws SlickException

Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read
filter - The image filter to use when loading the packed sprite image
trans - The color to be treated as transparent

Throws:

SlickException - Indicates a failure to read the definition file

Method Detail

getFullImage

public Image getFullImage()

Get the full image contaning all the sprites/sections

Returns:
The full image containing all the sprites/sections

getSprite

public Image getSprite(java.lang.String name)

Get a single named sprite from the sheet

Parameters:
name - The name of the sprite to retrieve

Returns:
The sprite requested (image of)

getSpriteSheet

public SpriteSheet getSpriteSheet(java.lang.String name)

Get a sprite sheet that has been packed into the greater image

Parameters:
name - The name of the sprite sheet to retrieve

Returns:
The sprite sheet from the packed sheet

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 New Dawn Software. All Rights Reserved.


text:
![Icon](https://d30y9cdsu7xlg0.cloudfront.net/icon_uploads/9c288a7d-a8e5-4e55-8af3-472d7b3f9981.svg?Expires=1412936889&Signature=CV3ZZ0uy6lEp~RozR8upl1ics4rQE0dn~TACVraMoR8ODDxODQQtfOaUc3Lc2TcTyDvchLjroeUF4Xo~RAhd17crg3U6mslLXRonhW9dpSSz7226lOgUHAwUoA0XfdVqG0pJfUxPC9oh3Eyd8xks3hPIM9iVqFqozfvEOowRR~4_&Key-Pair-Id=APKAI5ZVHAXN65CHVU2Q)

Berry
=====

Berry is a framework that allows you to create mobile apps with very little effort and provides you with both an architectural framework and lots of reusable code for your mobile apps on the Xamarin platform.

Mission
=======

Make the life of cross platform mobile development as easy and awesome as humanly possible while also greatly increasing the shared code pie slice across mobile platforms but also for projects in general. Building on existing and proven patterns and practices we want to enable you to write high quality and testable code while leveraging your existing skillset as a .NET developer.

Approach
========

Xamarin currently provides the Xamarin.Mobile (http://xamarin.com/mobileapi) API's as an abstraction over several platform specific services, such as contacts, GPS, the compass, the accelerometer, the notification service or the system calendar.

Part of Berry's approach is being an addition to the abstractions provided by the afore mentioned Xamarin.Mobile library. Abstracting these services is one step to reduce platform specific code.

Additionally we also want to use Inversion of Control and Model View ViewModel techniques to increase code share. Therefore Berry provides Dependency Injection capabilities abstracted across platforms, as well as ViewModel bindings.

Why the name Berry?
===================

No particular reason, just if you think about an actual berry (you know the fruit), they consist of small components. This is exactly what this library is all about.

Icon
====

Icon courtesy of [The Noun Project](http://thenounproject.com)

redpajama_set_name: RedPajamaGithub


text:
require 'lawyer/rspec'

class FirstContract < Lawyer::Contract
  confirm :ping
end

class SecondContract < Lawyer::Contract
  confirm :pong
end

RSpec.describe "Multiple contracts" do
  include Lawyer::RSpec::ContractDouble

  subject(:multiple_double) { contract_double([FirstContract, SecondContract])  }

  it { should be_a(RSpec::Mocks::Double) }
  it { should respond_to(:ping) }
  it { should respond_to(:pong) }
end


text:
module Inviteable
  module ApplicationHelper
  end
end


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.1">
	<Group>Horizontal</Group>
	<ChildItemsWidth>LeftWide</ChildItemsWidth>
	<AutoTime>CurrentOrLast</AutoTime>
	<UsePostingMode>Auto</UsePostingMode>
	<RepostOnWrite>true</RepostOnWrite>
	<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">
		<Autofill>false</Autofill>
		<ChildItems>
			<Button name="ФормаЗаписатьИЗакрыть" id="176">
				<Type>CommandBarButton</Type>
				<DefaultButton>true</DefaultButton>
				<CommandName>Form.StandardCommand.WriteAndClose</CommandName>
				<ExtendedTooltip name="ФормаЗаписатьИЗакрытьРасширеннаяПодсказка" id="177"/>
			</Button>
			<Button name="ФормаЗаписать" id="178">
				<Type>CommandBarButton</Type>
				<Representation>Picture</Representation>
				<CommandName>Form.StandardCommand.Write</CommandName>
				<Picture>
					<xr:Ref>StdPicture.Write</xr:Ref>
					<xr:LoadTransparent>true</xr:LoadTransparent>
				</Picture>
				<ExtendedTooltip name="ФормаЗаписатьРасширеннаяПодсказка" id="179"/>
			</Button>
			<Button name="ФормаПоказатьВСписке" id="172">
				<Type>CommandBarButton</Type>
				<Visible>false</Visible>
				<CommandName>Form.StandardCommand.ShowInList</CommandName>
				<Parameter xsi:type="xr:MDObjectRef">Document.Встреча</Parameter>
				<ExtendedTooltip name="ФормаПоказатьВСпискеРасширеннаяПодсказка" id="173"/>
			</Button>
			<Button name="ФормаПоказатьВЖурнале" id="174">
				<Type>CommandBarButton</Type>
				<CommandName>Form.StandardCommand.ShowInList</CommandName>
				<Parameter xsi:type="xr:MDObjectRef">DocumentJournal.Взаимодействия</Parameter>
				<Title>
					<v8:item>
						<v8:lang>ru</v8:lang>
						<v8:content>Показать в списке</v8:content>
					</v8:item>
				</Title>
				<ExtendedTooltip name="ФормаПоказатьВЖурналеРасширеннаяПодсказка" id="175"/>
			</Button>
			<ButtonGroup name="ФормаГлобальныеКоманды" id="182">
				<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>FormCommandPanelGlobalCommands</CommandSource>
				<ExtendedTooltip name="ФормаГлобальныеКомандыРасширеннаяПодсказка" id="183"/>
			</ButtonGroup>
			<Popup name="ПодменюПечать" id="180">
				<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>
				<Picture>
					<xr:Ref>StdPicture.Print</xr:Ref>
					<xr:LoadTransparent>true</xr:LoadTransparent>
				</Picture>
				<ExtendedTooltip name="ПодменюПечатьРасширеннаяПодсказка" id="181"/>
			</Popup>
			<ButtonGroup name="ФормаГруппаКомандыФормы" id="202">
				<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="ФормаГруппаКомандыФормыРасширеннаяПодсказка" id="203"/>
			</ButtonGroup>
			<Popup name="ПодменюОтчеты" id="194">
				<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>
				<Picture>
					<xr:Ref>CommonPicture.Отчеты</xr:Ref>
					<xr:LoadTransparent>true</xr:LoadTransparent>
				</Picture>
				<Representation>PictureAndText</Representation>
				<ExtendedTooltip name="ПодменюОтчетыРасширеннаяПодсказка" id="195"/>
				<ChildItems>
					<ButtonGroup name="ПодменюОтчетыВажное" id="196">
						<ToolTip>
							<v8:item>
								<v8:lang>ru</v8:lang>
								<v8:content>Подменю отчеты важное</v8:content>
							</v8:item>
						</ToolTip>
						<ExtendedTooltip name="ПодменюОтчетыВажноеРасширеннаяПодсказка" id="197"/>
					</ButtonGroup>
					<ButtonGroup name="ПодменюОтчетыПерейти" id="198">
						<ToolTip>
							<v8:item>
								<v8:lang>ru</v8:lang>
								<v8:content>Подменю отчеты важное</v8:content>
							</v8:item>
						</ToolTip>
						<ExtendedTooltip name="ПодменюОтчетыПерейтиРасширеннаяПодсказка" id="199"/>
					</ButtonGroup>
					<ButtonGroup name="ПодменюОтчетыСмТакже" id="200">
						<ToolTip>
							<v8:item>
								<v8:lang>ru</v8:lang>
								<v8:content>Подменю отчеты важное</v8:content>
							</v8:item>
						</ToolTip>
						<ExtendedTooltip name="ПодменюОтчетыСмТакжеРасширеннаяПодсказка" id="201"/>
					</ButtonGroup>
				</ChildItems>
			</Popup>
			<Button name="ФормаСправка" id="190">
				<Type>CommandBarButton</Type>
				<CommandName>Form.StandardCommand.Help</CommandName>
				<ExtendedTooltip name="ФормаСправкаРасширеннаяПодсказка" id="191"/>
			</Button>
		</ChildItems>
	</AutoCommandBar>
	<Events>
		<Event name="AfterWrite">ПослеЗаписи</Event>
		<Event name="ChoiceProcessing">ОбработкаВыбора</Event>
		<Event name="AfterWriteAtServer">ПослеЗаписиНаСервере</Event>
		<Event name="NotificationProcessing">ОбработкаОповещения</Event>
		<Event name="OnReadAtServer">ПриЧтенииНаСервере</Event>
		<Event name="OnOpen">ПриОткрытии</Event>
		<Event name="BeforeWriteAtServer">ПередЗаписьюНаСервере</Event>
		<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
		<Event name="OnWriteAtServer">ПриЗаписиНаСервере</Event>
		<Event name="FillCheckProcessingAtServer">ОбработкаПроверкиЗаполненияНаСервере</Event>
	</Events>
	<ChildItems>
		<UsualGroup name="ГруппаЛевая" id="156">
			<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>
			<Group>Vertical</Group>
			<Representation>None</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаЛеваяРасширеннаяПодсказка" id="157"/>
			<ChildItems>
				<UsualGroup name="ГруппаПериодПроведения" id="43">
					<EnableContentChange>true</EnableContentChange>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Время проведения</v8:content>
						</v8:item>
					</Title>
					<Group>Vertical</Group>
					<Representation>None</Representation>
					<ShowTitle>false</ShowTitle>
					<ExtendedTooltip name="ГруппаПериодПроведенияExtendedTooltip" id="120"/>
					<ChildItems>
						<UsualGroup name="ГруппаНачала" id="63">
							<EnableContentChange>true</EnableContentChange>
							<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>
							<Group>Horizontal</Group>
							<Representation>None</Representation>
							<ShowTitle>false</ShowTitle>
							<ExtendedTooltip name="ГруппаНачалаExtendedTooltip" id="121"/>
							<ChildItems>
								<InputField name="ДатаНачала" id="69">
									<DataPath>ДатаНачала</DataPath>
									<Title>
										<v8:item>
											<v8:lang>ru</v8:lang>
											<v8:content>Начало</v8:content>
										</v8:item>
									</Title>
									<Width>13</Width>
									<SpinButton>true</SpinButton>
									<ContextMenu name="ДатаНачалаКонтекстноеМеню" id="70"/>
									<ExtendedTooltip name="ДатаНачалаExtendedTooltip" id="122"/>
									<Events>
										<Event name="OnChange">ДатаНачалаПриИзменении</Event>
									</Events>
								</InputField>
								<InputField name="ВремяНачала" id="67">
									<DataPath>ВремяНачала</DataPath>
									<TitleLocation>None</TitleLocation>
									<Width>13</Width>
									<DropListButton>true</DropListButton>
									<ChoiceButton>false</ChoiceButton>
									<ClearButton>false</ClearButton>
									<SpinButton>true</SpinButton>
									<OpenButton>false</OpenButton>
									<CreateButton>false</CreateButton>
									<ListChoiceMode>true</ListChoiceMode>
									<EditFormat>
										<v8:item>
											<v8:lang>ru</v8:lang>
											<v8:content>ДФ=ЧЧ:мм</v8:content>
										</v8:item>
									</EditFormat>
									<ChooseType>false</ChooseType>
									<ContextMenu name="ВремяНачалаКонтекстноеМеню" id="68"/>
									<ExtendedTooltip name="ВремяНачалаExtendedTooltip" id="123"/>
									<Events>
										<Event name="OnChange">ВремяНачалаПриИзменении</Event>
									</Events>
								</InputField>
							</ChildItems>
						</UsualGroup>
						<UsualGroup name="ГруппаОкончание" id="64">
							<EnableContentChange>true</EnableContentChange>
							<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>
							<Group>Horizontal</Group>
							<Representation>None</Representation>
							<ShowTitle>false</ShowTitle>
							<ExtendedTooltip name="ГруппаОкончаниеExtendedTooltip" id="124"/>
							<ChildItems>
								<InputField name="ДатаОкончания" id="71">
									<DataPath>ДатаОкончания</DataPath>
									<Title>
										<v8:item>
											<v8:lang>ru</v8:lang>
											<v8:content>Окончание</v8:content>
										</v8:item>
									</Title>
									<Width>13</Width>
									<SpinButton>true</SpinButton>
									<ContextMenu name="ДатаОкончанияКонтекстноеМеню" id="72"/>
									<ExtendedTooltip name="ДатаОкончанияExtendedTooltip" id="125"/>
									<Events>
										<Event name="OnChange">ДатаОкончанияПриИзменении</Event>
									</Events>
								</InputField>
								<InputField name="ВремяОкончания" id="73">
									<DataPath>ВремяОкончания</DataPath>
									<TitleLocation>None</TitleLocation>
									<Width>13</Width>
									<DropListButton>true</DropListButton>
									<ChoiceButton>false</ChoiceButton>
									<ClearButton>false</ClearButton>
									<SpinButton>true</SpinButton>
									<OpenButton>false</OpenButton>
									<CreateButton>false</CreateButton>
									<ListChoiceMode>true</ListChoiceMode>
									<EditFormat>
										<v8:item>
											<v8:lang>ru</v8:lang>
											<v8:content>ДФ=ЧЧ:мм</v8:content>
										</v8:item>
									</EditFormat>
									<ChooseType>false</ChooseType>
									<ContextMenu name="ВремяОкончанияКонтекстноеМеню" id="74"/>
									<ExtendedTooltip name="ВремяОкончанияExtendedTooltip" id="126"/>
									<Events>
										<Event name="OnChange">ВремяОкончанияПриИзменении</Event>
									</Events>
								</InputField>
							</ChildItems>
						</UsualGroup>
					</ChildItems>
				</UsualGroup>
				<InputField name="МестоПроведенияВстречи" id="9">
					<DataPath>Объект.МестоПроведенияВстречи</DataPath>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Место</v8:content>
						</v8:item>
					</Title>
					<Width>50</Width>
					<AutoMaxWidth>false</AutoMaxWidth>
					<Wrap>false</Wrap>
					<ContextMenu name="МестоПроведенияВстречиКонтекстноеМеню" id="10"/>
					<ExtendedTooltip name="МестоПроведенияВстречиExtendedTooltip" id="130"/>
				</InputField>
				<InputField name="Тема" id="87">
					<DataPath>Объект.Тема</DataPath>
					<Width>50</Width>
					<AutoMaxWidth>false</AutoMaxWidth>
					<ContextMenu name="ТемаКонтекстноеМеню" id="88"/>
					<ExtendedTooltip name="ТемаExtendedTooltip" id="131"/>
				</InputField>
				<Pages name="СтраницыОписаниеУчастникиДополнительно" id="85">
					<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="СтраницыОписаниеУчастникиДополнительноРасширеннаяПодсказка" id="132"/>
					<Events>
						<Event name="OnCurrentPageChange">СтраницыОписаниеУчастникиДополнительноПриСменеСтраницы</Event>
					</Events>
					<ChildItems>
						<Page name="СтраницаОписание" id="75">
							<Title>
								<v8:item>
									<v8:lang>ru</v8:lang>
									<v8:content>Описание</v8:content>
								</v8:item>
							</Title>
							<ExtendedTooltip name="СтраницаОписаниеExtendedTooltip" id="133"/>
							<ChildItems>
								<InputField name="Описание" id="76">
									<DataPath>Объект.Описание</DataPath>
									<TitleLocation>None</TitleLocation>
									<AutoMaxWidth>false</AutoMaxWidth>
									<Height>3</Height>
									<Wrap>false</Wrap>
									<ContextMenu name="ОписаниеКонтекстноеМеню" id="77"/>
									<ExtendedTooltip name="ОписаниеExtendedTooltip" id="134"/>
								</InputField>
							</ChildItems>
						</Page>
						<Page name="СтраницаУчастники" id="38">
							<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>
							<TitleDataPath>Объект.Участники.RowsCount</TitleDataPath>
							<ExtendedTooltip name="СтраницаУчастникиРасширеннаяПодсказка" id="146"/>
							<ChildItems>
								<Table name="Участники" id="25">
									<Representation>List</Representation>
									<SkipOnInput>false</SkipOnInput>
									<DataPath>Объект.Участники</DataPath>
									<CommandSet>
										<ExcludedCommand>Copy</ExcludedCommand>
										<ExcludedCommand>SelectAll</ExcludedCommand>
										<ExcludedCommand>EndEdit</ExcludedCommand>
										<ExcludedCommand>Change</ExcludedCommand>
									</CommandSet>
									<SearchStringLocation>None</SearchStringLocation>
									<ViewStatusLocation>None</ViewStatusLocation>
									<SearchControlLocation>None</SearchControlLocation>
									<RowFilter xsi:nil="true"/>
									<ContextMenu name="УчастникиКонтекстноеМеню" id="26"/>
									<AutoCommandBar name="УчастникиКоманднаяПанель" id="27">
										<ChildItems>
											<Button name="СоздатьКонтакт" id="46">
												<Type>CommandBarButton</Type>
												<SkipOnInput>false</SkipOnInput>
												<Enabled>false</Enabled>
												<CommandName>Form.Command.СоздатьКонтакт</CommandName>
												<ExtendedTooltip name="СоздатьКонтактExtendedTooltip" id="147"/>
											</Button>
										</ChildItems>
									</AutoCommandBar>
									<ExtendedTooltip name="УчастникиExtendedTooltip" id="148"/>
									<SearchStringAddition name="УчастникиСтрокаПоиска" id="163">
										<AdditionSource>
											<Item>Участники</Item>
											<Type>SearchStringRepresentation</Type>
										</AdditionSource>
										<ContextMenu name="УчастникиСтрокаПоискаКонтекстноеМеню" id="164"/>
										<ExtendedTooltip name="УчастникиСтрокаПоискаРасширеннаяПодсказка" id="165"/>
									</SearchStringAddition>
									<ViewStatusAddition name="УчастникиСостояниеПросмотра" id="166">
										<AdditionSource>
											<Item>Участники</Item>
											<Type>ViewStatusRepresentation</Type>
										</AdditionSource>
										<ContextMenu name="УчастникиСостояниеПросмотраКонтекстноеМеню" id="167"/>
										<ExtendedTooltip name="УчастникиСостояниеПросмотраРасширеннаяПодсказка" id="168"/>
									</ViewStatusAddition>
									<SearchControlAddition name="УчастникиУправлениеПоиском" id="169">
										<AdditionSource>
											<Item>Участники</Item>
											<Type>SearchControl</Type>
										</AdditionSource>
										<ContextMenu name="УчастникиУправлениеПоискомКонтекстноеМеню" id="170"/>
										<ExtendedTooltip name="УчастникиУправлениеПоискомРасширеннаяПодсказка" id="171"/>
									</SearchControlAddition>
									<Events>
										<Event name="OnActivateRow">УчастникиПриАктивизацииСтроки</Event>
										<Event name="OnChange">УчастникиПриИзменении</Event>
									</Events>
									<ChildItems>
										<InputField name="ПредставлениеКонтакта" id="32">
											<DataPath>Объект.Участники.ПредставлениеКонтакта</DataPath>
											<Width>15</Width>
											<Wrap>false</Wrap>
											<ContextMenu name="ПредставлениеКонтактаКонтекстноеМеню" id="33"/>
											<ExtendedTooltip name="ПредставлениеКонтактаExtendedTooltip" id="149"/>
											<Events>
												<Event name="OnChange">ПредставлениеКонтактаПриИзменении</Event>
											</Events>
										</InputField>
										<InputField name="КакСвязаться" id="34">
											<DataPath>Объект.Участники.КакСвязаться</DataPath>
											<Width>15</Width>
											<Wrap>false</Wrap>
											<ContextMenu name="КакСвязатьсяКонтекстноеМеню" id="35"/>
											<ExtendedTooltip name="КакСвязатьсяExtendedTooltip" id="150"/>
										</InputField>
										<InputField name="Контакт" id="30">
											<DataPath>Объект.Участники.Контакт</DataPath>
											<Width>15</Width>
											<Wrap>false</Wrap>
											<ClearButton>true</ClearButton>
											<ContextMenu name="КонтактКонтекстноеМеню" id="31"/>
											<ExtendedTooltip name="КонтактExtendedTooltip" id="151"/>
											<Events>
												<Event name="OnChange">КонтактПриИзменении</Event>
												<Event name="StartChoice">КонтактНачалоВыбора</Event>
											</Events>
										</InputField>
									</ChildItems>
								</Table>
							</ChildItems>
						</Page>
						<Page name="СтраницаДополнительныеРеквизиты" id="86">
							<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="135"/>
						</Page>
						<Page name="СтраницаКомментарий" id="104">
							<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="136"/>
							<ChildItems>
								<InputField name="Комментарий" id="105">
									<DataPath>Объект.Комментарий</DataPath>
									<TitleLocation>None</TitleLocation>
									<AutoMaxWidth>false</AutoMaxWidth>
									<VerticalStretch>true</VerticalStretch>
									<Wrap>false</Wrap>
									<MultiLine>true</MultiLine>
									<ContextMenu name="КомментарийКонтекстноеМеню" id="106"/>
									<ExtendedTooltip name="КомментарийExtendedTooltip" id="137"/>
								</InputField>
							</ChildItems>
						</Page>
					</ChildItems>
				</Pages>
			</ChildItems>
		</UsualGroup>
		<UsualGroup name="ГруппаПравая" id="158">
			<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>
			<Group>Vertical</Group>
			<VerticalAlign>Bottom</VerticalAlign>
			<Representation>None</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаПраваяРасширеннаяПодсказка" id="159"/>
			<ChildItems>
				<InputField name="Предмет" id="48">
					<DataPath>Предмет</DataPath>
					<TitleLocation>Top</TitleLocation>
					<Width>30</Width>
					<AutoMaxWidth>false</AutoMaxWidth>
					<HorizontalStretch>false</HorizontalStretch>
					<Wrap>false</Wrap>
					<DropListButton>false</DropListButton>
					<ChoiceButton>true</ChoiceButton>
					<ClearButton>false</ClearButton>
					<OpenButton>true</OpenButton>
					<TextEdit>false</TextEdit>
					<ContextMenu name="ПредметКонтекстноеМеню" id="49"/>
					<ExtendedTooltip name="ПредметExtendedTooltip" id="117"/>
					<Events>
						<Event name="StartChoice">ПредметНачалоВыбора</Event>
					</Events>
				</InputField>
				<InputField name="Ответственный" id="17">
					<DataPath>Объект.Ответственный</DataPath>
					<TitleLocation>Top</TitleLocation>
					<Width>30</Width>
					<AutoMaxWidth>false</AutoMaxWidth>
					<HorizontalStretch>false</HorizontalStretch>
					<Wrap>false</Wrap>
					<ContextMenu name="ОтветственныйКонтекстноеМеню" id="18"/>
					<ExtendedTooltip name="ОтветственныйExtendedTooltip" id="119"/>
				</InputField>
				<CheckBoxField name="Рассмотрено" id="15">
					<DataPath>Рассмотрено</DataPath>
					<TitleLocation>Right</TitleLocation>
					<CheckBoxType>Auto</CheckBoxType>
					<ContextMenu name="РассмотреноКонтекстноеМеню" id="16"/>
					<ExtendedTooltip name="РассмотреноExtendedTooltip" id="129"/>
					<Events>
						<Event name="OnChange">РассмотреноПриИзменении</Event>
					</Events>
				</CheckBoxField>
				<InputField name="РассмотретьПосле" id="50">
					<DataPath>РассмотретьПосле</DataPath>
					<TitleLocation>Top</TitleLocation>
					<Width>16</Width>
					<HorizontalStretch>false</HorizontalStretch>
					<Wrap>false</Wrap>
					<DropListButton>true</DropListButton>
					<ContextMenu name="РассмотретьПослеКонтекстноеМеню" id="51"/>
					<ExtendedTooltip name="РассмотретьПослеExtendedTooltip" id="128"/>
					<Events>
						<Event name="ChoiceProcessing">РассмотретьПослеОбработкаВыбора</Event>
					</Events>
				</InputField>
				<InputField name="Важность" id="55">
					<DataPath>Объект.Важность</DataPath>
					<TitleLocation>Top</TitleLocation>
					<Width>16</Width>
					<HorizontalStretch>false</HorizontalStretch>
					<Wrap>false</Wrap>
					<ContextMenu name="ВажностьКонтекстноеМеню" id="56"/>
					<ExtendedTooltip name="ВажностьExtendedTooltip" id="118"/>
				</InputField>
				<Pages name="СтраницыУказаныКонтакты" id="90">
					<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>
					<GroupVerticalAlign>Top</GroupVerticalAlign>
					<PagesRepresentation>None</PagesRepresentation>
					<ExtendedTooltip name="СтраницыУказаныКонтактыExtendedTooltip" id="141"/>
					<ChildItems>
						<Page name="СтраницаКонтактыНеЗаполнены" id="91">
							<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="142"/>
							<ChildItems>
								<LabelDecoration name="ДекорацияКонтактыНеЗаполнены" id="95">
									<AutoMaxWidth>false</AutoMaxWidth>
									<TextColor>style:FieldSelectionBackColor</TextColor>
									<Title formatted="false">
										<v8:item>
											<v8:lang>ru</v8:lang>
											<v8:content>Не все контакты подобраны</v8:content>
										</v8:item>
									</Title>
									<ContextMenu name="ДекорацияКонтактыНеЗаполненыКонтекстноеМеню" id="96"/>
									<ExtendedTooltip name="ДекорацияКонтактыНеЗаполненыExtendedTooltip" id="143"/>
								</LabelDecoration>
							</ChildItems>
						</Page>
						<Page name="СтраницаКонтактыЗаполнены" id="93">
							<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="144"/>
							<ChildItems>
								<LabelDecoration name="ДекорацияКонтактыЗаполнены" id="97">
									<TextColor>style:ПоясняющийТекст</TextColor>
									<ContextMenu name="ДекорацияКонтактыЗаполненыКонтекстноеМеню" id="98"/>
									<ExtendedTooltip name="ДекорацияКонтактыЗаполненыExtendedTooltip" id="145"/>
								</LabelDecoration>
							</ChildItems>
						</Page>
					</ChildItems>
				</Pages>
				<UsualGroup name="ГруппаАвторДатаРегистрации" id="107">
					<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>
					<VerticalStretch>true</VerticalStretch>
					<GroupVerticalAlign>Bottom</GroupVerticalAlign>
					<Group>Vertical</Group>
					<Representation>None</Representation>
					<ShowTitle>false</ShowTitle>
					<ExtendedTooltip name="ГруппаАвторДатаРегистрацииExtendedTooltip" id="152"/>
					<ChildItems>
						<LabelField name="Дата" id="110">
							<DataPath>Объект.Date</DataPath>
							<ReadOnly>true</ReadOnly>
							<Title>
								<v8:item>
									<v8:lang>ru</v8:lang>
									<v8:content>Создана</v8:content>
								</v8:item>
							</Title>
							<TitleLocation>Left</TitleLocation>
							<HorizontalAlign>Left</HorizontalAlign>
							<HorizontalStretch>false</HorizontalStretch>
							<Format>
								<v8:item>
									<v8:lang>ru</v8:lang>
									<v8:content>ДЛФ=DT</v8:content>
								</v8:item>
							</Format>
							<ContextMenu name="ДатаКонтекстноеМеню" id="111"/>
							<ExtendedTooltip name="ДатаExtendedTooltip" id="154"/>
						</LabelField>
						<LabelField name="Автор" id="112">
							<DataPath>Объект.Автор</DataPath>
							<ReadOnly>true</ReadOnly>
							<TitleLocation>Left</TitleLocation>
							<HorizontalAlign>Left</HorizontalAlign>
							<Hiperlink>true</Hiperlink>
							<ContextMenu name="АвторКонтекстноеМеню" id="113"/>
							<ExtendedTooltip name="АвторExtendedTooltip" id="155"/>
						</LabelField>
					</ChildItems>
				</UsualGroup>
			</ChildItems>
		</UsualGroup>
	</ChildItems>
	<Attributes>
		<Attribute name="Объект" id="1">
			<Type>
				<v8:Type>cfg:DocumentObject.Встреча</v8:Type>
			</Type>
			<MainAttribute>true</MainAttribute>
			<SavedData>true</SavedData>
			<UseAlways>
				<Field>Объект.RegisterRecords</Field>
			</UseAlways>
		</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>
		</Attribute>
		<Attribute name="ВзаимодействиеОснование" id="3">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Взаимодействие основание</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>cfg:DocumentRef.ЭлектронноеПисьмоИсходящее</v8:Type>
				<v8:Type>cfg:DocumentRef.ЗапланированноеВзаимодействие</v8:Type>
				<v8:Type>cfg:DocumentRef.ЭлектронноеПисьмоВходящее</v8:Type>
				<v8:Type>cfg:DocumentRef.ТелефонныйЗвонок</v8:Type>
				<v8:Type>cfg:DocumentRef.Встреча</v8:Type>
				<v8:Type>cfg:DocumentRef.СообщениеSMS</v8:Type>
			</Type>
		</Attribute>
		<Attribute name="ДатаНачала" id="4">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Дата начала</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:dateTime</v8:Type>
				<v8:DateQualifiers>
					<v8:DateFractions>Date</v8:DateFractions>
				</v8:DateQualifiers>
			</Type>
		</Attribute>
		<Attribute name="ДатаОкончания" id="5">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Дата окончания</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:dateTime</v8:Type>
				<v8:DateQualifiers>
					<v8:DateFractions>Date</v8:DateFractions>
				</v8:DateQualifiers>
			</Type>
		</Attribute>
		<Attribute name="ВремяНачала" id="6">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Время начала</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:dateTime</v8:Type>
				<v8:DateQualifiers>
					<v8:DateFractions>Time</v8:DateFractions>
				</v8:DateQualifiers>
			</Type>
			<SavedData>true</SavedData>
		</Attribute>
		<Attribute name="ВремяОкончания" id="7">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Время окончания</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:dateTime</v8:Type>
				<v8:DateQualifiers>
					<v8:DateFractions>Time</v8:DateFractions>
				</v8:DateQualifiers>
			</Type>
			<SavedData>true</SavedData>
		</Attribute>
		<Attribute name="Продолжительность" id="8">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Продолжительность</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:decimal</v8:Type>
				<v8:NumberQualifiers>
					<v8:Digits>10</v8:Digits>
					<v8:FractionDigits>0</v8:FractionDigits>
					<v8:AllowedSign>Any</v8:AllowedSign>
				</v8:NumberQualifiers>
			</Type>
		</Attribute>
		<Attribute name="СписокИнтерактивноСоздаваемыхКонтактов" id="9">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Список интерактивно создаваемых контактов</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>v8:ValueListType</v8:Type>
			</Type>
		</Attribute>
		<Attribute name="Предмет" id="10">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Предмет</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:TypeSet>cfg:DefinedType.ПредметВзаимодействия</v8:TypeSet>
			</Type>
		</Attribute>
		<Attribute name="Рассмотрено" id="12">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Рассмотрено</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:boolean</v8:Type>
			</Type>
			<SavedData>true</SavedData>
		</Attribute>
		<Attribute name="РассмотретьПосле" id="13">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Рассмотреть после</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:dateTime</v8:Type>
				<v8:DateQualifiers>
					<v8:DateFractions>DateTime</v8:DateFractions>
				</v8:DateQualifiers>
			</Type>
			<SavedData>true</SavedData>
		</Attribute>
		<Attribute name="ИзменилисьКонтакты" id="11">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Изменились контакты</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:boolean</v8:Type>
			</Type>
		</Attribute>
	</Attributes>
	<Commands>
		<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>
			<Shortcut>Ctrl+S</Shortcut>
			<Picture>
				<xr:Ref>StdPicture.AddListItem</xr:Ref>
				<xr:LoadTransparent>true</xr:LoadTransparent>
			</Picture>
			<Action>СоздатьКонтактВыполнить</Action>
			<Representation>Text</Representation>
		</Command>
	</Commands>
	<CommandInterface>
		<NavigationPanel>
			<Item>
				<Command>0</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
			</Item>
			<Item>
				<Command>3:617de19c-bf01-4900-832a-c169e9faeb79</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>3:fb5b79a2-caec-4c6e-a112-27e78a184d5e</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>3:ee6e5e56-5848-46b6-89bf-b9345a57d94c</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
		</NavigationPanel>
		<CommandBar>
			<Item>
				<Command>3</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>3</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>3:33e0072d-7d5b-4298-ae77-31a7cb358f5d</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>3</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>Document.Встреча.StandardCommand.CreateBasedOn</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>Document.ЗапланированноеВзаимодействие.StandardCommand.CreateBasedOn</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>CommonCommand.ИсторияИзменений</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>Document.ЭлектронноеПисьмоИсходящее.StandardCommand.CreateBasedOn</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>Document.ТелефонныйЗвонок.StandardCommand.CreateBasedOn</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
			<Item>
				<Command>Document.СообщениеSMS.StandardCommand.CreateBasedOn</Command>
				<Type>Auto</Type>
				<DefaultVisible>false</DefaultVisible>
				<Visible>
					<xr:Common>false</xr:Common>
				</Visible>
			</Item>
		</CommandBar>
	</CommandInterface>
</Form>


text:
@interface ArticleThumbView : UIView

@end


text:
require 'spec_helper'

describe Topicconcept do
  pending "add some examples to (or delete) #{__FILE__}"
end


text:
declare module Bacon {
    interface Event<T> {
    }
    interface Error<T> extends Event<T> {
    }
    interface Observable<T> {
        zip<U, V>(other: EventStream<U>, f: (a: T, b: U) => V): EventStream<V>;
        slidingWindow(max: number, min?: number): Property<T[]>;
        log(): Observable<T>;
        combine<U, V>(other: Observable<U>, f: (a: T, b: U) => V): Property<V>;
        withStateMachine<U, V>(initState: U, f: (state: U, event: Event<T>) => StateValue<U, V>): EventStream<V>;
        decode(mapping: Object): Property<any>;
        awaiting<U>(other: Observable<U>): Property<boolean>;
        endOnError(f?: (value: T) => boolean): Observable<T>;
        withHandler(f: (event: Event<T>) => any): Observable<T>;
        name(name: string): Observable<T>;
        withDescription(...args: any[]): Observable<T>;
    }
    interface Property<T> extends Observable<T> {
    }
    interface EventStream<T> extends Observable<T> {
    }
    interface Bus<T> extends EventStream<T> {
    }
    var Bus: new <T>() => Bus<T>;
}

var stuck: Bacon.Bus<number> = new Bacon.Bus();


text:
class SongArtist < ActiveRecord::Base
end


text:
<!DOCTYPE html>

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

    <title>doglodge.io</title>

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

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

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

                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="true" aria-controls="navbar">
                    Toggle navigation

                </button>
                doglodge.io

Home

Deck

Me

Twitter

LinkedIn

Github

    {% if unavailable == False %}

Best Places to Stay With Your Dog in {{destination}}

           Rating
        Hotel Image
        Hotel Name
        Avg Price

        {% for rating, name, img, url, price in ratings %}

        {{rating}}

        {{name}}

        {% if price == 'nan' %}

        N/A

        {% else %}

        $ {{price}}
/night

        {% endif %}

        {% endfor %}

    {% else %}

            We're sorry, but doglodge.io does not yet provide information for {{destination}}.
            Please select from the following available destinations:

        {% for city in available_cities %}

        {{city}}

        {% endfor %}

    {% endif %}


text:
<?php

$menu = dirname(__FILE__).'/../layout/menu.php';
require_once($menu);

?>
<link href="../../../../bootstrap/css/font-awesome.min.css" media="all" rel="stylesheet">
<link href="../../../../bootstrap/css/history.css" media="all" rel="stylesheet">

1986年

束兰国际服装有限公司成立

&nbsp&nbsp&nbsp&nbsp束兰国际服装有限公司成立,并建立起严格的品质保障体系,率先在国内将毛皮服装行业作坊式生产方式改为大规模流水线生产方式,引发行业历史性的革命

1992年

Lorem ipsum velit ullamco anim pariatur proident eu deserunt laborum. Lorem ipsum ad in nostrud adipisicing cupidatat anim officia ad id cupidatat veniam quis elit ullamco

					John Smith

1994年

This is an image posted on my timeline

Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.

1997年

This is a title for this timeline post

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, dapibus id, mattis vel, nisi. Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.

1992年

This is a title for this timeline post

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, dapibus id, mattis vel, nisi. Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.

2000年

Lorem ipsum velit ullamco anim pariatur proident eu deserunt laborum. Lorem ipsum ad in nostrud adipisicing cupidatat anim officia ad id cupidatat veniam quis elit ullamco

					John Smith

2013年

This is an image posted on my timeline

Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.

2014年

This is a title for this timeline post

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, dapibus id, mattis vel, nisi. Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.


text:
'use strict';

var should = require('should'),
	request = require('supertest'),
	path = require('path'),
	mongoose = require('mongoose'),
	User = mongoose.model('User'),
	Picture = mongoose.model('Picture'),
	express = require(path.resolve('./config/lib/express'));

/**
 * Globals
 */
var app, agent, credentials, user, picture;

/**
 * Picture routes tests
 */
describe('Picture CRUD tests', function() {
	before(function(done) {
		// Get application
		app = express.init(mongoose);
		agent = request.agent(app);

		done();
	});

	beforeEach(function(done) {
		// Create user credentials
		credentials = {
			username: 'username',
			password: 'password'
		};

		// Create a new user
		user = new User({
			firstName: 'Full',
			lastName: 'Name',
			displayName: 'Full Name',
			email: 'test@test.com',
			username: credentials.username,
			password: credentials.password,
			provider: 'local'
		});

		// Save a user to the test db and create new Picture
		user.save(function() {
			picture = {
				name: 'Picture Name'
			};

			done();
		});
	});

	it('should be able to save Picture instance if logged in', function(done) {
		agent.post('/api/auth/signin')
			.send(credentials)
			.expect(200)
			.end(function(signinErr, signinRes) {
				// Handle signin error
				if (signinErr) done(signinErr);

				// Get the userId
				var userId = user.id;

				// Save a new Picture
				agent.post('/api/pictures')
					.send(picture)
					.expect(200)
					.end(function(pictureSaveErr, pictureSaveRes) {
						// Handle Picture save error
						if (pictureSaveErr) done(pictureSaveErr);

						// Get a list of Pictures
						agent.get('/api/pictures')
							.end(function(picturesGetErr, picturesGetRes) {
								// Handle Picture save error
								if (picturesGetErr) done(picturesGetErr);

								// Get Pictures list
								var pictures = picturesGetRes.body;

								// Set assertions
								(pictures[0].user._id).should.equal(userId);
								(pictures[0].name).should.match('Picture Name');

								// Call the assertion callback
								done();
							});
					});
			});
	});

	it('should not be able to save Picture instance if not logged in', function(done) {
		agent.post('/api/pictures')
			.send(picture)
			.expect(403)
			.end(function(pictureSaveErr, pictureSaveRes) {
				// Call the assertion callback
				done(pictureSaveErr);
			});
	});

	it('should not be able to save Picture instance if no name is provided', function(done) {
		// Invalidate name field
		picture.name = '';

		agent.post('/api/auth/signin')
			.send(credentials)
			.expect(200)
			.end(function(signinErr, signinRes) {
				// Handle signin error
				if (signinErr) done(signinErr);

				// Get the userId
				var userId = user.id;

				// Save a new Picture
				agent.post('/api/pictures')
					.send(picture)
					.expect(400)
					.end(function(pictureSaveErr, pictureSaveRes) {
						// Set message assertion
						(pictureSaveRes.body.message).should.match('Please fill Picture name');

						// Handle Picture save error
						done(pictureSaveErr);
					});
			});
	});

	it('should be able to update Picture instance if signed in', function(done) {
		agent.post('/api/auth/signin')
			.send(credentials)
			.expect(200)
			.end(function(signinErr, signinRes) {
				// Handle signin error
				if (signinErr) done(signinErr);

				// Get the userId
				var userId = user.id;

				// Save a new Picture
				agent.post('/api/pictures')
					.send(picture)
					.expect(200)
					.end(function(pictureSaveErr, pictureSaveRes) {
						// Handle Picture save error
						if (pictureSaveErr) done(pictureSaveErr);

						// Update Picture name
						picture.name = 'WHY YOU GOTTA BE SO MEAN?';

						// Update existing Picture
						agent.put('/api/pictures/' + pictureSaveRes.body._id)
							.send(picture)
							.expect(200)
							.end(function(pictureUpdateErr, pictureUpdateRes) {
								// Handle Picture update error
								if (pictureUpdateErr) done(pictureUpdateErr);

								// Set assertions
								(pictureUpdateRes.body._id).should.equal(pictureSaveRes.body._id);
								(pictureUpdateRes.body.name).should.match('WHY YOU GOTTA BE SO MEAN?');

								// Call the assertion callback
								done();
							});
					});
			});
	});

	it('should be able to get a list of Pictures if not signed in', function(done) {
		// Create new Picture model instance
		var pictureObj = new Picture(picture);

		// Save the Picture
		pictureObj.save(function() {
			// Request Pictures
			request(app).get('/api/pictures')
				.end(function(req, res) {
					// Set assertion
					res.body.should.be.an.Array.with.lengthOf(1);

					// Call the assertion callback
					done();
				});

		});
	});

	it('should be able to get a single Picture if not signed in', function(done) {
		// Create new Picture model instance
		var pictureObj = new Picture(picture);

		// Save the Picture
		pictureObj.save(function() {
			request(app).get('/api/pictures/' + pictureObj._id)
				.end(function(req, res) {
					// Set assertion
					res.body.should.be.an.Object.with.property('name', picture.name);

					// Call the assertion callback
					done();
				});
		});
	});

	it('should be able to delete Picture instance if signed in', function(done) {
		agent.post('/api/auth/signin')
			.send(credentials)
			.expect(200)
			.end(function(signinErr, signinRes) {
				// Handle signin error
				if (signinErr) done(signinErr);

				// Get the userId
				var userId = user.id;

				// Save a new Picture
				agent.post('/api/pictures')
					.send(picture)
					.expect(200)
					.end(function(pictureSaveErr, pictureSaveRes) {
						// Handle Picture save error
						if (pictureSaveErr) done(pictureSaveErr);

						// Delete existing Picture
						agent.delete('/api/pictures/' + pictureSaveRes.body._id)
							.send(picture)
							.expect(200)
							.end(function(pictureDeleteErr, pictureDeleteRes) {
								// Handle Picture error error
								if (pictureDeleteErr) done(pictureDeleteErr);

								// Set assertions
								(pictureDeleteRes.body._id).should.equal(pictureSaveRes.body._id);

								// Call the assertion callback
								done();
							});
					});
			});
	});

	it('should not be able to delete Picture instance if not signed in', function(done) {
		// Set Picture user
		picture.user = user;

		// Create new Picture model instance
		var pictureObj = new Picture(picture);

		// Save the Picture
		pictureObj.save(function() {
			// Try deleting Picture
			request(app).delete('/api/pictures/' + pictureObj._id)
			.expect(403)
			.end(function(pictureDeleteErr, pictureDeleteRes) {
				// Set message assertion
				(pictureDeleteRes.body.message).should.match('User is not authorized');

				// Handle Picture error error
				done(pictureDeleteErr);
			});

		});
	});

	afterEach(function(done) {
		User.remove().exec(function(){
			Picture.remove().exec(function(){
				done();
			});
		});
	});
});


text:
#region License

// Distributed under the MIT License
// ============================================================
// Copyright (c) 2019 Hotcakes Commerce, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#endregion

using Hotcakes.Commerce.Accounts;
using Hotcakes.Commerce.Shipping;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Hotcakes.Commerce.Tests
{
    /// <summary>
    ///     This is a test class for OrderService and is intended
    ///     to contain all OrderService Unit Tests
    /// </summary>
    [TestClass]
    public class OrderServiceTest
    {
        /// <summary>
        ///     Gets or sets the test context which provides
        ///     information about and functionality for the current test run.
        /// </summary>
        public TestContext TestContext { get; set; }

        [TestMethod]
        public void OrderService_CanCreateShippingMethod()
        {
            var app = BaseTest.CreateHccAppInMemory();
            app.CurrentRequestContext.CurrentStore = new Store();
            app.CurrentRequestContext.CurrentStore.Id = 230;

            var target = new ShippingMethod();
            target.Adjustment = 1.23m;
            target.AdjustmentType = ShippingMethodAdjustmentType.Percentage;
            target.Bvin = string.Empty;
            target.Name = "Test Name";
            target.Settings.AddOrUpdate("MySetting", "MySetVal");
            target.ShippingProviderId = "123456";
            target.ZoneId = -101;

            Assert.IsTrue(app.OrderServices.ShippingMethods.Create(target));
            Assert.AreNotEqual(string.Empty, target.Bvin, "Bvin should not be empty");
        }

        [TestMethod]
        public void OrderService_CanRetrieveShippingMethod()
        {
            var app = BaseTest.CreateHccAppInMemory();
            app.CurrentRequestContext.CurrentStore = new Store();
            app.CurrentRequestContext.CurrentStore.Id = 230;

            var target = new ShippingMethod();
            target.Adjustment = 1.23m;
            target.AdjustmentType = ShippingMethodAdjustmentType.Percentage;
            target.Bvin = string.Empty;
            target.Name = "Test Name";
            target.Settings.AddOrUpdate("MySetting", "MySetVal");
            target.ShippingProviderId = "123456";
            target.ZoneId = -101;

            app.OrderServices.ShippingMethods.Create(target);
            Assert.AreNotEqual(string.Empty, target.Bvin, "Bvin should not be empty");

            var actual = app.OrderServices.ShippingMethods.Find(target.Bvin);
            Assert.IsNotNull(actual, "Actual should not be null");

            Assert.AreEqual(actual.Adjustment, target.Adjustment);
            Assert.AreEqual(actual.AdjustmentType, target.AdjustmentType);
            Assert.AreEqual(actual.Bvin, target.Bvin);
            Assert.AreEqual(actual.Name, target.Name);
            Assert.AreEqual(actual.Settings["MySetting"], target.Settings["MySetting"]);
            Assert.AreEqual(actual.ShippingProviderId, target.ShippingProviderId);
            Assert.AreEqual(actual.ZoneId, target.ZoneId);
        }

        [TestMethod]
        public void OrderService_CanUpdateShippingMethod()
        {
            var app = BaseTest.CreateHccAppInMemory();
            app.CurrentRequestContext.CurrentStore = new Store();
            app.CurrentRequestContext.CurrentStore.Id = 230;

            var target = new ShippingMethod();
            target.Adjustment = 1.23m;
            target.AdjustmentType = ShippingMethodAdjustmentType.Percentage;
            target.Bvin = string.Empty;
            target.Name = "Test Name";
            target.Settings.AddOrUpdate("MySetting", "MySetVal");
            target.ShippingProviderId = "123456";
            target.ZoneId = -101;

            app.OrderServices.ShippingMethods.Create(target);
            Assert.AreNotEqual(string.Empty, target.Bvin, "Bvin should not be empty");

            target.Adjustment = 1.95m;
            target.AdjustmentType = ShippingMethodAdjustmentType.Amount;
            target.Name = "Test Name Updated";
            target.Settings.AddOrUpdate("MySetting", "MySetVal 2");
            target.ShippingProviderId = "1Update";
            target.ZoneId = -100;
            Assert.IsTrue(app.OrderServices.ShippingMethods.Update(target));

            var actual = app.OrderServices.ShippingMethods.Find(target.Bvin);
            Assert.IsNotNull(actual, "Actual should not be null");

            Assert.AreEqual(actual.Adjustment, target.Adjustment);
            Assert.AreEqual(actual.AdjustmentType, target.AdjustmentType);
            Assert.AreEqual(actual.Bvin, target.Bvin);
            Assert.AreEqual(actual.Name, target.Name);
            Assert.AreEqual(actual.Settings["MySetting"], target.Settings["MySetting"]);
            Assert.AreEqual(actual.ShippingProviderId, target.ShippingProviderId);
            Assert.AreEqual(actual.ZoneId, target.ZoneId);
        }

        [TestMethod]
        public void OrderService_CanDeleteShippingMethod()
        {
            var app = BaseTest.CreateHccAppInMemory();
            app.CurrentRequestContext.CurrentStore = new Store();
            app.CurrentRequestContext.CurrentStore.Id = 230;

            var target = new ShippingMethod();
            target.Adjustment = 1.23m;
            target.AdjustmentType = ShippingMethodAdjustmentType.Percentage;
            target.Bvin = string.Empty;
            target.Name = "Test Name";
            target.Settings.AddOrUpdate("MySetting", "MySetVal");
            target.ShippingProviderId = "123456";
            target.ZoneId = -101;

            Assert.IsTrue(app.OrderServices.ShippingMethods.Create(target));
            Assert.AreNotEqual(string.Empty, target.Bvin, "Bvin should not be empty");

            Assert.IsTrue(app.OrderServices.ShippingMethods.Delete(target.Bvin), "Delete should be true");
            var actual = app.OrderServices.ShippingMethods.Find(target.Bvin);
            Assert.IsNull(actual, "Actual should be null after delete");
        }

        #region Additional test attributes

        //
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //

        #endregion
    }
}


text:
package mu.nu.nullpo.game.subsystem.wallkick;

import mu.nu.nullpo.game.component.Controller;
import mu.nu.nullpo.game.component.Field;
import mu.nu.nullpo.game.component.Piece;
import mu.nu.nullpo.game.component.WallkickResult;

/**
 * AvalancheWallkick
 */
public class AvalancheWallkick implements Wallkick {
	/*
	 * Wallkick
	 */
	public WallkickResult executeWallkick(int x, int y, int rtDir, int rtOld, int rtNew, boolean allowUpward, Piece piece, Field field, Controller ctrl) {
		int check = 1;
		if(piece.big) check = 2;

		if(rtNew == Piece.DIRECTION_LEFT || !piece.checkCollision(x, y, rtNew, field))
			return null;
		if(!piece.checkCollision(x, y - check, rtNew, field))
			return new WallkickResult(0, -1*check, rtNew);
		else if (rtNew == Piece.DIRECTION_UP && !piece.checkCollision(x - check, y, rtNew, field))
			return new WallkickResult(-1*check, 0, rtNew);
		else if (rtNew == Piece.DIRECTION_DOWN && !piece.checkCollision(x + check, y, rtNew, field))
			return new WallkickResult(check, 0, rtNew);
		return null;
	}
}


text:
module Syrup::Persistence
  extend ActiveSupport::Concern

  included do
    include ActiveRecord::Persistence
    include ActiveRecord::Transactions
    include ActiveRecord::Validations

    extend ClassMethods
    include InstanceMethods
  end

  module ClassMethods
    def connection
      ActiveRecord::Base.connection
    end
  end

  module InstanceMethods
    def save_form
      self.related_objects.all?{|klass, related| related.save }
    end
  end

end


text:
<!doctype html>

    <link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Lato:400,700,900' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Londrina+Sketch' rel='stylesheet' type='text/css'>
     <link href='https://fonts.googleapis.com/css?family=PT+Mono' rel='stylesheet' type='text/css'>

    <title>Allison Paul </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/blog-template.css">

A Girl Codes

                H O M E

                B A C K

Ruby Classes

and Instance Variables

March 20, 2016

        This week at Dev Bootcamp we focused a lot on classes. Classes are an awesome way to organize data. You assign the data different attributes and pass the information within methods.  It's easier here if I let the code do the talking.

        class Movie
          def initialize(actor, director, title)
            @actor = actor
            @director = director
            @title = title
          end

          def movie_title
            puts "#{@title} was a really great movie!"
          end

          def the_talent
            puts "It starred #{@actor}"
          end

          def directed
            puts "And it was directed by #{@director}.  #{@actor} has been in some other films by #{@director} in the past as well."
          end
        end

      movie= Movie.new("Owen Wilson", "Wes Anderson", "The Royal Tenenbaums")
      movie.movie_title
      movie.the_talent
      movie.directed

        Above you see a gorgeous and complicated example of me creating, defining and calling a class. (Okay, it's basic). First I defined a classs titled Movie, with a capital 'M'. It is important to use a capital letter to define class.  A class must do something meaningful. You add methods to interact with the data and give results. Methods are just things that an object can do.

        The next step is to initialize the method which will pass down all parameters to use in any other method of the class. Pretty nifty, huh? These are our instance variables. Instance variables are defined with an @ symbol. Instance variables represent an object's data and object ID. If the variable doesn't begin with an @ it is just a plain old local variable that can't be used between methods.

        The last step is to call the method.  movie= Movie.new("Owen Wilson", "Wes Anderson", "The Royal Tenenbaums") is creating a new instance of the class Movie. To call each individual method of the class we just type move.'method_name' and fill in the correct name of the method.


text:
package org.jasig.portal.version.dao.jpa;

import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;

import org.jasig.portal.concurrency.CallableWithoutResult;
import org.jasig.portal.test.BasePortalJpaDaoTest;
import org.jasig.portal.version.dao.VersionDao;
import org.jasig.portal.version.om.Version;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:jpaPortalTestApplicationContext.xml")
public class JpaVersionDaoTest extends BasePortalJpaDaoTest {

    @Autowired
    private VersionDao versionDao;

    @Test
    public void testVersionLifecycle() {
        final String productName = "TEST_VERSION";

        //Doesn't exist
        this.execute(new CallableWithoutResult() {
            @Override
            protected void callWithoutResult() {
                final Version version = versionDao.getVersion(productName);
                assertNull(version);
            }
        });

        //Create
        this.execute(new CallableWithoutResult() {
            @Override
            protected void callWithoutResult() {
                Version version = versionDao.getVersion(productName);
                assertNull(version);
                version = versionDao.setVersion(productName, 1, 2, 3);
                assertNotNull(version);
                assertEquals(1, version.getMajor());
                assertEquals(2, version.getMinor());
                assertEquals(3, version.getPatch());
            }
        });

        //Update
        this.execute(new CallableWithoutResult() {
            @Override
            protected void callWithoutResult() {
                Version version = versionDao.getVersion(productName);
                assertNotNull(version);
                assertEquals(1, version.getMajor());
                assertEquals(2, version.getMinor());
                assertEquals(3, version.getPatch());

                version = versionDao.setVersion(productName, 4, 5, 6);
                assertNotNull(version);
                assertEquals(4, version.getMajor());
                assertEquals(5, version.getMinor());
                assertEquals(6, version.getPatch());
            }
        });

        //verify
        this.execute(new CallableWithoutResult() {
            @Override
            protected void callWithoutResult() {
                Version version = versionDao.getVersion(productName);
                assertNotNull(version);
                assertEquals(4, version.getMajor());
                assertEquals(5, version.getMinor());
                assertEquals(6, version.getPatch());
            }
        });
    }
}


text:
FROM php:5.6-alpine

# git is for composer
# zip is for composer

RUN apk add --no-cache \
        git \
        postgresql-dev \
        postgresql-client \
        libzip-dev \
    && docker-php-ext-install \
        pgsql pdo_pgsql \
        zip

RUN curl -sS https://getcomposer.org/installer >composer-setup.php \
    && php composer-setup.php --quiet \
        --install-dir=/usr/local/bin --filename=composer \
    && rm composer-setup.php

COPY ./ /usr/src/dboss
WORKDIR /usr/src/dboss

RUN composer install

CMD [ "php", "-S", "0.0.0.0:8080", "-t", "./public/", "public/index.php" ]


text:
@interface OKViewController : UIViewController<GKGameCenterControllerDelegate>

- (IBAction)viewLeaderboards:(id)sender;
- (IBAction)logoutOfOpenKit:(id)sender;
- (IBAction)loginToOpenKit:(id)sender;
- (IBAction)submitScore:(id)sender;
- (IBAction)viewAchievements:(id)sender;
- (IBAction)launchGameCenter:(id)sender;
-(IBAction)unlockAchievement:(id)sender;

@property (nonatomic, strong) IBOutlet OKUserProfileImageView *profileImageView;
@property (nonatomic, strong) IBOutlet UIButton *logoutButton;
@property (nonatomic, strong) IBOutlet UIButton *loginButton;
@property (nonatomic, strong) IBOutlet UILabel *userNickLabel;

@end


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.34014
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace SqlServerValidationToolkit.UnitTests.Properties {
    using System;

    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SqlServerValidationToolkit.UnitTests.Properties.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to /*============================================================================
        ///  File:     CREATE_and_fill_Validation_Test_Database.sql
        ///
        ///  Summary:  Creates and fills the Database used for testing the
        ///			Validation Toolkit
        ///
        ///  Date:     August 17, 2011
        ///------------------------------------------------------------------------------
        ///
        ///  Copyright (c) 2011, Simon Gubler
        ///  All rights reserved.
        ///
        ///  Redistribution and use, with or without modification, are permitted provided that the following condition [rest of string was truncated]";.
        /// </summary>
        internal static string CREATE_and_fill_Validation_Test_Database {
            get {
                return ResourceManager.GetString("CREATE_and_fill_Validation_Test_Database", resourceCulture);
            }
        }
    }
}


text:
'''Base class for all of our tests'''

import os
import re
import redis
import qless
import unittest

class TestQless(unittest.TestCase):
    '''Base class for all of our tests'''
    @classmethod
    def setUpClass(cls):
        url = os.environ.get('REDIS_URL', 'redis://localhost:6379/')
        cls.redis = redis.Redis.from_url(url)
        cls.lua = qless.QlessRecorder(cls.redis)

    def tearDown(self):
        self.lua.flush()

    def assertMalformed(self, function, examples):
        '''Ensure that all the example inputs to the function are malformed.'''
        for args in examples:
            try:
                # The reason that we're not using assertRaises is that the error
                # message that is produces is unnecessarily vague, and offers no
                # indication of what arguments actually failed to raise the
                # exception
                function(*args)
                self.assertTrue(False, 'Exception not raised for %s(%s)' % (
                    function.__name__, repr(args)))
            except redis.ResponseError:
                self.assertTrue(True)

    def assertRaisesRegexp(self, typ, regex, func, *args, **kwargs):
        '''Python 2.6 doesn't include this method'''
        try:
            func(*args, **kwargs)
            self.assertFalse(True, 'No exception raised')
        except typ as exc:
            self.assertTrue(re.search(regex, str(exc)),
                '%s does not match %s' % (str(exc), regex))
        except Exception as exc:
            self.assertFalse(True,
                '%s raised, expected %s' % (type(exc).__name__, typ.__name__))


text:
package com.lothrazar.cyclic.block.detectoritem;

import java.util.List;
import javax.annotation.Nullable;
import com.lothrazar.cyclic.ModCyclic;
import com.lothrazar.cyclic.base.TileEntityBase;
import com.lothrazar.cyclic.block.detectorentity.CompareType;
import com.lothrazar.cyclic.registry.TileRegistry;
import com.lothrazar.cyclic.util.UtilShape;
import net.minecraft.block.BlockState;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.INamedContainerProvider;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

public class TileDetectorItem extends TileEntityBase implements ITickableTileEntity, INamedContainerProvider {

  private static final int PER_TICK = 10;
  public static final int MAX_RANGE = 32;
  private int rangeX = 5;
  private int rangeY = 1;
  private int rangeZ = 5;
  //default is > 0 living entities
  private int limitUntilRedstone = 0;
  private CompareType compType = CompareType.GREATER;
  private boolean isPoweredNow = false;

  static enum Fields {
    GREATERTHAN, LIMIT, RANGEX, RANGEY, RANGEZ, RENDER;
  }

  public TileDetectorItem() {
    super(TileRegistry.detector_item);
  }

  @Override
  public void tick() {
    timer--;
    if (world.isRemote || timer > 0) {
      return;//client so halt
    }
    timer = PER_TICK;
    //and then
    int entitiesFound = getCountInRange();
    boolean trigger = false;
    switch (this.compType) {
      case LESS:
        trigger = (entitiesFound < limitUntilRedstone);
      break;
      case GREATER:
        trigger = (entitiesFound > limitUntilRedstone);
      break;
      case EQUAL:
        trigger = (entitiesFound == limitUntilRedstone);
      break;
      default:
      break;
    }
    //    ModCyclic.LOGGER.info("! power " + isPoweredNow);
    if (isPoweredNow != trigger) {
      isPoweredNow = trigger;
      BlockState state = world.getBlockState(this.getPos());
      world.notifyBlockUpdate(this.getPos(), state, state, 3);
      try {
        world.notifyNeighborsOfStateChange(this.getPos(), this.getBlockState().getBlock());
      }
      catch (Throwable e) {
        //somehow this lead to a
        //        java.lang.NullPointerException
        //        at net.minecraft.block.BlockDoor.neighborChanged(BlockDoor.java:228)
        // from the notifyNeighborsOfStateChange(...)
        // door was doing a get state on pos.up() , so its top half..
        //this catch means no game crash
        ModCyclic.LOGGER.error("Detector: State change error in adjacent block ", e);
      }
    }
  }

  @Override
  @OnlyIn(Dist.CLIENT)
  public AxisAlignedBB getRenderBoundingBox() {
    return TileEntity.INFINITE_EXTENT_AABB;
  }

  @Override
  public ITextComponent getDisplayName() {
    return new StringTextComponent(getType().getRegistryName().getPath());
  }

  @Nullable
  @Override
  public Container createMenu(int i, PlayerInventory playerInventory, PlayerEntity playerEntity) {
    return new ContainerDetectorItem(i, world, pos, playerInventory, playerEntity);
  }

  @Override
  public boolean isPowered() {
    return isPoweredNow;
  }

  private int getCountInRange() {
    AxisAlignedBB entityRange = getRange();
    int entitiesFound = 0;
    List<ItemEntity> entityList = world.getEntitiesWithinAABB(ItemEntity.class, entityRange);
    for (ItemEntity item : entityList) {
      entitiesFound += item.getItem().getCount();
    }
    return entitiesFound;
  }

  private AxisAlignedBB getRange() {
    double x = pos.getX();
    double y = pos.getY();
    double z = pos.getZ();
    AxisAlignedBB entityRange = new AxisAlignedBB(
        x - this.rangeX, y - this.rangeY, z - this.rangeZ,
        x + this.rangeX + 1, y + this.rangeY, z + this.rangeZ + 1);
    return entityRange;
  }

  @Override
  public int getField(int f) {
    switch (Fields.values()[f]) {
      case GREATERTHAN:
        return this.compType.ordinal();
      case LIMIT:
        return this.limitUntilRedstone;
      case RANGEX:
        return this.rangeX;
      case RANGEY:
        return this.rangeY;
      case RANGEZ:
        return this.rangeZ;
      case RENDER:
        return this.render;
      default:
      break;
    }
    return 0;
  }

  @Override
  public void setField(int field, int value) {
    Fields f = Fields.values()[field];
    if (f == Fields.RANGEX || f == Fields.RANGEY || f == Fields.RANGEZ) {
      if (value > MAX_RANGE) {
        value = MAX_RANGE;
      }
      if (value < 1) {
        value = 1;
      }
    }
    switch (f) {
      case GREATERTHAN:
        if (value >= CompareType.values().length) {
          value = 0;
        }
        if (value < 0) {
          value = CompareType.values().length - 1;
        }
        this.compType = CompareType.values()[value];
      break;
      case LIMIT:
        if (value > 999) {
          value = MAX_RANGE;
        }
        if (value < 0) {
          value = 0;
        }
        this.limitUntilRedstone = value;
      break;
      case RANGEX:
        this.rangeX = value;
      break;
      case RANGEY:
        this.rangeY = value;
      break;
      case RANGEZ:
        this.rangeZ = value;
      break;
      case RENDER:
        this.render = value % 2;
      break;
    }
  }

  @Override
  public void read(BlockState bs, CompoundNBT tag) {
    this.rangeX = tag.getInt("ox");
    this.rangeY = tag.getInt("oy");
    this.rangeZ = tag.getInt("oz");
    this.limitUntilRedstone = tag.getInt("limit");
    int cType = tag.getInt("compare");
    if (cType >= 0 && cType < CompareType.values().length)
      this.compType = CompareType.values()[cType];
    super.read(bs, tag);
  }

  @Override
  public CompoundNBT write(CompoundNBT tag) {
    tag.putInt("ox", rangeX);
    tag.putInt("oy", rangeY);
    tag.putInt("oz", rangeZ);
    tag.putInt("limit", limitUntilRedstone);
    tag.putInt("compare", compType.ordinal());
    return super.write(tag);
  }

  public List<BlockPos> getShape() {
    return UtilShape.getShape(getRange(), pos.getY());
  }
}


text:
/** @file drm_scatter.c
 * Allocation of memory for scatter-gather mappings by the graphics chip.
 *
 * The memory allocated here is then made into an aperture in the card
 * by drm_ati_pcigart_init().
 */

#include "drmP.h"

#if defined(__FreeBSD__)
static void drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs,
			    int nsegs, int error);
#endif

int
drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather *request)
{
	struct drm_sg_mem *entry;
	struct drm_dma_handle *dmah;
	unsigned long pages;
	int ret;
#if defined(__NetBSD__)
	int nsegs, i, npage;
#endif

	if (dev->sg)
		return EINVAL;

	entry = malloc(sizeof(*entry), DRM_MEM_SGLISTS, M_WAITOK | M_ZERO);
	if (!entry)
		return ENOMEM;

	pages = round_page(request->size) / PAGE_SIZE;
	DRM_DEBUG("sg size=%ld pages=%ld\n", request->size, pages);

	entry->pages = pages;

	entry->busaddr = malloc(pages * sizeof(*entry->busaddr), DRM_MEM_PAGES,
	    M_WAITOK | M_ZERO);
	if (!entry->busaddr) {
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}

#if defined(__FreeBSD__)
	dmah = malloc(sizeof(struct drm_dma_handle), DRM_MEM_DMA,
	    M_ZERO | M_NOWAIT);
	if (dmah == NULL) {
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}

	ret = bus_dma_tag_create(NULL, PAGE_SIZE, 0, /* tag, align, boundary */
	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */
	    NULL, NULL, /* filtfunc, filtfuncargs */
	    request->size, pages, /* maxsize, nsegs */
	    PAGE_SIZE, 0, /* maxsegsize, flags */
	    NULL, NULL, /* lockfunc, lockfuncargs */
	    &dmah->tag);
	if (ret != 0) {
		free(dmah, DRM_MEM_DMA);
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}

	ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr,
	    BUS_DMA_WAITOK | BUS_DMA_ZERO, &dmah->map);
	if (ret != 0) {
		bus_dma_tag_destroy(dmah->tag);
		free(dmah, DRM_MEM_DMA);
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}

	ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr,
	    request->size, drm_sg_alloc_cb, entry,
	    BUS_DMA_NOWAIT | BUS_DMA_NOCACHE);
	if (ret != 0) {
		bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map);
		bus_dma_tag_destroy(dmah->tag);
		free(dmah, DRM_MEM_DMA);
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}
#elif   defined(__NetBSD__)
	dmah = malloc(sizeof(struct drm_dma_handle) +
		      (pages - 1) * sizeof(bus_dma_segment_t),
		      DRM_MEM_DMA, M_ZERO | M_NOWAIT);
	if (dmah == NULL) {
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}

	dmah->tag = dev->pa.pa_dmat;

	if ((ret = bus_dmamem_alloc(dmah->tag, request->size, PAGE_SIZE, 0,
				    dmah->segs, pages, &nsegs,
				    BUS_DMA_WAITOK)) != 0) {
		printf("drm: Unable to allocate %lu bytes of DMA, error %d\n",
		    request->size, ret);
		dmah->tag = NULL;
		free(dmah, DRM_MEM_DMA);
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}
	DRM_DEBUG("nsegs = %d\n", nsegs);
	dmah->nsegs = nsegs;
	if ((ret = bus_dmamem_map(dmah->tag, dmah->segs, nsegs, request->size,
				  &dmah->vaddr, BUS_DMA_NOWAIT |
				  BUS_DMA_NOCACHE | BUS_DMA_COHERENT)) != 0) {
		printf("drm: Unable to map DMA, error %d\n", ret);
		bus_dmamem_free(dmah->tag, dmah->segs, dmah->nsegs);
		dmah->tag = NULL;
		free(dmah, DRM_MEM_DMA);
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}
	if ((ret = bus_dmamap_create(dmah->tag, request->size, nsegs,
                                     request->size, 0, BUS_DMA_NOWAIT,
				     &dmah->map)) != 0) {
		printf("drm: Unable to create DMA map, error %d\n", ret);
		bus_dmamem_unmap(dmah->tag, dmah->vaddr, request->size);
		bus_dmamem_free(dmah->tag, dmah->segs, nsegs);
		dmah->tag = NULL;
		free(dmah, DRM_MEM_DMA);
		free(entry->busaddr, DRM_MEM_PAGES);
		free(entry, DRM_MEM_SGLISTS);
		return ENOMEM;
	}
	if ((ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr,
				   request->size, NULL,
				   BUS_DMA_NOWAIT | BUS_DMA_NOCACHE)) != 0) {
		printf("drm: Unable to load DMA map, error %d\n", ret);
		bus_dmamap_destroy(dmah->tag, dmah->map);
		bus_dmamem_unmap(dmah->tag, dmah->vaddr, request->size);
		bus_dmamem_free(dmah->tag, dmah->segs, dmah->nsegs);
		dmah->tag = NULL;
		free(dmah, DRM_MEM_DMA);
		return ENOMEM;
	}
	/*
	 * We are expected to return address for each page here.
	 * If bus_dmamem_alloc did not return each page in own segment
	 * (likely not), split them as if they were separate segments.
	 */
	for (i = 0, npage = 0 ; (i < nsegs) && (npage < pages) ; i++) {
		bus_addr_t base = dmah->map->dm_segs[i].ds_addr;
		bus_size_t offs;

		for (offs = 0;
		     (offs + PAGE_SIZE <= dmah->map->dm_segs[i].ds_len) &&
		     (npage < pages);
		     offs += PAGE_SIZE)
			entry->busaddr[npage++] = base + offs;
	}
	KASSERT(i == nsegs);
	KASSERT(npage == pages);
	dmah->size = request->size;
	memset(dmah->vaddr, 0, request->size);
#endif

	entry->sg_dmah = dmah;
	entry->handle = (unsigned long)dmah->vaddr;

	DRM_DEBUG("sg alloc handle  = %08lx\n", entry->handle);

	entry->virtual = (void *)entry->handle;
	request->handle = entry->handle;

	DRM_LOCK();
	if (dev->sg) {
		DRM_UNLOCK();
		drm_sg_cleanup(entry);
		return EINVAL;
	}
	dev->sg = entry;
	DRM_UNLOCK();

	return 0;
}

#if defined(__FreeBSD__)
static void
drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
{
	struct drm_sg_mem *entry = arg;
	int i;

	if (error != 0)
	    return;

	for(i = 0 ; i < nsegs ; i++) {
		entry->busaddr[i] = segs[i].ds_addr;
	}
}
#endif

int
drm_sg_alloc_ioctl(struct drm_device *dev, void *data,
		   struct drm_file *file_priv)
{
	struct drm_scatter_gather *request = data;

	DRM_DEBUG("\n");

	return drm_sg_alloc(dev, request);
}

void
drm_sg_cleanup(struct drm_sg_mem *entry)
{
	struct drm_dma_handle *dmah = entry->sg_dmah;

#if defined(__FreeBSD__)
	bus_dmamap_unload(dmah->tag, dmah->map);
	bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map);
	bus_dma_tag_destroy(dmah->tag);
#elif   defined(__NetBSD__)
	bus_dmamap_unload(dmah->tag, dmah->map);
	bus_dmamap_destroy(dmah->tag, dmah->map);
	bus_dmamem_unmap(dmah->tag, dmah->vaddr, dmah->size);
	bus_dmamem_free(dmah->tag, dmah->segs, dmah->nsegs);
	dmah->tag = NULL;
#endif
	free(dmah, DRM_MEM_DMA);
	free(entry->busaddr, DRM_MEM_PAGES);
	free(entry, DRM_MEM_SGLISTS);
}

int
drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
	struct drm_scatter_gather *request = data;
	struct drm_sg_mem *entry;

	DRM_LOCK();
	entry = dev->sg;
	dev->sg = NULL;
	DRM_UNLOCK();

	if (!entry || entry->handle != request->handle)
		return EINVAL;

	DRM_DEBUG("sg free virtual = 0x%lx\n", entry->handle);

	drm_sg_cleanup(entry);

	return 0;
}


text:
package com.stardust.easyassess.pdm.models;

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

public class MenuGroup {
    private String text;
    private String icon;
    private List<MenuItem> items = new ArrayList<MenuItem>();

    public MenuGroup() {

    }

    public MenuGroup(String text, String icon) {
        this.text = text;
        this.icon = icon;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public List<MenuItem> getItems() {
        return items;
    }

    public void setItems(List<MenuItem> items) {
        this.items = items;
    }
}


text:
local function focusOnEnterWindow(self, editor)
  editor:Connect(wx.wxEVT_ENTER_WINDOW, function() editor:SetFocus() end)
end

return {
  name = "Editor auto-focus by mouse",
  description = "Moves focus to an editor tab the mouse is over.",
  author = "Paul Kulchenko",
  version = 0.11,

  onEditorLoad = focusOnEnterWindow,
  onEditorNew = focusOnEnterWindow,
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/API/API.iml" filepath="$PROJECT_DIR$/API/API.iml" />
      <module fileurl="file://$PROJECT_DIR$/Android.iml" filepath="$PROJECT_DIR$/Android.iml" />
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
      <module fileurl="file://$PROJECT_DIR$/appshared/appshared.iml" filepath="$PROJECT_DIR$/appshared/appshared.iml" />
    </modules>
  </component>
</project>


text:
const what3words = require('../../');
const validateAS = require('./validateAS');

/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
const expect = require('chai').expect;

const ERRORS = what3words.errors;

/* eslint no-console: "off" */

/* eslint no-unused-expressions: "off" */

describe('#autosuggest ', () => {
  describe('input params', () => {
    it('expects to throw with no params', () => {
      const fn = () => {
        what3words.autosuggest();
      };
      expect(fn).to.throw;
      expect(fn).to.throw(ERRORS.UNDEFINED_QUERY);
    });
    it('expects to throw with null', () => {
      const fn = () => {
        what3words.autosuggest(null);
      };
      expect(fn).to.throw;
      expect(fn).to.throw(ERRORS.UNDEFINED_QUERY);
    });
  });

  describe('fails', () => {
    it('expects to fail with no addr', (done) => {
      what3words
        .autosuggest({})
        .then(
          (data) => {
            // console.log(data);
            expect(data).to.exist;
            expect(data.code).to.exist;
            expect(data.code).to.equal(400);
            expect(data.message).to.exist;
            expect(data.message).to.equal('/autosuggest: missing required parameter "addr"');
            done();
          },
          (rejected) => {
            console.log(rejected);
            done(rejected);
          })
        .catch((err) => {
          done(err);
        });
    });

    it('expects to fail with no lang', (done) => {
      what3words
        .autosuggest({
          addr: 'abc',
        })
        .then(
          (data) => {
            // console.log(data);
            expect(data).to.exist;
            expect(data.code).to.exist;
            expect(data.code).to.equal(400);
            expect(data.message).to.exist;
            expect(data.message).to.equal('/autosuggest: missing required parameter "lang"');
            done();
          },
          (rejected) => {
            console.log(rejected);
            done(rejected);
          })
        .catch((err) => {
          done(err);
        });
    });

    it('expects to fail with invalid addr', (done) => {
      what3words
        .autosuggest({
          addr: 'abc',
          lang: 'en',
        })
        .then(
          (data) => {
            // console.log(data);
            expect(data).to.exist;
            expect(data.status).to.exist;
            expect(data.status.status).to.exist;
            expect(data.status.status).to.equal(200);
            expect(data.status.code).to.exist;
            expect(data.status.code).to.equal(102);
            expect(data.status.message).to.exist;
            expect(data.status.message).to.equal('The \'addr\' parameter is invalid or missing a partial or complete 3 word address');
            done();
          },
          (rejected) => {
            console.log(rejected);
            done(rejected);
          })
        .catch((err) => {
          done(err);
        });
    });
  });

  describe('success', () => {
    const exact = 'index.home.raft';
    const partial = 'index.home.r';

    it(`partial [${partial}]`, (done) => {
      const params = {
        addr: partial,
        lang: 'en',
      };
      what3words
        .autosuggest(params)
        .then(
          (resolved) => {
            // console.log(resolved);
            validateAS.validatePartialJSONPayload(resolved);
            done();
          },
          (rejected) => {
            console.log('rejected', rejected);
            done(rejected);
          })
        .catch((err) => {
          console.log('catch', err);
          done(err);
        });
    });

    it(`exact [${exact}]`, (done) => {
      const params = {
        addr: exact,
        lang: 'en',
      };
      what3words
        .autosuggest(params)
        .then(
          (resolved) => {
            // console.log(resolved);
            validateAS.validateExactMatchJSONPayload(resolved);
            done();
          },
          (rejected) => {
            console.log('rejected', rejected);
            done(rejected);
          })
        .catch((err) => {
          console.log('catch', err);
          done(err);
        });
    });
  });
});


text:
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Security.Principal;

namespace Microsoft.Win32
{
	/// <summary>
	/// Impersonation of a user. Allows to execute code under another
	/// user context.
	/// Please note that the account that instantiates the Impersonator class
	/// needs to have the 'Act as part of operating system' privilege set.
	/// </summary>
	internal class WindowsImpersonatedIdentity : IDisposable, IIdentity
	{
		private const int LOGON_TYPE_NEW_CREDENTIALS = 9;
		private const int LOGON32_LOGON_INTERACTIVE = 2;
		private const int LOGON32_PROVIDER_DEFAULT = 0;
		private const int LOGON32_PROVIDER_WINNT50 = 3;

#if NETSTANDARD || NETCOREAPP
#else
		private WindowsImpersonationContext impersonationContext = null;
#endif
		NativeMethods.SafeTokenHandle token;
		private WindowsIdentity identity = null;

		/// <summary>
		/// Constructor. Starts the impersonation with the given credentials.
		/// Please note that the account that instantiates the Impersonator class
		/// needs to have the 'Act as part of operating system' privilege set.
		/// </summary>
		/// <param name="userName">The name of the user to act as.</param>
		/// <param name="domainName">The domain name of the user to act as.</param>
		/// <param name="password">The password of the user to act as.</param>
		public WindowsImpersonatedIdentity(string userName, string domainName, string password)
		{
			if (string.IsNullOrEmpty(userName) && string.IsNullOrEmpty(domainName) && string.IsNullOrEmpty(password))
			{
				identity = WindowsIdentity.GetCurrent();
			}
			else
			{
				if (NativeMethods.LogonUser(userName, domainName, password, domainName == null ? LOGON_TYPE_NEW_CREDENTIALS : LOGON32_LOGON_INTERACTIVE, domainName == null ? LOGON32_PROVIDER_WINNT50 : LOGON32_PROVIDER_DEFAULT, out token) != 0)
				{
#if NETSTANDARD || NETCOREAPP
					if (!NativeMethods.ImpersonateLoggedOnUser(token.DangerousGetHandle()))
						throw new Win32Exception();
#else
					identity = new WindowsIdentity(token.DangerousGetHandle());
					impersonationContext = identity.Impersonate();
#endif
				}
				else
				{
					throw new Win32Exception(Marshal.GetLastWin32Error());
				}
			}
		}

		public string AuthenticationType => identity?.AuthenticationType;

		public bool IsAuthenticated => identity == null ? false : identity.IsAuthenticated;

		public string Name => identity == null ? null : identity.Name;

		public void Dispose()
		{
#if NETSTANDARD || NETCOREAPP
			NativeMethods.RevertToSelf();
#else
			if (impersonationContext != null)
				impersonationContext.Undo();
#endif
			token?.Dispose();
			if (identity != null)
				identity.Dispose();
		}
	}
}


text:
using System.Threading.Tasks;
using Repairis.Devices.Dto;

namespace Repairis.Devices
{
    public class DeviceAppService : RepairisAppServiceBase, IDeviceAppService
    {
        private readonly IDeviceDomainService _deviceDomainService;

        public DeviceAppService(IDeviceDomainService deviceDomainService)
        {
            _deviceDomainService = deviceDomainService;
        }

        public async Task<Device> GetOrCreateDeviceAsync(DeviceInput input)
        {
            return await _deviceDomainService.GetOrCreateAsync(input.DeviceCategoryName,
                input.BrandName, input.DeviceModelName, input.SerialNumber);
        }
    }
}