text:
// tslint:disable:no-implicit-dependencies
import { logging, tags } from '@angular-devkit/core';
import { existsSync } from 'fs';
import { join } from 'path';
import { packages } from '../lib/packages';

export default function (_options: {}, logger: logging.Logger) {
  let error = false;

  for (const pkgName of Object.keys(packages)) {
    const pkg = packages[pkgName];

    if (pkg.packageJson.private) {
      // Ignore private packages.
      continue;
    }

    // There should be at least one BUILD file next to each package.json.
    if (!existsSync(join(pkg.root, 'BUILD'))) {
      logger.error(tags.oneLine`
        The package ${JSON.stringify(pkgName)} does not have a BUILD file associated to it. You
        must either set an exception or make sure it can be built using Bazel.
      `);
      error = true;
    }
  }

  // TODO: enable this to break
  if (error) {
    // process.exit(1);
    logger.warn('Found some BUILD files missing, which will be breaking your PR soon.');
  }
}


text:
<?php

/**
 * @file
 * Contains Drupal\baseinfo\Service\BaseinfoCalcService.php.
 */
namespace Drupal\baseinfo\Service;

use Drupal\flexinfo\Service\FlexinfoCalcService;

/**
 * An example Service container.
 */
class BaseinfoCalcService extends FlexinfoCalcService {

}

redpajama_set_name: RedPajamaGithub


text:
ICON_INFO = ICON_INFO or {}
ICON_INFO.camPos = ICON_INFO.camPos or Vector()
ICON_INFO.camAng = ICON_INFO.camAng or Angle()
ICON_INFO.FOV = ICON_INFO.FOV or 50
ICON_INFO.w = ICON_INFO.w or 1
ICON_INFO.h = ICON_INFO.h or 1
ICON_INFO.modelAng = ICON_INFO.modelAng or Angle()
ICON_INFO.modelName = ICON_INFO.modelName or "models/Items/grenadeAmmo.mdl"
ICON_INFO.outline = ICON_INFO.outline or false
ICON_INFO.outlineColor = ICON_INFO.outlineColor or Color(255, 255, 255)

local vTxt = "xyz"
local aTxt = "pyr"
local bTxt = {
	"best",
	"full",
	"above",
	"right",
	"origin",
}
local PANEL = {}
local iconSize = 64

/*
	3D ICON PREVIEW WINDOW
*/
function PANEL:Init()
	self:SetPos(50, 50)
	self:ShowCloseButton(false)
	self:SetTitle("RENDER PREVIEW")

	self.model = self:Add("DModelPanel")
	self.model:SetPos(5, 22)
	function self.model:PaintOver(w, h)
		surface.SetDrawColor(255, 255, 255)
		surface.DrawOutlinedRect(0, 0, w, h)
	end
	function self.model:LayoutEntity()
	end

	self:AdjustSize(ICON_INFO.w, ICON_INFO.h)
end

function PANEL:Paint(w, h)
	surface.SetDrawColor(255, 255, 255)
	surface.DrawOutlinedRect(0, 0, w, h)
end

function PANEL:AdjustSize(x, y)
	self:SetSize(10 + (x or 1)*64, 27 + (y or 1)*64)
	self.model:SetSize((x or 1)*64, (y or 1)*64)
end
vgui.Register("iconPreview", PANEL, "DFrame")

/*
	RENDER ICON PREVIEW
*/
PANEL = {}
AccessorFunc( PANEL, "m_strModel", 		"Model" )
AccessorFunc( PANEL, "m_pOrigin", 		"Origin" )
AccessorFunc( PANEL, "m_bCustomIcon", 	"CustomIcon" )
function PANEL:Init()
	self:SetPos(50, 300)
	self:ShowCloseButton(false)
	self:SetTitle("PREVIEW")

	self.model = self:Add("SpawnIcon")
	self.model:InvalidateLayout(true)
	self.model:SetPos(5, 22)
	function self.model:PaintOver(w, h)
		surface.SetDrawColor(255, 255, 255)
		surface.DrawOutlinedRect(0, 0, w, h)
	end

	self.model.Icon:SetVisible(false)
	self.model.Paint = function(self, x, y)
		local exIcon = ikon:getIcon("iconEditor")
		if (exIcon) then
			surface.SetMaterial(exIcon)
			surface.SetDrawColor(color_white)
			surface.DrawTexturedRect(0, 0, x, y)
		end
	end

	self:AdjustSize(ICON_INFO.w, ICON_INFO.h)
end

function PANEL:Paint(w, h)
	surface.SetDrawColor(255, 255, 255)
	surface.DrawOutlinedRect(0, 0, w, h)
end

function PANEL:AdjustSize(x, y)
	self:SetSize(10 + (x or 1)*64, 27 + (y or 1)*64)
	self.model:SetSize((x or 1)*64, (y or 1)*64)
end
vgui.Register("iconRenderPreview", PANEL, "DFrame")

/*
	EDITOR FUNCTION
*/
local function action(self)
		local p1 = self.prev
		local p = self.prev2
		local icon = p.model
		local iconModel = p1.model

		local ent = iconModel:GetEntity()
		local tab = {}
		tab.ent		= ent
		tab.cam_pos = iconModel:GetCamPos()
		tab.cam_ang = iconModel:GetLookAng()
		tab.cam_fov = iconModel:GetFOV()

		local text =
		"ITEM.model = \""..ICON_INFO.modelName:gsub("\\", "/"):lower().."\"" .. "\n"..
		"ITEM.width = "..ICON_INFO.w .."\n"..
		"ITEM.height = "..ICON_INFO.h .."\n"..
		"ITEM.iconCam = {" .."\n"..
		"\tpos = Vector("..tab.cam_pos.x..", "..tab.cam_pos.y..", "..tab.cam_pos.z..")" .."\n"..
		"\tang = Angle("..tab.cam_ang.p..", "..tab.cam_ang.y..", "..tab.cam_ang.r..")" .."\n"..
		"\tfov = "..tab.cam_fov .. "," .."\n"
		if (ICON_INFO.outline) then
			text = text .. "\toutline = true," .. "\n" ..
			"\toutlineColor = Color("..
			ICON_INFO.outlineColor.r .. ", " ..
			ICON_INFO.outlineColor.g .. ", " ..
			ICON_INFO.outlineColor.b .. ")" .. "\n"
		end
		text = text .. "}"

		SetClipboardText(text)
end

local function renderAction(self)
	local p1 = self.prev
	local p = self.prev2
	local icon = p.model
	local iconModel = p1.model

	if (icon and iconModel) then
		local ent = iconModel:GetEntity()
		local tab = {}
		tab.ent		= ent
		tab.cam_pos = iconModel:GetCamPos()
		tab.cam_ang = iconModel:GetLookAng()
		tab.cam_fov = iconModel:GetFOV()

		icon:SetModel(ent:GetModel())

		ikon:renderIcon(
			"iconEditor",
			ICON_INFO.w,
			ICON_INFO.h,
			ICON_INFO.modelName,
			{
				pos = ICON_INFO.camPos,
				ang = ICON_INFO.camAng,
				fov = ICON_INFO.FOV,
				outline = ICON_INFO.outline,
				outlineColor = ICON_INFO.outlineColor
			},
			true
		)

		local text =
		"ITEM.model = \""..ICON_INFO.modelName:gsub("\\", "/"):lower().."\"" .. "\n"..
		"ITEM.width = "..ICON_INFO.w .."\n"..
		"ITEM.height = "..ICON_INFO.h .."\n"..
		"ITEM.iconCam = {" .."\n"..
		"\tpos = Vector("..tab.cam_pos.x..", "..tab.cam_pos.y..", "..tab.cam_pos.z..",)" .."\n"..
		"\tang = Angle("..tab.cam_ang.p..", "..tab.cam_ang.y..", "..tab.cam_ang.r..",)" .."\n"..
		"\tfov = "..tab.cam_fov .. "," .."\n"
		if (ICON_INFO.outline) then
			text = text .. "\toutline = true," .. "\n" ..
			"\toutlineColor = Color("..
			ICON_INFO.outlineColor.r .. ", " ..
			ICON_INFO.outlineColor.g .. ", " ..
			ICON_INFO.outlineColor.b .. ")" .. "\n"
		end
		text = text .. "}"

		print(text)
	end
end

PANEL = {}
function PANEL:Init()
	if (editorPanel and editorPanel:IsVisible()) then
		editorPanel:Close()
	end
	editorPanel = self

	self:SetTitle("MODEL ADJUST")
	self:MakePopup()
	self:SetSize(400, ScrH()*.8)
	self:Center()

	self.prev = vgui.Create("iconPreview")
	self.prev2 = vgui.Create("iconRenderPreview")
	self.list = self:Add("DScrollPanel")
	self.list:Dock(FILL)

	self:AddText("Actions")

	self.render = self.list:Add("DButton")
	self.render:Dock(TOP)
	self.render:SetFont("ChatFont")
	self.render:SetText("RENDER")
	self.render:SetTall(30)
	self.render:DockMargin(5, 5, 5, 0)
	self.render.DoClick = function()
		renderAction(self)
	end

	self.copy = self.list:Add("DButton")
	self.copy:Dock(TOP)
	self.copy:SetFont("ChatFont")
	self.copy:SetText("COPY")
	self.copy:SetTall(30)
	self.copy:DockMargin(5, 5, 5, 0)
	self.copy.DoClick = function()
		action(self)
	end

	self:AddText("Presets")
	for i = 1, 5 do
		local btn = self.list:Add("DButton")
		btn:Dock(TOP)
		btn:SetFont("ChatFont")
		btn:SetText(bTxt[i])
		btn:SetTall(30)
		btn:DockMargin(5, 5, 5, 0)
		btn.DoClick = function()
			self:SetupEditor(true, i)
			self:UpdateShits()
		end
	end

	self:AddText("Model Name")

	self.mdl = self.list:Add("DTextEntry")
	self.mdl:Dock(TOP)
	self.mdl:SetFont("Default")
	self.mdl:SetText("Copy that :)")
	self.mdl:SetTall(25)
	self.mdl:DockMargin(5, 5, 5, 0)
	self.mdl.OnEnter = function()
		ICON_INFO.modelName = self.mdl:GetValue()
		self:SetupEditor(true)
		self:UpdateShits()
	end

	self:AddText("Icon Size")

	local cfg = self.list:Add("DNumSlider")
	cfg:Dock(TOP)
	cfg:SetText("W")
	cfg:SetMin(0)
	cfg:SetMax(10)
	cfg:SetDecimals(0)
	cfg:SetValue(ICON_INFO.w)
	cfg:DockMargin(10, 0, 0, 5)
	cfg.OnValueChanged = function(cfg, value)
		ICON_INFO.w = value
		self.prev:AdjustSize(ICON_INFO.w, ICON_INFO.h)
		self.prev2:AdjustSize(ICON_INFO.w, ICON_INFO.h)
	end

	local cfg = self.list:Add("DNumSlider")
	cfg:Dock(TOP)
	cfg:SetText("H")
	cfg:SetMin(0)
	cfg:SetMax(10)
	cfg:SetDecimals(0)
	cfg:SetValue(ICON_INFO.h)
	cfg:DockMargin(10, 0, 0, 5)
	cfg.OnValueChanged = function(cfg, value)
		print(self)
		ICON_INFO.h = value
		self.prev:AdjustSize(ICON_INFO.w, ICON_INFO.h)
		self.prev2:AdjustSize(ICON_INFO.w, ICON_INFO.h)
	end

	self:AddText("Camera FOV")

	self.camFOV = self.list:Add("DNumSlider")
	self.camFOV:Dock(TOP)
	self.camFOV:SetText("CAMFOV")
	self.camFOV:SetMin(0)
	self.camFOV:SetMax(180)
	self.camFOV:SetDecimals(3)
	self.camFOV:SetValue(ICON_INFO.FOV)
	self.camFOV:DockMargin(10, 0, 0, 5)
	self.camFOV.OnValueChanged = function(cfg, value)
		if (!fagLord) then
			ICON_INFO.FOV = value

			local p = self.prev
			if (p and p:IsVisible()) then
				p.model:SetFOV(ICON_INFO.FOV)
			end
		end
	end

	self:AddText("Camera Position")

	self.camPos = {}
	for i = 1, 3 do
		self.camPos[i] = self.list:Add("DNumSlider")
		self.camPos[i]:Dock(TOP)
		self.camPos[i]:SetText("CAMPOS_" .. vTxt[i])
		self.camPos[i]:SetMin(-500)
		self.camPos[i]:SetMax(500)
		self.camPos[i]:SetDecimals(3)
		self.camPos[i]:SetValue(ICON_INFO.camPos[i])
		self.camPos[i]:DockMargin(10, 0, 0, 5)
		self.camPos[i].OnValueChanged = function(cfg, value)
			if (!fagLord) then
				ICON_INFO.camPos[i] = value
			end
		end
	end

	self:AddText("Camera Angle")

	self.camAng = {}
	for i = 1, 3 do
		self.camAng[i] = self.list:Add("DNumSlider")
		self.camAng[i]:Dock(TOP)
		self.camAng[i]:SetText("CAMANG_" .. aTxt[i])
		self.camAng[i]:SetMin(-180)
		self.camAng[i]:SetMax(180)
		self.camAng[i]:SetDecimals(3)
		self.camAng[i]:SetValue(ICON_INFO.camAng[i])
		self.camAng[i]:DockMargin(10, 0, 0, 5)
		self.camAng[i].OnValueChanged = function(cfg, value)
			if (!fagLord) then
				ICON_INFO.camAng[i] = value
			end
		end
	end

	local aaoa = self.list:Add("DPanel")
	aaoa:Dock(TOP)
	aaoa:DockMargin(10, 0, 0, 5)
	aaoa:SetHeight(250)

	self.color = aaoa:Add("DCheckBoxLabel")
	self.color:SetText("Draw Outline?")
	self.color:SetValue(ICON_INFO.outline)
	self.color:DockMargin(10, 5, 0, 5)
	self.color:Dock(TOP)
	function self.color:OnChange(bool)
		ICON_INFO.outline = bool
	end

	self.colormixer = aaoa:Add( "DColorMixer" )
	self.colormixer:Dock( FILL )			--Make self.colormixer fill place of Frame
	self.colormixer:SetPalette( true ) 		--Show/hide the palette			DEF:true
	self.colormixer:SetAlphaBar( false ) 		--Show/hide the alpha bar		DEF:true
	self.colormixer:SetWangs( true )			--Show/hide the R G B A indicators 	DEF:true
	self.colormixer:SetColor( ICON_INFO.outlineColor  )	--Set the default color
	self.colormixer:DockMargin(10, 5, 0, 5)
	function self.colormixer:ValueChanged(value)
		 ICON_INFO.outlineColor = value
	end

	self:SetupEditor()
	self:UpdateShits(true)
end

function PANEL:UpdateShits()
	fagLord = true
		self.camFOV:SetValue(ICON_INFO.FOV)
		for i = 1, 3 do
			self.camPos[i]:SetValue(ICON_INFO.camPos[i])
			self.camAng[i]:SetValue(ICON_INFO.camAng[i])
		end
	fagLord = false
end

function PANEL:SetupEditor(update, mode)
	local p = self.prev
	local p2 = self.prev2

	if (p and p:IsVisible() and p2 and p2:IsVisible()) then
		p.model:SetModel(ICON_INFO.modelName)
		p2.model:SetModel(ICON_INFO.modelName)
		if (!update) then
			self.mdl:SetText(ICON_INFO.modelName)
		end

		if (mode) then
			if (mode == 1) then
				self:BestGuessLayout()
			elseif (mode == 2) then
				self:FullFrontalLayout()
			elseif (mode == 3) then
				self:AboveLayout()
			elseif (mode == 4) then
				self:RightLayout()
			elseif (mode == 5) then
				self:OriginLayout()
			end
		else
			self:BestGuessLayout()
		end

		p.model:SetCamPos(ICON_INFO.camPos)
		p.model:SetFOV(ICON_INFO.FOV)
		p.model:SetLookAng(ICON_INFO.camAng)
	end
end

function PANEL:BestGuessLayout()
	local p = self.prev
	local ent = p.model:GetEntity()
	local pos = ent:GetPos()
	local tab = PositionSpawnIcon(ent, pos)

	if ( tab ) then
		ICON_INFO.camPos = tab.origin
		ICON_INFO.FOV = tab.fov
		ICON_INFO.camAng = tab.angles
	end
end

function PANEL:FullFrontalLayout()
	local p = self.prev
	local ent = p.model:GetEntity()
	local pos = ent:GetPos()
	local campos = pos + Vector( -200, 0, 0 )

	ICON_INFO.camPos = campos
	ICON_INFO.FOV = 45
	ICON_INFO.camAng = (campos * -1):Angle()
end

function PANEL:AboveLayout()
	local p = self.prev
	local ent = p.model:GetEntity()
	local pos = ent:GetPos()
	local campos = pos + Vector( 0, 0, 200 )

	ICON_INFO.camPos = campos
	ICON_INFO.FOV = 45
	ICON_INFO.camAng = (campos * -1):Angle()
end

function PANEL:RightLayout()
	local p = self.prev
	local ent = p.model:GetEntity()
	local pos = ent:GetPos()
	local campos = pos + Vector( 0, 200, 0 )

	ICON_INFO.camPos = campos
	ICON_INFO.FOV = 45
	ICON_INFO.camAng = (campos * -1):Angle()
end

function PANEL:OriginLayout()
	local p = self.prev
	local ent = p.model:GetEntity()
	local pos = ent:GetPos()
	local campos = pos + Vector( 0, 0, 0 )

	ICON_INFO.camPos = campos
	ICON_INFO.FOV = 45
	ICON_INFO.camAng = Angle( 0, -180, 0 )
end

function PANEL:AddText(str)
	local label = self.list:Add("DLabel")
	label:SetFont("ChatFont")
	label:SetTextColor(color_white)
	label:Dock(TOP)
	label:DockMargin(5, 5, 5, 0)
	label:SetContentAlignment(5)
	label:SetText(str)
end

function PANEL:OnRemove()
	if (self.prev and self.prev:IsVisible()) then
		self.prev:Close()
	end

	if (self.prev2 and self.prev2:IsVisible()) then
		self.prev2:Close()
	end
end
vgui.Register("iconEditor", PANEL, "DFrame")

concommand.Add("nut_dev_icon", function()
	if (LocalPlayer():IsAdmin()) then
		vgui.Create("iconEditor")
	end
end)


text:
                            {{expression.title}}
                            {{expression.calculation}}


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

namespace Voertuig
{
    public class Auto
    {
        public Auto()
        {
            Verplaatsing = new Stilstand();
            Bestuurder = "John Do";
        }

        public void Vooruit()
        {
            Verplaatsing.Vooruit(this);
        }

        public Verplaatsing Verplaatsing { get; set; }

        public void Achteruit()
        {
            Verplaatsing.Achteruit(this);
        }

        public void Stop()
        {
            Verplaatsing.Stop(this);
        }

        public string Bestuurder { get; set; }
    }
}


text:
<?php

declare(strict_types=1);

namespace Ergebnis\GitHub\Changelog\Resource;

interface CommitInterface
{
    public function sha(): string;

    public function message(): string;

    public function equals(self $commit): bool;
}


text:
Type.registerNamespace("Strings");
Strings.OfficeOM = function()
{
};
Strings.OfficeOM.registerClass("Strings.OfficeOM");
Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Указаний тип зв'язування несумісний із наданим іменованим елементом.";
Strings.OfficeOM.L_EventHandlerNotExist = "Вказаний обробник подій не знайдено у цьому зв\\'язуванні.";
Strings.OfficeOM.L_UnknownBindingType = "Тип зв'язування не підтримується.";
Strings.OfficeOM.L_InvalidNode = "Неприпустимий вузол";
Strings.OfficeOM.L_NotImplemented = "Функцію {0} не виконано.";
Strings.OfficeOM.L_NoCapability = "У вас недостатньо дозволів для виконання цієї дії.";
Strings.OfficeOM.L_SettingsCannotSave = "Не вдалося зберегти настройки.";
Strings.OfficeOM.L_DataWriteReminder = "Нагадування про записування даних";
Strings.OfficeOM.L_InvalidBinding = "Неприпустиме зв'язування";
Strings.OfficeOM.L_InvalidSetColumns = "Указані стовпці неприпустимі.";
Strings.OfficeOM.L_BindingCreationError = "Помилка створення зв'язування";
Strings.OfficeOM.L_FormatValueOutOfRange = "Значення перебуває за межами припустимого діапазону.";
Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Поточне виділення несумісне з указаним типом приведення.";
Strings.OfficeOM.L_InvalidBindingError = "Помилка неприпустимого зв'язування";
Strings.OfficeOM.L_InvalidGetStartRowColumn = "Указані значення startRow або startColumn неприпустимі.";
Strings.OfficeOM.L_InvalidSetRows = "Указані рядки неприпустимі.";
Strings.OfficeOM.L_CannotWriteToSelection = "Не вдалося записати до поточного виділення.";
Strings.OfficeOM.L_MissingParameter = "Відсутній параметр";
Strings.OfficeOM.L_IndexOutOfRange = "Індекс перебуває за межами діапазону.";
Strings.OfficeOM.L_SettingsStaleError = "Помилка застарілих настройок";
Strings.OfficeOM.L_CannotNavigateTo = "Об'єкт розташовано там, де не підтримується навігація.";
Strings.OfficeOM.L_ReadSettingsError = "Помилка читання настройок";
Strings.OfficeOM.L_InvalidGetColumns = "Указані стовпці неприпустимі.";
Strings.OfficeOM.L_CoercionTypeNotSupported = "Указаний тип приведення не підтримується.";
Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Застосунок {0} не існує. Не вдалося викликати службу Microsoft.Office.WebExtension.initialize(reason).";
Strings.OfficeOM.L_OverwriteWorksheetData = "Не вдалося виконати операцію встановлення, тому що наданий об'єкт даних перезапише або зсуне дані.";
Strings.OfficeOM.L_RowIndexOutOfRange = "Значення індексу рядка перебуває за межами припустимого діапазону. Укажіть значення (0 або більше), менше кількості рядків.";
Strings.OfficeOM.L_InvalidReadForBlankRow = "Указаний рядок порожній.";
Strings.OfficeOM.L_ColIndexOutOfRange = "Значення індексу стовпця перебуває за межами припустимого діапазону. Укажіть значення (0 або більше), менше кількості стовпців.";
Strings.OfficeOM.L_UnsupportedEnumeration = "Непідтримуване перелічення";
Strings.OfficeOM.L_InvalidParameters = "Функція {0} має неприпустимі параметри.";
Strings.OfficeOM.L_SetDataParametersConflict = "Указані параметри конфліктують.";
Strings.OfficeOM.L_DataNotMatchCoercionType = "Тип указаного об'єкта даних несумісний із поточним виділенням.";
Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Перелічення не підтримується в поточному хост-застосунку.";
Strings.OfficeOM.L_InvalidCoercion = "Неприпустимий тип приведення";
Strings.OfficeOM.L_NotSupportedEventType = "Указаний тип події {0} не підтримується.";
Strings.OfficeOM.L_UnsupportedDataObject = "Наданий тип об'єкта даних не підтримується.";
Strings.OfficeOM.L_GetDataIsTooLarge = "Запитаний набір даних завеликий.";
Strings.OfficeOM.L_AppNameNotExist = "Застосунок для {0} не існує.";
Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Зробіть вибір.";
Strings.OfficeOM.L_MultipleNamedItemFound = "Знайдено кілька об'єктів з однаковим іменем.";
Strings.OfficeOM.L_InvalidCellsValue = "Принаймні один параметр клітинок має неприпустиме значення. Перевірте значення і спробуйте ще раз.";
Strings.OfficeOM.L_DataNotMatchBindingType = "Указаний об'єкт даних несумісний із типом зв'язування.";
Strings.OfficeOM.L_InvalidFormatValue = "Принаймні один параметр формату має неприпустиме значення. Перевірте значення і спробуйте ще раз.";
Strings.OfficeOM.L_NotSupportedBindingType = "Указаний тип зв'язування {0} не підтримується.";
Strings.OfficeOM.L_InitializeNotReady = "Office.js ще не повністю завантажено. Повторіть спробу пізніше або переконайтеся, що ви додали код ініціалізації до функції Office.initialize.";
Strings.OfficeOM.L_FormattingReminder = "Нагадування про форматування";
Strings.OfficeOM.L_ShuttingDown = "Не вдалося виконати операцію, тому що дані на сервері застаріли.";
Strings.OfficeOM.L_OperationNotSupported = "Операція не підтримується.";
Strings.OfficeOM.L_DocumentReadOnly = "Операція, на яку створено запит, заборонена для поточного режиму документа.";
Strings.OfficeOM.L_NamedItemNotFound = "Іменований елемент не існує.";
Strings.OfficeOM.L_InvalidApiCallInContext = "Неприпустимий виклик API для поточного контексту.";
Strings.OfficeOM.L_InvalidGetRows = "Указані рядки неприпустимі.";
Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Примітка: рекомендована кількість наборів форматування, створених за допомогою виклику API форматування, – не більше 100.";
Strings.OfficeOM.L_SetDataIsTooLarge = "Указаний об'єкт даних завеликий.";
Strings.OfficeOM.L_DataWriteError = "Помилка записування даних";
Strings.OfficeOM.L_InvalidBindingOperation = "Неприпустима операція зв'язування";
Strings.OfficeOM.L_SpecifiedIdNotExist = "Указаний ідентифікатор не існує.";
Strings.OfficeOM.L_FunctionCallFailed = "Не вдалося викликати функцію {0}. Код помилки: {1}.";
Strings.OfficeOM.L_DataNotMatchBindingSize = "Наданий об'єкт даних не відповідає розміру поточного виділення.";
Strings.OfficeOM.L_SaveSettingsError = "Помилка збереження настройок";
Strings.OfficeOM.L_InvalidSetStartRowColumn = "Указані значення startRow або startColumn неприпустимі.";
Strings.OfficeOM.L_InvalidFormat = "Помилка неприпустимого формату";
Strings.OfficeOM.L_BindingNotExist = "Указане зв'язування не існує.";
Strings.OfficeOM.L_SettingNameNotExist = "Указана назва параметра не існує.";
Strings.OfficeOM.L_EventHandlerAdditionFailed = "Не вдалося додати обробник подій.";
Strings.OfficeOM.L_InvalidAPICall = "Неприпустимий виклик API";
Strings.OfficeOM.L_EventRegistrationError = "Помилка реєстрації події";
Strings.OfficeOM.L_ElementMissing = "Не вдалося відформатувати клітинку таблиці, оскільки відсутні деякі значення параметрів. Перевірте параметри та спробуйте ще раз.";
Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Параметри координати не підлягають використанню з таблицею типу приведення, коли вона містить злиті клітинки.";
Strings.OfficeOM.L_NavOutOfBound = "Не вдалося виконати операцію, оскільки індекс поза межами діапазону.";
Strings.OfficeOM.L_RedundantCallbackSpecification = "Зворотній виклик не можна вказати одночасно у списку аргументів і як додатковий об'єкт.";
Strings.OfficeOM.L_CustomXmlError = "Помилка настроюваного XML.";
Strings.OfficeOM.L_SettingsAreStale = "Не вдалося зберегти настройки, тому що вони застаріли.";
Strings.OfficeOM.L_TooManyOptionalFunction = "у списку параметрів кілька необов'язкових функцій";
Strings.OfficeOM.L_MissingRequiredArguments = "відсутні кілька обов'язкових аргументів";
Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Параметри координати не підлягають використанню з таблицею типу приведення, коли вона містить злиті клітинки.";
Strings.OfficeOM.L_HostError = "Помилка хоста";
Strings.OfficeOM.L_OutOfRange = "За межами діапазону";
Strings.OfficeOM.L_InvalidSelectionForBindingType = "Неможливо створити зв'язування з поточним виділенням і вказаним типом.";
Strings.OfficeOM.L_TooManyOptionalObjects = "у списку параметрів кілька необов'язкових об'єктів";
Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Вибраний вміст має бути у форматі таблиці. Відформатуйте дані як таблицю та повторіть спробу.";
Strings.OfficeOM.L_EventHandlerRemovalFailed = "Не вдалося видалити обробник подій.";
Strings.OfficeOM.L_BindingToMultipleSelection = "Переривчасті виділення не підтримуються.";
Strings.OfficeOM.L_DataReadError = "Помилка читання даних";
Strings.OfficeOM.L_InternalErrorDescription = "Сталася внутрішня помилка.";
Strings.OfficeOM.L_InvalidDataFormat = "Неприпустимий формат указаного об'єкта даних.";
Strings.OfficeOM.L_DataStale = "Дані застаріли";
Strings.OfficeOM.L_GetSelectionNotSupported = "Поточне виділення не підтримується.";
Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Примітка: рекомендована кількість клітинок у таблиці – менше 20 000.";
Strings.OfficeOM.L_InvalidTableOptionValue = "Принаймні один параметр tableOptions має неприпустиме значення. Перевірте значення і спробуйте ще раз.";
Strings.OfficeOM.L_PermissionDenied = "Відмовлено в дозволі";
Strings.OfficeOM.L_InvalidDataObject = "Неприпустимий об'єкт даних";
Strings.OfficeOM.L_UserNotSignedIn = "No user is signed into Office.";
Strings.OfficeOM.L_SelectionCannotBound = "Не вдалося зв'язати з поточним виділенням.";
Strings.OfficeOM.L_InvalidColumnsForBinding = "Указані стовпці неприпустимі.";
Strings.OfficeOM.L_BadSelectorString = "Переданий у селектор рядок має неприпустимий формат або не підтримується.";
Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Указані значення rowCount або columnCount неприпустимі.";
Strings.OfficeOM.L_OsfControlTypeNotSupported = "Тип OsfControl не підтримується.";
Strings.OfficeOM.L_InvalidValue = "Неприпустиме значення";
Strings.OfficeOM.L_DataNotMatchSelection = "Наданий об'єкт даних несумісний із фігурою або розмірами поточного виділення.";
Strings.OfficeOM.L_InternalError = "Внутрішня помилка";
Strings.OfficeOM.L_NotSupported = "Функція {0} не підтримується.";
Strings.OfficeOM.L_CustomXmlNodeNotFound = "Не вдалося знайти вказаний вузол.";
Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Указаний тип приведення несумісний з указаним типом зв'язування.";
Strings.OfficeOM.L_TooManyArguments = "забагато аргументів";
Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Операція не підтримується цим типом зв'язування.";
Strings.OfficeOM.L_InValidOptionalArgument = "неприпустимий необов'язковий аргумент";
Strings.OfficeOM.L_FileTypeNotSupported = "Указаний тип файлу не підтримується.";
Strings.OfficeOM.L_GetDataParametersConflict = "Указані параметри конфліктують.";
Strings.OfficeOM.L_CallbackNotAFunction = "Зворотній виклик має бути функцією, а не {0}."


text:
import numpy as np
import tensorflow as tf
import time
import dataset
import utilities

# Tensorflow convinience functions
def weight_variable(shape, name):
   initial = tf.truncated_normal(shape, stddev=0.1)
   return tf.Variable(initial, name=name)

def bias_variable(shape, name):
   initial = tf.constant(0.1, shape=shape)
   return tf.Variable(initial, name=name)

def conv2d(x, W):
   return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')

def max_pool_3x3(x, name):
   return tf.nn.max_pool(x, ksize=[1, 3, 3, 1], strides=[1, 2, 2, 1], padding='VALID', name=name)

def max_pool_2x2(x, name):
   return tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name=name)

def doDumbNet(trainDir, valDir, trainCsv, valCsv):
   f1 = open('log_%d' % (time.time()), 'w+')
   f1.write('AAAAA\n')
   f1.write("Start %s\n" % time.time())
   f1.flush()

   #    # Force CPU only mode
   with tf.device('/cpu:0'):
      # Creates a session with log_device_placement set to True.
      # sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
      sess = tf.Session()

      # Constants
      nClasses = 38
      imageSize = 256
      batchSize = 10
      learningRate = 1e-4
      dropOutValue = 0.5
      f1.write('nClasses: %d, imageSize: %d, batchSize: %d, learningRate: %e, dropOut: %f\n'
                    % (nClasses, imageSize, batchSize, learningRate, dropOutValue))
      f1.flush()
      # The size of the images is 200x150
      x = tf.placeholder("float", shape=[None, imageSize, imageSize, 1], name="Input")
      # There are 4 classes (labels)
      y_ = tf.placeholder("float", shape=[None, nClasses], name="Output")

      # CONVOLUTIONAL NEURAL NET
      # The first two dimensions are the patch size, the next is the number of input channels,
      # and the last is the number of output channels.
      # We will also have a bias vector with a component for each output channel.
      d1 = 32
      d2 = 32
      d3 = 64
      d4 = 64
      d5 = 64
      fc = 300

      W_conv1 = weight_variable([5, 5, 1, d1], name="Weights_conv1")
      b_conv1 = bias_variable([d1], name="b_conv1")

      # We then convolve x_image with the weight tensor,
      # add the bias, apply the ReLU function, and finally max pool.
      h_conv1 = tf.nn.sigmoid(conv2d(x, W_conv1) + b_conv1)
      h_pool1 = max_pool_2x2(h_conv1, name="pool1")

      # SECOND CONV LAYER
      # In order to build a deep network, we stack several layers of this type.
      # The second layer will have 64 features for each 5x5 patch.
      W_conv2 = weight_variable([5, 5, d1, d2], name="Weights_conv2")
      b_conv2 = bias_variable([d2], name="biases_conv2")

      h_conv2 = tf.nn.sigmoid(conv2d(h_pool1, W_conv2) + b_conv2)
      h_pool2 = max_pool_2x2(h_conv2, name="pool2")

      # THIRD CONV LAYER
      W_conv3 = weight_variable([5, 5, d2, d3], name="Weights_conv3")
      b_conv3 = bias_variable([d3], name="biases_conv3")

      h_conv3 = tf.nn.sigmoid(conv2d(h_pool2, W_conv3) + b_conv3)
      h_pool3 = max_pool_2x2(h_conv3, name="pool3")

      # h_pool3_slice = tf.slice(h_pool3, [0, 0, 0, 0], [10, 28, 28, 1])
      # h_pool3_img = tf.reshape(h_pool3_slice, [10, 28, 28, 1])
      # tf.image_summary('filtered', h_pool3_img, max_images=10)

      # FORTH CONV LAYER
      W_conv4 = weight_variable([3, 3, d3, d4], name="Weights_conv4")
      b_conv4 = bias_variable([d4], name="biases_conv4")

      h_conv4 = tf.nn.sigmoid(conv2d(h_pool3, W_conv4) + b_conv4)
      h_pool4 = max_pool_2x2(h_conv4, name="pool4")
      # FIFTH CONV LAYER
      W_conv5 = weight_variable([3, 3, d4, d5], name="Weights_conv5")
      b_conv5 = bias_variable([d5], name="biases_conv5")

      h_conv5 = tf.nn.sigmoid(conv2d(h_pool4, W_conv5) + b_conv5)
      h_pool5 = max_pool_2x2(h_conv5, name="pool5")

      # DENSELY CONNECTED LAYER
      # Now that the image size has been reduced to 7x7,
      # we add a fully-connected layer with 1024 neurons to allow processing on the entire image.
      # We reshape the tensor from the pooling layer into a batch of vectors, multiply by a weight
      # matrix, add a bias, and apply a ReLU.

      W_fc1 = weight_variable([8 * 8 * d5, fc], name="Weights_fc1")
      b_fc1 = bias_variable([fc], name="biases_fc1")

      h_conv5_flat = tf.reshape(h_pool5, [-1, 8 * 8 * d5])
      h_fc1 = tf.nn.sigmoid(tf.matmul(h_conv5_flat, W_fc1) + b_fc1)

      # DROPOUT
      keep_prob = tf.placeholder("float")
      h_fc1_drop = tf.nn.dropout(h_fc1, keep_prob)

      # READOUT LAYER
      W_fc2 = weight_variable([fc, nClasses], name="Weights_fc2")
      b_fc2 = bias_variable([nClasses], name="biases_fc2")
      y_conv = tf.nn.softmax(tf.matmul(h_fc1_drop, W_fc2) + b_fc2)

      # Load the dataset
      datasets = dataset.read_data_sets(trainDir, valDir, trainCsv, valCsv)

      # Train and eval the model
      cross_entropy = -tf.reduce_sum(y_ * tf.log(tf.clip_by_value(y_conv, 1e-10, 1.0)))
      tf.scalar_summary('cross entropy', cross_entropy)

      # train_step = tf.train.GradientDescentOptimizer(0.00001).minimize(cross_entropy)
      train_step = tf.train.AdamOptimizer(learningRate).minimize(cross_entropy)
      correct_prediction = tf.equal(tf.argmax(y_conv, 1), tf.argmax(y_, 1))
      accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float"))
      sess.run(tf.initialize_all_variables())

      #    summary_op = tf.merge_all_summaries()
      #    summary_writer = tf.train.SummaryWriter('/tmp/whales', graph_def=sess.graph_def)
      saver = tf.train.Saver()
      # saver.restore(sess, 'my-model-batch1-10000')
      # utility = utilities.Utility(datasets, sess, nClasses, x, y_, keep_prob)

      for i in xrange(5000):
         step_start = time.time()

         batch = datasets.train.get_sequential_batch(batchSize)
         train_step.run(feed_dict={x: batch[0], y_: batch[1], keep_prob: 1}, session=sess)

         if i % 25 == 0:
            # evaluate accuracy on random 100 samples from train set
            batch = datasets.train.get_random_batch(100)
            f1.write("step %d finished, time = %s\n" % (i, time.time() - step_start))
            # acc, cross_entropyD, summary_str = sess.run([accuracy, cross_entropy, summary_op],
            #                                feed_dict={x: batch[0], y_: yTrain, keep_prob: 1})
            acc, cross_entropyD, yD = sess.run([accuracy, cross_entropy, y_conv],
                                           feed_dict={x: batch[0], y_: batch[1], keep_prob: 1})
            f1.write("Cross entropy = " + str(cross_entropyD) + "\n")
            f1.write("Accuracy = " + str(acc) + "\n")
            f1.write("Y = " + str(np.argmax(yD, axis=1)) + "\n")
            f1.write("\n--- %s seconds ---\n\n" % (time.time() - start_time))
            f1.flush()
            # summary_writer.add_summary(summary_str, i)
            # utility.draw(h_pool1, 113, 113, 6, 6)

         f1.write("\nstep %d finished, %d seconds \n" % (i, time.time() - step_start))
         f1.flush()

   saver.save(sess, 'my-model-%d' % (time.time()), global_step=10000)  # Evaluate the prediction
   test = datasets.validation.getAll()
   acc, y_convD, correct_predictionD = sess.run([accuracy, y_conv, correct_prediction],
                                                feed_dict={x: test[0], y_: test[1], keep_prob: 1.0})
   f1.write("Accuracy = " + str(acc) + "\n")
   f1.write("Correct prediction %d\n" % (sum(correct_predictionD)))
   f1.write("y %s\n" % str(test[1]))
   f1.write("y from net %s\n" % str(np.argmax(y_convD, axis=1)))
   f1.write("\n--- %s seconds ---\n\n" % (time.time() - start_time))
   f1.flush()
   f1.close()

start_time = time.time()
doDumbNet('train/train', 'train/validation', 'whales.csv', 'whales.csv')


text:
<!DOCTYPE html>

    <base href="/r/">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Redirect</title>

        <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">

Redirect


text:
package ffk27.mapviewer2;

import java.awt.*;

/**
 * Created by ffk27 on 15-4-16.
 */
public class Style {
    private VectorRenderRule vectorRenderRule;
    private Color fill;
    private Color line;
    private Stroke stroke;
    private String strokeWidth;

    public Style(VectorRenderRule vectorRenderRule, Color fill, Color line, String strokeWidth) {
        this.vectorRenderRule = vectorRenderRule;
        this.fill = fill;
        this.line = line;
        this.strokeWidth = strokeWidth;
    }

    public VectorRenderRule getStyleRule() {
        return vectorRenderRule;
    }

    public Color getFill() {
        return fill;
    }

    public Color getLine() {
        return line;
    }

    public Stroke getStroke() {
        return stroke;
    }

    public void updateSizes(double unitSize) {
        if (strokeWidth!=null) {
            if (strokeWidth.contains("px")) {
                stroke = new BasicStroke(Integer.parseInt(strokeWidth.split("px")[0]), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
            } else {
                stroke = new BasicStroke(Math.round(Utils.unitToPixel(Double.parseDouble(strokeWidth), unitSize)), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
            }
        }
    }
}


text:
# Locates the SDL_sound library

# This module depends on SDL being found and
# must be called AFTER FindSDL.cmake is called.

# This module defines
# SDL_SOUND_INCLUDE_DIR, where to find SDL_sound.h
# SDL_SOUND_FOUND, if false, do not try to link to SDL
# SDL_SOUND_LIBRARIES, this contains the list of libraries that you need
# to link against. This is a read-only variable and is marked INTERNAL.
# SDL_SOUND_EXTRAS, this is an optional variable for you to add your own
# flags to SDL_SOUND_LIBRARIES. This is prepended to SDL_SOUND_LIBRARIES.
# This is available mostly for cases this module failed to anticipate for
# and you must add additional flags. This is marked as ADVANCED.

#
# This module also defines (but you shouldn't need to use directly)
# SDL_SOUND_LIBRARY, the name of just the SDL_sound library you would link
# against. Use SDL_SOUND_LIBRARIES for you link instructions and not this one.
# And might define the following as needed
# MIKMOD_LIBRARY
# MODPLUG_LIBRARY
# OGG_LIBRARY
# VORBIS_LIBRARY
# SMPEG_LIBRARY
# FLAC_LIBRARY
# SPEEX_LIBRARY
#
# Typically, you should not use these variables directly, and you should use
# SDL_SOUND_LIBRARIES which contains SDL_SOUND_LIBRARY and the other audio libraries
# (if needed) to successfully compile on your system .
#
# Created by Eric Wing.
# This module is a bit more complicated than the other FindSDL* family modules.
# The reason is that SDL_sound can be compiled in a large variety of different ways
# which are independent of platform. SDL_sound may dynamically link against other 3rd
# party libraries to get additional codec support, such as Ogg Vorbis, SMPEG, ModPlug,
# MikMod, FLAC, Speex, and potentially others.
# Under some circumstances which I don't fully understand,
# there seems to be a requirement
# that dependent libraries of libraries you use must also be explicitly
# linked against in order to successfully compile. SDL_sound does not currently
# have any system in place to know how it was compiled.
# So this CMake module does the hard work in trying to discover which 3rd party
# libraries are required for building (if any).
# This module uses a brute force approach to create a test program that uses SDL_sound,
# and then tries to build it. If the build fails, it parses the error output for
# known symbol names to figure out which libraries are needed.
#
# Responds to the $SDLDIR and $SDLSOUNDDIR environmental variable that would
# correspond to the ./configure --prefix=$SDLDIR used in building SDL.
#
# On OSX, this will prefer the Framework version (if found) over others.
# People will have to manually change the cache values of
# SDL_LIBRARY to override this selectionor set the CMake environment
# CMAKE_INCLUDE_PATH to modify the search paths.
#

#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
#  License text for the above reference.)

SET(SDL_SOUND_EXTRAS "" CACHE STRING "SDL_sound extra flags")
MARK_AS_ADVANCED(SDL_SOUND_EXTRAS)

# Find SDL_sound.h
FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h
  HINTS
  $ENV{SDLSOUNDDIR}/include
  $ENV{SDLSOUNDDIR}
  $ENV{SDLDIR}/include
  $ENV{SDLDIR}
  PATHS
  /usr/local/include/SDL
  /usr/include/SDL
  /usr/local/include/SDL12
  /usr/local/include/SDL11 # FreeBSD ports
  /usr/include/SDL12
  /usr/include/SDL11
  /usr/local/include
  /usr/include
  /sw/include/SDL # Fink
  /sw/include
  /opt/local/include/SDL # DarwinPorts
  /opt/local/include
  /opt/csw/include/SDL # Blastwave
  /opt/csw/include
  /opt/include/SDL
  /opt/include
  )

FIND_LIBRARY(SDL_SOUND_LIBRARY
  NAMES SDL_sound
  HINTS
  $ENV{SDLSOUNDDIR}/lib
  $ENV{SDLSOUNDDIR}
  $ENV{SDLDIR}/lib
  $ENV{SDLDIR}
  PATHS
  /usr/local/lib
  /usr/lib
  /sw/lib
  /opt/local/lib
  /opt/csw/lib
  /opt/lib
  )

SET(SDL_SOUND_FOUND "NO")
IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)

  # CMake is giving me problems using TRY_COMPILE with the CMAKE_FLAGS
  # for the :STRING syntax if I have multiple values contained in a
  # single variable. This is a problem for the SDL_LIBRARY variable
  # because it does just that. When I feed this variable to the command,
  # only the first value gets the appropriate modifier (e.g. -I) and
  # the rest get dropped.
  # To get multiple single variables to work, I must separate them with a "\;"
  # I could go back and modify the FindSDL.cmake module, but that's kind of painful.
  # The solution would be to try something like:
  # SET(SDL_TRY_COMPILE_LIBRARY_LIST "${SDL_TRY_COMPILE_LIBRARY_LIST}\;${CMAKE_THREAD_LIBS_INIT}")
  # Instead, it was suggested on the mailing list to write a temporary CMakeLists.txt
  # with a temporary test project and invoke that with TRY_COMPILE.
  # See message thread "Figuring out dependencies for a library in order to build"
  # 2005-07-16
  #     TRY_COMPILE(
  #             MY_RESULT
  #             ${CMAKE_BINARY_DIR}
  #             ${PROJECT_SOURCE_DIR}/DetermineSoundLibs.c
  #             CMAKE_FLAGS
  #                     -DINCLUDE_DIRECTORIES:STRING=${SDL_INCLUDE_DIR}\;${SDL_SOUND_INCLUDE_DIR}
  #                     -DLINK_LIBRARIES:STRING=${SDL_SOUND_LIBRARY}\;${SDL_LIBRARY}
  #             OUTPUT_VARIABLE MY_OUTPUT
  #     )

  # To minimize external dependencies, create a sdlsound test program
  # which will be used to figure out if additional link dependencies are
  # required for the link phase.
  FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/DetermineSoundLibs.c
    "#include \"SDL_sound.h\"
    #include \"SDL.h\"
    int main(int argc, char* argv[])
    {
        Sound_AudioInfo desired;
        Sound_Sample* sample;

        SDL_Init(0);
        Sound_Init();

        /* This doesn't actually have to work, but Init() is a no-op
         * for some of the decoders, so this should force more symbols
         * to be pulled in.
         */
        sample = Sound_NewSampleFromFile(argv[1], &desired, 4096);

        Sound_Quit();
        SDL_Quit();
        return 0;
     }"
     )

   # Calling
   # TARGET_LINK_LIBRARIES(DetermineSoundLibs "${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
   # causes problems when SDL_LIBRARY looks like
   # /Library/Frameworks/SDL.framework;-framework Cocoa
   # The ;-framework Cocoa seems to be confusing CMake once the OS X
   # framework support was added. I was told that breaking up the list
   # would fix the problem.
   SET(TMP_TRY_LIBS)
   FOREACH(lib ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
     SET(TMP_TRY_LIBS "${TMP_TRY_LIBS} \"${lib}\"")
   ENDFOREACH(lib)

   # MESSAGE("TMP_TRY_LIBS ${TMP_TRY_LIBS}")

   # Write the CMakeLists.txt and test project
   # Weird, this is still sketchy. If I don't quote the variables
   # in the TARGET_LINK_LIBRARIES, I seem to loose everything
   # in the SDL_LIBRARY string after the "-framework".
   # But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
   FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt
     "PROJECT(DetermineSoundLibs)
        INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
        ADD_EXECUTABLE(DetermineSoundLibs DetermineSoundLibs.c)
        TARGET_LINK_LIBRARIES(DetermineSoundLibs ${TMP_TRY_LIBS})"
     )

   TRY_COMPILE(
     MY_RESULT
     ${PROJECT_BINARY_DIR}/CMakeTmp
     ${PROJECT_BINARY_DIR}/CMakeTmp
     DetermineSoundLibs
     OUTPUT_VARIABLE MY_OUTPUT
     )

   # MESSAGE("${MY_RESULT}")
   # MESSAGE(${MY_OUTPUT})

   IF(NOT MY_RESULT)

     # I expect that MPGLIB, VOC, WAV, AIFF, and SHN are compiled in statically.
     # I think Timidity is also compiled in statically.
     # I've never had to explcitly link against Quicktime, so I'll skip that for now.

     SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY})

     # Find MikMod
     IF("${MY_OUTPUT}" MATCHES "MikMod_")
     FIND_LIBRARY(MIKMOD_LIBRARY
         NAMES libmikmod-coreaudio mikmod
         PATHS
         $ENV{MIKMODDIR}/lib
         $ENV{MIKMODDIR}
         $ENV{SDLSOUNDDIR}/lib
         $ENV{SDLSOUNDDIR}
         $ENV{SDLDIR}/lib
         $ENV{SDLDIR}
         /usr/local/lib
         /usr/lib
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
       /opt/lib
       )
       IF(MIKMOD_LIBRARY)
         SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY})
       ENDIF(MIKMOD_LIBRARY)
     ENDIF("${MY_OUTPUT}" MATCHES "MikMod_")

     # Find ModPlug
     IF("${MY_OUTPUT}" MATCHES "MODPLUG_")
       FIND_LIBRARY(MODPLUG_LIBRARY
         NAMES modplug
         PATHS
         $ENV{MODPLUGDIR}/lib
         $ENV{MODPLUGDIR}
         $ENV{SDLSOUNDDIR}/lib
         $ENV{SDLSOUNDDIR}
         $ENV{SDLDIR}/lib
         $ENV{SDLDIR}
         /usr/local/lib
         /usr/lib
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
       /opt/lib
       )
       IF(MODPLUG_LIBRARY)
         SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MODPLUG_LIBRARY})
       ENDIF(MODPLUG_LIBRARY)
     ENDIF("${MY_OUTPUT}" MATCHES "MODPLUG_")

     # Find Ogg and Vorbis
     IF("${MY_OUTPUT}" MATCHES "ov_")
       FIND_LIBRARY(VORBIS_LIBRARY
         NAMES vorbis Vorbis VORBIS
         PATHS
         $ENV{VORBISDIR}/lib
         $ENV{VORBISDIR}
         $ENV{OGGDIR}/lib
         $ENV{OGGDIR}
         $ENV{SDLSOUNDDIR}/lib
         $ENV{SDLSOUNDDIR}
         $ENV{SDLDIR}/lib
         $ENV{SDLDIR}
         /usr/local/lib
         /usr/lib
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
       /opt/lib
         )
       IF(VORBIS_LIBRARY)
         SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY})
       ENDIF(VORBIS_LIBRARY)

       FIND_LIBRARY(OGG_LIBRARY
         NAMES ogg Ogg OGG
         PATHS
         $ENV{OGGDIR}/lib
         $ENV{OGGDIR}
         $ENV{VORBISDIR}/lib
         $ENV{VORBISDIR}
         $ENV{SDLSOUNDDIR}/lib
         $ENV{SDLSOUNDDIR}
         $ENV{SDLDIR}/lib
         $ENV{SDLDIR}
         /usr/local/lib
         /usr/lib
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
       /opt/lib
         )
       IF(OGG_LIBRARY)
         SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
       ENDIF(OGG_LIBRARY)
     ENDIF("${MY_OUTPUT}" MATCHES "ov_")

     # Find SMPEG
     IF("${MY_OUTPUT}" MATCHES "SMPEG_")
       FIND_LIBRARY(SMPEG_LIBRARY
         NAMES smpeg SMPEG Smpeg SMpeg
         PATHS
         $ENV{SMPEGDIR}/lib
         $ENV{SMPEGDIR}
         $ENV{SDLSOUNDDIR}/lib
         $ENV{SDLSOUNDDIR}
         $ENV{SDLDIR}/lib
         $ENV{SDLDIR}
         /usr/local/lib
         /usr/lib
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
       /opt/lib
         )
       IF(SMPEG_LIBRARY)
         SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY})
       ENDIF(SMPEG_LIBRARY)
     ENDIF("${MY_OUTPUT}" MATCHES "SMPEG_")

     # Find FLAC
     IF("${MY_OUTPUT}" MATCHES "FLAC_")
       FIND_LIBRARY(FLAC_LIBRARY
         NAMES flac FLAC
         PATHS
         $ENV{FLACDIR}/lib
         $ENV{FLACDIR}
         $ENV{SDLSOUNDDIR}/lib
         $ENV{SDLSOUNDDIR}
         $ENV{SDLDIR}/lib
         $ENV{SDLDIR}
         /usr/local/lib
         /usr/lib
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
       /opt/lib
         )
       IF(FLAC_LIBRARY)
         SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY})
       ENDIF(FLAC_LIBRARY)
     ENDIF("${MY_OUTPUT}" MATCHES "FLAC_")

     # Hmmm...Speex seems to depend on Ogg. This might be a problem if
     # the TRY_COMPILE attempt gets blocked at SPEEX before it can pull
     # in the Ogg symbols. I'm not sure if I should duplicate the ogg stuff
     # above for here or if two ogg entries will screw up things.
     IF("${MY_OUTPUT}" MATCHES "speex_")
       FIND_LIBRARY(SPEEX_LIBRARY
         NAMES speex SPEEX
         PATHS
         $ENV{SPEEXDIR}/lib
         $ENV{SPEEXDIR}
         $ENV{SDLSOUNDDIR}/lib
         $ENV{SDLSOUNDDIR}
         $ENV{SDLDIR}/lib
         $ENV{SDLDIR}
         /usr/local/lib
         /usr/lib
         /sw/lib
         /opt/local/lib
         /opt/csw/lib
       /opt/lib
         )
       IF(SPEEX_LIBRARY)
         SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY})
       ENDIF(SPEEX_LIBRARY)

       # Find OGG (needed for Speex)
     # We might have already found Ogg for Vorbis, so skip it if so.
       IF(NOT OGG_LIBRARY)
         FIND_LIBRARY(OGG_LIBRARY
           NAMES ogg Ogg OGG
           PATHS
           $ENV{OGGDIR}/lib
           $ENV{OGGDIR}
           $ENV{VORBISDIR}/lib
           $ENV{VORBISDIR}
           $ENV{SPEEXDIR}/lib
           $ENV{SPEEXDIR}
           $ENV{SDLSOUNDDIR}/lib
           $ENV{SDLSOUNDDIR}
           $ENV{SDLDIR}/lib
           $ENV{SDLDIR}
           /usr/local/lib
           /usr/lib
           /sw/lib
           /opt/local/lib
           /opt/csw/lib
         /opt/lib
           )
         IF(OGG_LIBRARY)
           SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
         ENDIF(OGG_LIBRARY)
       ENDIF(NOT OGG_LIBRARY)
     ENDIF("${MY_OUTPUT}" MATCHES "speex_")

   ELSE(NOT MY_RESULT)
     SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY}" CACHE INTERNAL "SDL_sound and dependent libraries")
   ENDIF(NOT MY_RESULT)

   SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP}" CACHE INTERNAL "SDL_sound and dependent libraries")
   SET(SDL_SOUND_FOUND "YES")
 ENDIF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)

 # MESSAGE("SDL_SOUND_LIBRARIES is ${SDL_SOUND_LIBRARIES}")


text:
<?php

use Illuminate\Database\Migrations\Migration;

class MigrationCartalystSentryInstallUsers extends Migration {

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up() {
        Schema::create('users', function($table) {
            $table->increments('id');
            $table->string('email');
            $table->string('password');
            $table->text('permissions')->nullable();
            $table->boolean('activated')->default(0);
            $table->string('activation_code')->nullable();
            $table->timestamp('activated_at')->nullable();
            $table->timestamp('last_login')->nullable();
            $table->string('persist_code')->nullable();
            $table->string('reset_password_code')->nullable();
            $table->string('first_name')->nullable();
            $table->string('last_name')->nullable();
            $table->timestamps();

            // We'll need to ensure that MySQL uses the InnoDB engine to
            // support the indexes, other engines aren't affected.
            $table->engine = 'InnoDB';
            $table->unique('email');
            $table->index('activation_code');
            $table->index('reset_password_code');
        });
        $users = Sentry::createUser(array(
                    'first_name' => 'nombre',
                    'last_name' => 'apellido',
                    'email' => 'email@4geeks.com.ve',
                    'password' => 'miclave',
                    'activated' => true,
                    'permissions' => array(
                        'user.create' => -1, 'user.delete' => -1,
                        'user.view' => 1, 'user.update' => 1,),
        ));
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down() {
        Schema::drop('users');
    }

}


text:
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, IndexRoute, Route, browserHistory } from 'react-router';
const firebase = require('./firebase');
const provider = new firebase.auth.GoogleAuthProvider();
import SignIn from './SignIn';
import Home from './Home';
import NewContact from './NewContact';
import AllInfoCard from './AllInfoCard';
import Main from './Main';
import FollowUps from './FollowUps';
require('./css/style');

ReactDOM.render(
  <Router history={browserHistory} path="remembr">
    <Route path="/" component={SignIn}></Route>
    <Route path="/" component={Main} path="home">
      <IndexRoute component={Home} />
      <Route path="/followUp" component={FollowUps} />
      <Route path="/usercontactinfo/:id" component={AllInfoCard} />
    </Route>
    <Route path="/addcontact" component={NewContact}></Route>
  </Router>,
  document.getElementById('root')
)


text:
module.exports = {
  elements: {
    manuallyBoot: {
      selector: '//a[contains(text(), "Manually boot")]',
      locateStrategy: 'xpath',
    },
  },
};


text:
<!DOCTYPE html>

C

D


text:
<?php
namespace Seven\FEBundle\Entity;

use Seven\FEBundle\Entity\Partial\BookingInfo;
use Seven\FEBundle\Entity\Partial\ExpirationCheck;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
use Seven\FEBundle\Entity\Partial\BasicInfo;

/**
 * @ORM\Entity(repositoryClass="Seven\FEBundle\Repository\EmailHostRepository")
 * @ORM\Table(name="email_hosts")
 * @ORM\HasLifecycleCallbacks
 */
class EmailHost
{
    use BasicInfo;
    use BookingInfo;
    use ExpirationCheck;

    /**
     * @ORM\ManyToOne(targetEntity="Client", inversedBy="emails")
     */
    protected $client;

    /**
     * @ORM\ManyToOne(targetEntity="ProviderAccount", inversedBy="email_hosts")
     */
    protected $provider_account;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    protected $no_of_mailboxes;

    /**
     * Set client
     *
     * @param \Seven\FEBundle\Entity\Client $client
     * @return Domain
     */
    public function setClient(\Seven\FEBundle\Entity\Client $client = null)
    {
        $this->client = $client;

        return $this;
    }

    /**
     * Get client
     *
     * @return \Seven\FEBundle\Entity\Client
     */
    public function getClient()
    {
        return $this->client;
    }

    /**
     * Set provider_account
     *
     * @param \Seven\FEBundle\Entity\ProviderAccount $providerAccount
     * @return EmailHost
     */
    public function setProviderAccount(\Seven\FEBundle\Entity\ProviderAccount $providerAccount = null)
    {
        $this->provider_account = $providerAccount;

        return $this;
    }

    /**
     * Get provider_account
     *
     * @return \Seven\FEBundle\Entity\ProviderAccount
     */
    public function getProviderAccount()
    {
        return $this->provider_account;
    }

    /**
     * Set no_of_mailboxes
     *
     * @param string $noOfMailboxes
     * @return EmailHost
     */
    public function setNoOfMailboxes($noOfMailboxes)
    {
        $this->no_of_mailboxes = $noOfMailboxes;

        return $this;
    }

    /**
     * Get no_of_mailboxes
     *
     * @return string
     */
    public function getNoOfMailboxes()
    {
        return $this->no_of_mailboxes;
    }
}


text:
/**
 */
package org.tud.inf.st.mbt.ulang.guigraph.provider;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.ecore.EStructuralFeature;

import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

import org.tud.inf.st.mbt.actions.provider.AllEditPlugin;

import org.tud.inf.st.mbt.core.provider.AbstractModelElementItemProvider;

import org.tud.inf.st.mbt.ulang.guigraph.GuigraphFactory;
import org.tud.inf.st.mbt.ulang.guigraph.GuigraphPackage;
import org.tud.inf.st.mbt.ulang.guigraph.Widget;

/**
 * This is the item provider adapter for a {@link org.tud.inf.st.mbt.ulang.guigraph.Widget} object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public class WidgetItemProvider
	extends AbstractModelElementItemProvider
	implements
		IEditingDomainItemProvider,
		IStructuredItemContentProvider,
		ITreeItemContentProvider,
		IItemLabelProvider,
		IItemPropertySource {
	/**
	 * This constructs an instance from a factory and a notifier.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public WidgetItemProvider(AdapterFactory adapterFactory) {
		super(adapterFactory);
	}

	/**
	 * This returns the property descriptors for the adapted class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
		if (itemPropertyDescriptors == null) {
			super.getPropertyDescriptors(object);

			addImagePropertyDescriptor(object);
		}
		return itemPropertyDescriptors;
	}

	/**
	 * This adds a property descriptor for the Image feature.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void addImagePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add
			(createItemPropertyDescriptor
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
				 getResourceLocator(),
				 getString("_UI_Widget_image_feature"),
				 getString("_UI_PropertyDescriptor_description", "_UI_Widget_image_feature", "_UI_Widget_type"),
				 GuigraphPackage.Literals.WIDGET__IMAGE,
				 true,
				 false,
				 false,
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
				 null,
				 null));
	}

	/**
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
		if (childrenFeatures == null) {
			super.getChildrenFeatures(object);
			childrenFeatures.add(GuigraphPackage.Literals.WIDGET__CHILDREN);
		}
		return childrenFeatures;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EStructuralFeature getChildFeature(Object object, Object child) {
		// Check the type of the specified child object and return the proper feature to use for
		// adding (see {@link AddCommand}) it as a child.

		return super.getChildFeature(object, child);
	}

	/**
	 * This returns Widget.gif.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object getImage(Object object) {
		return overlayImage(object, getResourceLocator().getImage("full/obj16/Widget"));
	}

	/**
	 * This returns the label text for the adapted class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String getText(Object object) {
		String label = ((Widget)object).getName();
		return label == null || label.length() == 0 ?
			getString("_UI_Widget_type") :
			getString("_UI_Widget_type") + " " + label;
	}

	/**
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void notifyChanged(Notification notification) {
		updateChildren(notification);

		switch (notification.getFeatureID(Widget.class)) {
			case GuigraphPackage.WIDGET__IMAGE:
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
				return;
			case GuigraphPackage.WIDGET__CHILDREN:
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
				return;
		}
		super.notifyChanged(notification);
	}

	/**
	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
	 * that can be created under this object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
		super.collectNewChildDescriptors(newChildDescriptors, object);

		newChildDescriptors.add
			(createChildParameter
				(GuigraphPackage.Literals.WIDGET__CHILDREN,
				 GuigraphFactory.eINSTANCE.createWidget()));

		newChildDescriptors.add
			(createChildParameter
				(GuigraphPackage.Literals.WIDGET__CHILDREN,
				 GuigraphFactory.eINSTANCE.createForm()));
	}

	/**
	 * Return the resource locator for this item provider's resources.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public ResourceLocator getResourceLocator() {
		return AllEditPlugin.INSTANCE;
	}

}


text:
package org.jetbrains.idea.maven;

import com.intellij.openapi.Disposable;
import com.intellij.openapi.components.Service;
import com.intellij.openapi.project.Project;

@Service
public final class MavenDisposable implements Disposable {
  @Override
  public void dispose() {
  }

  public static MavenDisposable getInstance(Project project) {
    return project.getService(MavenDisposable.class);
  }
}


text:
using System;
using Microsoft.Xna.Framework.Graphics;

namespace Nez
{
	/// <summary>
	/// this class exists only so that we can sneak the Batcher through and have it work just like SpriteBatch with regard to resource handling.
	/// </summary>
	public abstract class GraphicsResource : IDisposable
	{
		public GraphicsDevice GraphicsDevice
		{
			get => _graphicsDevice;
			internal set
			{
				Insist.IsTrue(value != null);

				if (_graphicsDevice == value)
					return;

				// VertexDeclaration objects can be bound to multiple GraphicsDevice objects
				// during their lifetime. But only one GraphicsDevice should retain ownership.
				if (_graphicsDevice != null)
				{
					UpdateResourceReference(false);
					_selfReference = null;
				}

				_graphicsDevice = value;

				_selfReference = new WeakReference(this);
				UpdateResourceReference(true);
			}
		}

		public bool IsDisposed { get; private set; }

		// The GraphicsDevice property should only be accessed in Dispose(bool) if the disposing
		// parameter is true. If disposing is false, the GraphicsDevice may or may not be disposed yet.
		GraphicsDevice _graphicsDevice;

		WeakReference _selfReference;

		internal GraphicsResource()
		{
		}

		~GraphicsResource()
		{
			// Pass false so the managed objects are not released
			Dispose(false);
		}

		public void Dispose()
		{
			// Dispose of managed objects as well
			Dispose(true);

			// Since we have been manually disposed, do not call the finalizer on this object
			GC.SuppressFinalize(this);
		}

		/// <summary>
		/// The method that derived classes should override to implement disposing of managed and native resources.
		/// </summary>
		/// <param name="disposing">True if managed objects should be disposed.</param>
		/// <remarks>Native resources should always be released regardless of the value of the disposing parameter.</remarks>
		protected virtual void Dispose(bool disposing)
		{
			if (!IsDisposed)
			{
				if (disposing)
				{
					// Release managed objects
				}

				// Remove from the global list of graphics resources
				if (GraphicsDevice != null)
					UpdateResourceReference(false);

				_selfReference = null;
				_graphicsDevice = null;
				IsDisposed = true;
			}
		}

		void UpdateResourceReference(bool shouldAdd)
		{
			var method = shouldAdd ? "AddResourceReference" : "RemoveResourceReference";
			var methodInfo = ReflectionUtils.GetMethodInfo(GraphicsDevice, method);
			methodInfo.Invoke(GraphicsDevice, new object[] {_selfReference});
		}
	}
}


text:
package org.slieb.throwables;

import org.junit.Test;
import java.util.concurrent.atomic.AtomicReference;
import static org.slieb.throwables.BiFunctionWithThrowable.castBiFunctionWithThrowable;
import static org.junit.Assert.assertEquals;
public class BiFunctionWithThrowableGeneralTest {
 @Test
 public void testReturnTypeException() {
        Object expected = new Object();
        Object result = castBiFunctionWithThrowable((v1, v2) -> {
      throw new Exception("expect exception");
    }).thatReturnsOnCatch(expected).apply(null, null);
        assertEquals(expected, result);
 }

 @Test
 public void testNormalOperation() {
    Object expected = new Object();
    Object result = castBiFunctionWithThrowable((v1, v2) -> expected).thatReturnsOnCatch(null).apply(null, null);
    assertEquals(expected, result);
 }

 @Test
 public void testOnException() {
        AtomicReference<java.lang.Throwable> reference = new AtomicReference<>();
        java.lang.Exception expected = new java.lang.Exception("expected");
        try {
        castBiFunctionWithThrowable((v1, v2) -> {
      throw expected;
    }).onException(reference::set).apply(null, null);
        } catch (Throwable ignored) {}
        assertEquals(expected, reference.get());
 }

}


text:
var gulp = require('gulp'),
    plumber = require('gulp-plumber'),
    gulpif = require('gulp-if'),
    pug = require('gulp-pug'),
    inheritance = require('gulp-pug-inheritance'),
    cached = require('gulp-cached'),
    filter = require('gulp-filter'),
    prettify = require('gulp-prettify'),
    rename = require('gulp-rename'),
    errorHandler = require('gulp-plumber-error-handler'),
    config = require('../config').paths;

gulp.task('templates', function () {
    gulp.src('app/**/*.pug')
        .pipe(plumber({errorHandler: errorHandler('Error in \'templates\' task')}))
        .pipe(cached('pug'))
        .pipe(gulpif(global.watch, inheritance({basedir: 'app', skip: 'node_modules'})))
        .pipe(filter(function (file) {
            return /app[\\\/]pages/.test(file.path);
        }))
        .pipe(pug())
        .pipe(prettify({
            brace_style: 'expand',
            indent_size: 1,
            indent_char: '\t',
            indent_inner_html: true,
            preserve_newlines: true
        }))
        .pipe(rename({dirname: '.'}))
        .pipe(gulp.dest(config.publicPath));
});


text:
using System.ComponentModel;

namespace StackingEntities.Model.Enums
{
	public enum HorseColors
	{
		White,
		Buckskin,
		[Description("Dark Bay")]
		DarkBay,
		Bay,
		Black,
		[Description("Dapple Gray")]
		DappleGray,
		[Description("Flaxen Chestnut")]
		FlaxenChestnut
	}
}


text:
require 'swt_shoes/spec_helper'

describe Shoes::Swt::Image do
  include_context "swt app"

  IMAGE_WIDTH = 3
  IMAGE_HEIGHT = 1

  let(:blk) { double("block") }
  let(:parent_dsl) { double("parent dsl", add_child: nil, contents: [], gui: parent) }
  let(:dsl) { Shoes::Image.new shoes_app, parent_dsl, image, opts}
  let(:opts) {{left: left, top: top, width: width, height: height}}
  let(:left) { 100 }
  let(:top) { 200 }
  let(:height) { nil }
  let(:width) {nil}
  let(:image) { "spec/swt_shoes/minimal.png" }

  subject {
    dsl.stub(:file_path) { image }
    Shoes::Swt::Image.new(dsl, parent, blk)
  }

  it_behaves_like "paintable"
  it_behaves_like "clearable"
  it_behaves_like "clickable backend"
  it_behaves_like "togglable"

  describe "paint callback" do
    let(:event) { double("event", gc: gc) }
    let(:gc) { double("gc", drawImage: true) }

    before :each do
      swt_app.should_receive(:add_paint_listener)
    end

    specify "draws image" do
      dsl.stub element_left: left, element_top: top
      gc.should_receive(:drawImage).with(subject.real, 0, 0, 3, 1, left, top, 3, 1)
      subject.painter.call(event)
    end
  end

  describe "painting raw images" do
    let(:image) { File.read("spec/swt_shoes/minimal.png", :mode => "rb") }

    specify "loads image from raw data" do
      subject.real.image_data.width = 3
      subject.real.image_data.height = 1
    end
  end

  # note the image used is 3x1 pixel big
  describe 'dimensions' do

    it 'has the given width' do
      subject.width.should == IMAGE_WIDTH
    end

    it 'has the given height' do
      subject.height.should == IMAGE_HEIGHT
    end

    it 'can change its width' do
      subject.width = 7
      subject.width.should == 7
    end

    it 'can change its height' do
      subject.height = 7
      subject.height.should == 7
    end

    describe 'with a given width' do
      let(:width) {(IMAGE_WIDTH * 5.8).to_i}
      it 'scales the height' do
        subject.height.should == (IMAGE_HEIGHT * 5.8).to_i
      end
    end

    describe 'with a given height' do
      let(:height) {IMAGE_HEIGHT * 4}

      it 'scales the width' do
        subject.width.should == IMAGE_WIDTH * 4
      end
    end

    describe 'with a given width and height' do
      let(:width) {1}
      let(:height) {2}
      it 'sets the given width' do
        subject.width.should == 1
      end

      it 'sets the given height' do
        subject.height.should == 2
      end
    end
  end
end


text: <!DOCTYPE html>


text:
"""Evaluation job.

This sits on the side and performs evaluation on a saved model.
This is a separate process for ease of use and stability of numbers.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import tensorflow as tf

from learning_unsupervised_learning import utils

def construct_evaluation_graph(theta_process_fn=None,
                               w_learner_fn=None,
                               dataset_fn=None,
                               meta_objectives=None,
                              ):
  """Construct the evaluation graph.
  """
  if meta_objectives is None:
    meta_objectives = []

  tf.train.create_global_step()

  local_device = ""
  remote_device = ""

  meta_opt = theta_process_fn(
      remote_device=remote_device, local_device=local_device)

  base_model = w_learner_fn(
      remote_device=remote_device, local_device=local_device)

  train_dataset = dataset_fn(device=local_device)

  # construct variables
  x, outputs = base_model(train_dataset())
  initial_state = base_model.initial_state(meta_opt, max_steps=10)
  next_state = base_model.compute_next_state(outputs, meta_opt, initial_state)
  with utils.state_barrier_context(next_state):
    train_one_step_op = meta_opt.assign_state(base_model, next_state)

  meta_objs = []
  for meta_obj_fn in meta_objectives:
    meta_obj = meta_obj_fn(local_device="", remote_device="")
    meta_objs.append(meta_obj)
    J = meta_obj(train_dataset, lambda x: base_model(x)[0])
    tf.summary.scalar(str(meta_obj.__class__.__name__)+"_J", tf.reduce_mean(J))

  # TODO(lmetz) this is kinda error prone.
  # We should share the construction of the global variables across train and
  # make sure both sets of savable variables are the same
  checkpoint_vars = meta_opt.remote_variables() + [tf.train.get_global_step()]
  for meta_obj in meta_objs:
    checkpoint_vars.extend(meta_obj.remote_variables())

  return checkpoint_vars, train_one_step_op, (base_model, train_dataset)


text:
package com.navercorp.pinpoint.batch.alarm.checker;

import com.navercorp.pinpoint.batch.alarm.collector.DataSourceDataCollector;
import com.navercorp.pinpoint.batch.alarm.vo.DataSourceAlarmVO;
import com.navercorp.pinpoint.web.alarm.vo.Rule;

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

/**
 * @author Taejin Koo
 * @author Jongjin.Bae
 */
public class DataSourceConnectionUsageRateChecker extends DataSourceAlarmListValueAgentChecker {

    private static final String SMS_MESSAGE_FORMAT = "[PINPOINT Alarm - %s] DataSource %s connection pool usage %s%s (Threshold : %s%s, Raw : %s/%s)";
    private static final String EMAIL_MESSAGE_FORMAT = " Value of agent(%s) has %s%s(DataSource %s connection pool usage) during the past 5 mins.(Threshold : %s%s, Raw : %s/%s)";

    public DataSourceConnectionUsageRateChecker(DataSourceDataCollector dataSourceDataCollector, Rule rule) {
        super(rule, "%", dataSourceDataCollector);
    }

    @Override
    protected boolean decideResult(List<DataSourceAlarmVO> dataSourceAlarmVOList) {
        for (DataSourceAlarmVO dataSourceAlarm : dataSourceAlarmVOList) {
            if (decideResult0(dataSourceAlarm)) {
                return true;
            }
        }

        return false;
    }

    private boolean decideResult0(DataSourceAlarmVO dataSourceAlarmVO) {
        if (dataSourceAlarmVO.getConnectionUsedRate() > rule.getThreshold()) {
            return true;
        }

        return false;
    }

    @Override
    protected Map<String, List<DataSourceAlarmVO>> getAgentValues() {
        return ((DataSourceDataCollector) dataCollector).getDataSourceConnectionUsageRate();
    }

    public List<String> getSmsMessage() {
        List<String> messages = new ArrayList<>();

        for (Map.Entry<String, List<DataSourceAlarmVO>> detected : detectedAgents.entrySet()) {
            for (DataSourceAlarmVO eachVo : detected.getValue()) {
                if (decideResult0(eachVo)) {
                    String message = String.format(SMS_MESSAGE_FORMAT, detected.getKey(), eachVo.getDatabaseName(), eachVo.getConnectionUsedRate(), unit, rule.getThreshold(), unit, eachVo.getActiveConnectionAvg(), eachVo.getMaxConnectionAvg());
                    messages.add(message);
                }
            }
        }

        return messages;
    }

    @Override
    public String getEmailMessage() {
        StringBuilder contents = new StringBuilder();
        for (Map.Entry<String, List<DataSourceAlarmVO>> detected : detectedAgents.entrySet()) {
            for (DataSourceAlarmVO eachVo : detected.getValue()) {
                if (decideResult0(eachVo)) {
                    String message = String.format(EMAIL_MESSAGE_FORMAT, detected.getKey(), eachVo.getConnectionUsedRate(), unit, eachVo.getDatabaseName(), rule.getThreshold(), unit, eachVo.getActiveConnectionAvg(), eachVo.getMaxConnectionAvg());
                    contents.append(message);
                }
            }

        }
        return contents.toString();
    }

}


text:
//Copyright (c) 2010, Carnegie Mellon University
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without modification, are permitted provided
//that the following conditions are met:
//
//    * Redistributions of source code must retain the above copyright notice, this list of conditions and
//      the following disclaimer.
//    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
//      and the following disclaimer in the documentation and/or other materials provided with the
//      distribution.
//    * Neither the name of Carnegie Mellon University nor the names of its contributors may be used to
//      endorse or promote products derived from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
//WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
//ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
//TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
//
package org.fieldstream.service.context.model;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;

import org.fieldstream.Constants;
import org.fieldstream.service.context.model.ModelCalculation.FeatureSet;
import org.fieldstream.service.logger.Log;
import org.fieldstream.service.sensor.ContextBus;
import org.fieldstream.service.sensor.FeatureBus;

/**
 *
 * @author Scott Fisk
 *
 */
public class ActivityCalculation extends ModelCalculation {

	// set of features
	private double[] features;

	//number of features
	private int featureNum;

	private int[] featureFlag;
	//activity level
	private int activityClassification;

	private ArrayList<Integer> featureLabels;

	public ActivityCalculation() {

		// number of features in this model.
		featureNum = 2;

		// features in the model.
		featureLabels = new ArrayList<Integer>(featureNum);
		featureLabels.add(Constants.getId(Constants.FEATURE_MEANCROSS, Constants.SENSOR_ACCELCHESTZ));
		featureLabels.add(Constants.getId(Constants.FEATURE_MAD, Constants.SENSOR_ACCELCHESTZ));
		featureFlag = new int[featureNum];
		features = new double[featureNum];

	}

	@Override
	public void computeContext(FeatureSet fs) {

		for (int featureID : featureLabels) {
			double result = fs.getFeature(featureID);

			//get values from the listener
			int index = featureLabels.indexOf(featureID);

			// save features
			features[index] = result;
		}

		//push classification result to a higher layer
		activityClassification = doDecisionTree();
		ContextBus.getInstance().pushNewContext(getID(),activityClassification, fs.getBeginTime(), fs.getEndTime());
		if (Log.DEBUG) Log.d("ActivityClassification","New Classification: "+((Integer)activityClassification).toString());
		//initialize all the flags to 0
		Arrays.fill(featureFlag, 0);

	}

	private boolean isFullFeatureSet(){
		int i = 0;
		for(i = 0; i < featureNum; i++){
			// check for empties
			if(featureFlag[i] == 0){
				return false;
			}
		}
		// if we get here then there were no empties
		return true;
	}

	/**
	 * Returns the most recent activity classification... This is a public variable can be accessed directly.
	 */
	public int getCurrentClassifier() {
		return activityClassification;
	}

	/**
	 * @see org.fieldstream.service.context.model.ModelCalculation#getID()
	 */
	public int getID() {
		return Constants.MODEL_ACTIVITY;
	}

	public ArrayList<Integer> getUsedFeatures() {
		return featureLabels;
	}

	private int doDecisionTree() {
		float[] DTentry = new float [4];

		int next = 0;   // root node

		do {
			DTentry = ActivityModel.dtChest[-next]; // get next node
			next  = (int) ((features[(int) DTentry[0]] <= DTentry[1]) ? DTentry[2] :DTentry[3]);
		} while (next<0); // while next is a node

		return next;
	}
	public final static int SIT = 0;
	public final static int STAND = 1;
	public final static int WALK = 2;

	private final static HashMap<Integer, String> outputDescription = new HashMap<Integer, String>() {
		{
			put(SIT, "Sit");
			put(STAND, "Stand");
			put(WALK, "Walk");
		}
	};

	public HashMap<Integer, String> getOutputDescription() {
		return outputDescription;
	}

}


text:
# Документы

TODO

## Service Documents

[Service Document](http://www.odata.org/documentation/odata-version-2-0/atom-format/#ServiceDocuments)
lists available collections (which are grouped to *workspaces*).

```php
/** @var ServiceDocument $document */
foreach ($document->getWorkspaces() as $workspace) {
    echo 'Title: ' . $workspace->getTitle() . PHP_EOL;
    foreach ($workspace->getCollections() as $collection) {
        echo '  Title: ' . $collection->getTitle() . PHP_EOL;
        echo '  Href: ' . $collection->getHref() . PHP_EOL;
    }
}
```

## Metadata Documents

[Metadata Document](http://www.odata.org/documentation/odata-version-2-0/overview/#ServiceMetadataDocument)

TODO

## Collections of Entries

Collections represent a set of Entries. In OData, Collections are represented as Atom feeds, with
one Atom entry for each Entry within the Collection.

## Entries

In OData, Entries are represented as Atom entries.

```php
//...

$uri = new Uri();
$uri
    ->collection('Categories')
    ->item('123');

$document = $service->sendRequest('GET', $uri);
if (!$document instanceof EntryDocument) {
    throw new \RuntimeException;
}
$entry = $document->getEntry(); // Instance of Mekras\OData\Client\Element\Entry
```

Entry meta data can be accessed via normal `Mekras\Atom\Element\Entry` methods:

```php
echo 'Title: ' . $entry->getTitle() . PHP_EOL;
echo 'ID: ' . $entry->getId() . PHP_EOL;
echo 'Updated: ' . $entry->getUpdated()->format('d.m.y H:i:s') . PHP_EOL;
```

Entry properties can be accessed via `getContent` method:

```php
$properties = $entry->getContent();
echo '  Id: ' . $properties['Id'] . PHP_EOL;
echo '  Hostname: ' . $properties['HostName'] . PHP_EOL;
echo '  Operations: ' . $properties['Operations'] . PHP_EOL;
```

Or directly as array elements:

```php
echo '  Id: ' . $entry['Id'] . PHP_EOL;
echo '  Hostname: ' . $entry['HostName'] . PHP_EOL;
echo '  Operations: ' . $entry['Operations'] . PHP_EOL;
```


text:
object Test extends App {
  def foo(x: Int)(y: Int): Unit = macro Impls.foo
  foo(40)(2)
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Projeto extends MX_Controller {
	public function __construct(){
		parent::__construct();
		if(isset($this->user_data)){
			//print_r($this->user_data['permissoes']);
			if(
				!in_array('coordenador', $this->user_data['permissoes'])
				and
				!in_array('professor', $this->user_data['permissoes'])
				and
				!in_array('admin', $this->user_data['permissoes'])
			){

				$_SESSION['route']="projeto";
				redirect('usuario', 'refresh');
				//redirect('', 'refresh');
			}
		}else{
			$_SESSION['route']="projeto";
			redirect('usuario', 'refresh');
		}

	}

	public function index()
	{
		$this->data['title']="Cimol - Área do Projeto";
		$this->data['template']="inicio";
		$this->view->show_view($this->data);
	}

	public function funcionalidade()
	{
		$this->data['title']="Cimol - Área do Projeto";
		$this->data['template']="funcionalidade/principal";
		$this->view->show_view($this->data);
	}

}


text:
Laws
====

[![Build Status](https://secure.travis-ci.org/folktale/laws.png?branch=master)](https://travis-ci.org/folktale/laws)
[![NPM version](https://badge.fury.io/js/laws.png)](http://badge.fury.io/js/laws)
[![Dependencies Status](https://david-dm.org/folktale/laws.png)](https://david-dm.org/folktale/laws)
[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges)

[Claire][] properties for verifying Monad and other algebraic structures' laws,
conforming to the [Fantasy Land][] specification.

[Claire]: https://github.com/hifivejs/claire
[Fantasy Land]: https://github.com/fantasyland/fantasy-land

## Example

```js
var Maybe = require('monads.maybe')
var laws  = require('laws')

laws.functors.identity(Maybe.Just).asTest({ verbose: true, times: 100 })()
// + OK passed 100 tests.
```

## Installing

The easiest way is to grab it from NPM. If you're running in a Browser
environment, you can use [Browserify][]

    $ npm install laws

[Browserify]: http://browserify.org/

### Using with CommonJS

If you're not using NPM, [Download the latest release][release], and require
the `folktale.laws.umd.js` file:

```js
var laws = require('laws')
```

[release]: https://github.com/folktale/laws/releases/download/v0.2.0/laws-0.2.0.tar.gz

### Using with AMD

[Download the latest release][release], and require the `folktale.laws.umd.js`
file:

```js
require(['folktale.laws'], function(laws) {
  ...
})
```

### Using without modules

[Download the latest release][release], and load the `folktale.laws.umd.js`
file. The properties are exposed in the global `Laws` object:

```html
<script src="/path/to/folktale.laws.umd.js"></script>
```

### Compiling from source

If you want to compile this library from the source, you'll need [Git][],
[Make][], [Node.js][], and run the following commands:

    $ git clone git://github.com/folktale/laws.git
    $ cd laws
    $ npm install
    $ make bundle

This will generate the `dist/folktale.laws.umd.js` file, which you can load in
any JavaScript environment.

[Git]: http://git-scm.com/
[Make]: http://www.gnu.org/software/make/
[Node.js]: http://nodejs.org/

## Getting Started

This library provides properties for verifying the correctness of an
implementation of algebraic structures according to the [Fantasy Land][]
specification. They do so by generating random inputs and checking if the
algebraic laws holds for your structure.

In order to use these properties, your algebraic library needs to implement the
`Eq` typeclass, defined as:

```hs
class Eq a where
  -- | True if both structures are equivalent
  isEqual :: a -> a -> Bool
```

Here's an example of such implementation, for a `Maybe(a)` monad:

```js
var Maybe = {
  /* (...) */
  isEqual: function(b) {
    return this.isNothing?  b.isNothing
    :      this.isJust?     this.value === b.value
  }
  /* (...) */
}
```

### The Laws

 *  Applicatives
    1. Identity
    2. Composition
    3. Homomorphism
    4. Interchange
 *  Chains
    1. Associativity
 *  Functors
    1. Identity
    2. Composition
 *  Monads
    1. Left identity
    2. Right identity
 *  Monoids
    1. Left identity
    2. Right identity
 *  Semigroups
    1. Associativity

### Using the laws

To verify if a data structure conforms to the laws, you need to partially apply
the law to a function that constructs a structure holding a single value. For
example, if you have an `Identity` container and want to check if it conforms
to the Semigroup's law of associativity:

```js
// :: a -> Id a
function makeId(a) {
  return new Id(a)
}

laws.semigroup.associativity(makeId).asTest({ verbose: true })()
// + OK passed 100 tests
```

Note that applying the law to the constructor function gives you back a
[Claire][] property. There are different ways of using this object, but the
easiest one is to use the `asTest(configuration)` method to return a test
function. When invoked (with no parameters), this test function will repeatedly
generate random inputs to test if your implementation behaves correctly
according to the laws.

If any of the inputs invalidates the property, an error is thrown with detailed
information about why the property was invalidated. You can control both the
amount of details in the reports, and the number of random tests that are
performed by passing a configuration object to the `asTest` method. By default
the reports are concise and only 100 random tests are performed.

```hs
class Configuration where
  verbose :: Bool       -- * whether to output a detailed report or not
  times   :: Int        -- * number of random tests to perform
```

Do note that if `verbose` is false, no message will be printed to the standard
output by default.

## Platform support

This library assumes an ES5 environment, but can be easily supported in ES3
platforms by the use of shims. Just include [es5-shim][] :)

[es5-shim]: https://github.com/kriskowal/es5-shim

## Licence

Copyright (c) 2013 Quildreen Motta.

Released under the [MIT licence](https://github.com/folktale/monads.maybe/blob/master/LICENCE).


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2010-2017 Evolveum and contributors
  ~
  ~ This work is dual-licensed under the Apache License 2.0
  ~ and European Union Public License. See LICENSE file for details.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
       default-lazy-init="true" default-autowire="byName">

    <bean id="testInterceptor" class="com.evolveum.midpoint.repo.sql.testing.TestInterceptor"/>

    <bean id="testSqlRepositoryBeanPostProcessor" class="com.evolveum.midpoint.repo.sql.testing.TestSqlRepositoryBeanPostProcessor"/>

    <bean id="testSqlRepositoryFactory" class="com.evolveum.midpoint.repo.sql.testing.TestSqlRepositoryFactory" primary="true"
          depends-on="repositoryFactory"/>

    <bean id="testSqlAuditFactory" class="com.evolveum.midpoint.repo.sql.testing.TestSqlAuditServiceFactory" primary="true">
        <property name="repositoryFactory" ref="testSqlRepositoryFactory" />
    </bean>

    <import resource="ctx-repository-session-test.xml"/>

    <alias name="testSessionFactory" alias="sessionFactory"/>

</beans>


text:
<?php

namespace Oro\Bundle\EmailBundle\Mailbox;

use Oro\Bundle\EmailBundle\Entity\Mailbox;
use Oro\Bundle\EmailBundle\Entity\MailboxProcessSettings;

class MailboxProcessStorage
{
    /** @var MailboxProcessProviderInterface[] */
    protected $processes = [];

    /**
     * Registers mailbox process provider with application.
     *
     * @param string                          $type
     * @param MailboxProcessProviderInterface $provider
     */
    public function addProcess($type, MailboxProcessProviderInterface $provider)
    {
        if (isset($this->processes[$type])) {
            throw new \LogicException(
                sprintf('Process of type %s is already registered. Review your service configuration.')
            );
        }

        $this->processes[$type] = $provider;
    }

    /**
     * Returns process provider of provided type.
     *
     * @param string $type
     *
     * @return MailboxProcessProviderInterface
     */
    public function getProcess($type)
    {
        $this->errorIfUnregistered($type);

        return $this->processes[$type];
    }

    /**
     * Returns all registered processes.
     *
     * @return MailboxProcessProviderInterface['type' => MailboxProcessProviderInterface]
     */
    public function getProcesses()
    {
        return $this->processes;
    }

    /**
     * Creates new instance of settings entity for provided type.
     *
     * @param $type
     *
     * @return MailboxProcessSettings
     */
    public function getNewSettingsEntity($type)
    {
        $entityClass = $this->getProcess($type)->getSettingsEntityFQCN();

        if (!class_exists($entityClass)) {
            throw new \LogicException(
                sprintf('Settings entity %s for mailbox process %s does not exist.', $entityClass, $type)
            );
        }

        return new $entityClass();
    }

    /**
     * Returns choice list for process type choice field.
     *
     * @param Mailbox $mailbox
     *
     * @return array('type' => 'Process Type Label (translate id)')
     */
    public function getProcessTypeChoiceList(Mailbox $mailbox = null)
    {
        $choices = [];
        foreach ($this->processes as $type => $provider) {
            if (!$provider->isEnabled($mailbox)) {
                continue;
            }

            $choices[$type] = $provider->getLabel();
        }

        return $choices;
    }

    /**
     * Returns array of process definition names for all mailbox processes.
     *
     * @return array
     */
    public function getProcessDefinitionNames()
    {
        $list = [];
        foreach ($this->processes as $process) {
            $list[] = $process->getProcessDefinitionName();
        }

        return $list;
    }

    /**
     * Throws exception if provided type is not registered within storage instance.
     *
     * @param string $type
     */
    protected function errorIfUnregistered($type)
    {
        if (!isset($this->processes[$type])) {
            throw new \LogicException(
                sprintf('There is no mailbox process with type %s registered.', $type)
            );
        }
    }
}


text:
package test.others.algorithm;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Random;

import com.firenio.common.Assert;
import com.firenio.common.Util;
import com.firenio.log.DebugUtil;
import com.firenio.log.LoggerFactory;

/**
 * @author: wangkai
 **/
public class TestSort {

    static {
        LoggerFactory.setEnableSLF4JLogger(false);
    }

    public static int[] random_array() {
        return random_array(10);
    }

    public static int[] random_array(int count) {
        Random random = new Random();
        int[]  array  = new int[count];
        for (int i = 0; i < count; i++) {
            array[i] = random.nextInt(count << 1);
        }
        return array;
    }

    interface TestISort {

        void sort(int[] array);

    }

    public static void test(TestISort sort, int count) {
        test(sort, TestSort.random_array(count));
    }

    public static void test(TestISort sort, int[] array) {
        System.out.println(Util.arrayToString(array));
        int[] copy = Arrays.copyOf(array, array.length);
        sort.sort(array);
        Arrays.sort(copy);
        Assert.expectTrue(array_equals(array, copy));
        System.out.println(Util.arrayToString(array));
    }

    public static void test_load(TestISort sort, int count, int time) {
        int[]   array = random_array(count);
        int[][] sorts = new int[time][];
        for (int i = 0; i < time; i++) {
            sorts[i] = Arrays.copyOf(array, array.length);
        }
        long start = System.nanoTime();
        for (int i = 0; i < time; i++) {
            sort.sort(sorts[i]);
        }
        long past = System.nanoTime() - start;
        DebugUtil.info("sort cost: " + (past / 1000_1000));
    }

    public static boolean array_equals(int[] array1, int[] array2) {
        if (array1.length != array2.length) {
            return false;
        }
        for (int i = 0; i < array1.length; i++) {
            if (array1[i] != array2[i]) {
                return false;
            }
        }
        return true;
    }

}