text:
<?php

namespace OuterEdge\Layout\Block\Adminhtml\Element;

use Magento\Backend\Block\Widget\Form\Container;
use Magento\Framework\Registry;
use Magento\Backend\Block\Widget\Context;
use Magento\Framework\Phrase;

class Edit extends Container
{
    /**
     * Block element name
     *
     * @var string
     */
    protected $_blockGroup = 'OuterEdge_Layout';

    /**
     * @var Registry
     */
    protected $_coreRegistry = null;

    /**
     * @param Context $context
     * @param Registry $registry
     * @param array $data
     */
    public function __construct(
        Context $context,
        Registry $registry,
        array $data = []
    ) {
        $this->_coreRegistry = $registry;
        parent::__construct($context, $data);
    }

    /**
     * Initialize element edit block
     *
     * @return void
     */
    protected function _construct()
    {
        $this->_objectId = 'element_id';
        $this->_controller = 'adminhtml_element';

        parent::_construct();

        $this->addButton(
            'save_and_edit_button',
            [
                'label' => __('Save and Continue Edit'),
                'class' => 'save',
                'data_attribute' => [
                    'mage-init' => [
                        'button' => ['event' => 'saveAndContinueEdit', 'target' => '#edit_form'],
                    ],
                ]
            ]
        );

        $this->buttonList->update('save', 'label', __('Save Element'));
        $this->buttonList->update('save', 'class', 'save primary');
        $this->buttonList->update(
            'save',
            'data_attribute',
            ['mage-init' => ['button' => ['event' => 'save', 'target' => '#edit_form']]]
        );
    }

    /**
     * Retrieve header text
     *
     * @return Phrase
     */
    public function getHeaderText()
    {
        if ($this->_coreRegistry->registry('elementModel')->getId()) {
            return __(
                'Edit Element "%1"',
                $this->escapeHtml($this->_coreRegistry->registry('elementModel')->getTitle())
            );
        }
        return __('New Element');
    }

    /**
     * Get URL for back (reset) button
     *
     * @return string
     */
    public function getBackUrl()
    {
        return $this->getUrl('*/group/edit', ['entity_id' => $this->getGroupId(), 'active_tab' => 'elements']);
    }

    /**
     * Retrieve URL for save
     *
     * @return string
     */
    public function getSaveUrl()
    {
        return $this->getUrl('*/*/save', ['_current' => true, 'back' => null]);
    }

    /**
     * Get group id
     *
     * @return int
     */
    private function getGroupId()
    {
        if ($this->getRequest()->getParam('entity_id')) {
            return $this->getRequest()->getParam('entity_id');
        }
        return $this->_coreRegistry->registry('elementModel')->getGroupId();
    }
}


text:
package loon.build.project.gwt;

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

public class GwtOption {

	private List<String> javaArgs = new ArrayList<String>(20);

	private String maxHeapSize;
	private String minHeapSize;
	private String maxPermSize;
	private boolean debugJava = false;
	private int debugPort = 8000;
	private boolean debugSuspend = false;

	public List<String> getJavaArgs() {
		return javaArgs;
	}

	public void setJavaArgs(String... javaArgs) {
		this.javaArgs.addAll(Arrays.asList(javaArgs));
	}

	public String getMaxHeapSize() {
		return maxHeapSize;
	}

	public void setMaxHeapSize(String maxHeapSize) {
		this.maxHeapSize = maxHeapSize;
	}

	public String getMinHeapSize() {
		return minHeapSize;
	}

	public void setMinHeapSize(String minHeapSize) {
		this.minHeapSize = minHeapSize;
	}

	public String getMaxPermSize() {
		return maxPermSize;
	}

	public void setMaxPermSize(String maxPermSize) {
		this.maxPermSize = maxPermSize;
	}

	public boolean isDebugJava() {
		return debugJava;
	}

	public void setDebugJava(boolean debugJava) {
		this.debugJava = debugJava;
	}

	public int getDebugPort() {
		return debugPort;
	}

	public void setDebugPort(int debugPort) {
		this.debugPort = debugPort;
	}

	public boolean isDebugSuspend() {
		return debugSuspend;
	}

	public void setDebugSuspend(boolean debugSuspend) {
		this.debugSuspend = debugSuspend;
	}
}

redpajama_set_name: RedPajamaGithub


text:
module SocialStream
  class Ability
    include CanCan::Ability

    # Create a new ability for this user, who is currently representing subject
    def initialize(subject)

      #Download alias action
      alias_action :download, :to => :show

      # Activity Objects
      (SocialStream.objects - [ :actor ]).map{ |obj|
        obj.to_s.classify.constantize
      }.each do |klass|
        can :create, klass do |k| # can :create, Post do |post|
          k._activity_tie.sender_id == subject.actor_id &&
            k._activity_tie.receiver.allow?(subject, 'create', 'activity')
        end

        can :read, klass do |k| # can :read, Post do |post|
          k.post_activity.tie.allow?(subject, 'read', 'activity')
        end

        can :update, klass do |k| # can :update, Post do |post|
          k.post_activity.tie.allow?(subject, 'update', 'activity')
        end

        can :destroy, klass do |k| # can :destroy, Post do |post|
          k.post_activity.tie.sender_id == Actor.normalize_id(subject) ||
            k.post_activity.tie.allow?(subject, 'destroy', 'activity')
        end
      end

      # Activities
      can :create, Activity do |a|
        a.tie.allow?(subject, 'create', 'activity')
      end

      can :read, Activity do |a|
        a.tie.allow?(subject, 'read', 'activity')
      end

      can :update, Activity do |a|
        a.tie.allow?(subject, 'update', 'activity')
      end

      can :destroy, Activity do |a|
        a.tie.allow?(subject, 'destroy', 'activity')
      end

      # Users
      can :read, User

      can :update, User do |u|
        u.represented_by?(subject)
      end

      # Groups
      can :read, Group

      can :create, Group do |g|
        subject.present? &&
          g._founder == subject.slug
      end

      can :update, Group do |g|
        g.represented_by?(subject)
      end

      can :destroy, Group do |g|
        g.represented_by?(subject)
      end

      can :read, Profile

      # Profile
      can :update, Profile do |p|
        p.subject.represented_by?(subject)
      end

      # Privacy
      can [:create, :read, :update, :destroy], Sphere, :actor_id => subject.try(:actor_id)
      can [:create, :read, :update, :destroy], Relation::Custom, :sphere => { :actor_id => subject.try(:actor_id) }
    end
  end
end


text:
\echo --start_ignore
set gp_enable_column_oriented_table=on;
\echo --end_ignore
DROP TABLE IF EXISTS mpp21090_drop_multicol_dml_text;
CREATE TABLE mpp21090_drop_multicol_dml_text(
col1 text,
col2 decimal,
col3 char,
col4 date,
col5 int
)  with (appendonly= true, orientation= column)  DISTRIBUTED by (col3);
INSERT INTO mpp21090_drop_multicol_dml_text VALUES('abcdefghijklmnop',0.00,'a','2014-01-01',0);
SELECT * FROM mpp21090_drop_multicol_dml_text ORDER BY 1,2,3,4;
ALTER TABLE mpp21090_drop_multicol_dml_text DROP COLUMN col1;
ALTER TABLE mpp21090_drop_multicol_dml_text DROP COLUMN col4;
INSERT INTO mpp21090_drop_multicol_dml_text SELECT 1.00,'b',1;
SELECT * FROM mpp21090_drop_multicol_dml_text ORDER BY 1,2,3;
UPDATE mpp21090_drop_multicol_dml_text SET col3='c' WHERE col3 = 'b' AND col5 = 1;
SELECT * FROM mpp21090_drop_multicol_dml_text ORDER BY 1,2,3;
DELETE FROM mpp21090_drop_multicol_dml_text WHERE col3='c';
SELECT * FROM mpp21090_drop_multicol_dml_text ORDER BY 1,2,3;


text:
<?php
/**
 * Created by PhpStorm.
 * User: yuklia
 * Date: 07.05.15
 * Time: 11:40
 */

namespace Application\Tests\Auth;

use Application\Auth\AuthProvider;
use Application\Auth\Row;
use Application\Tests\ControllerTestCase;
use Bluz\Application\Exception\RedirectException;
use Bluz\Proxy\Auth;
use Bluz\Proxy\Db;
use Bluz\Proxy\Messages;

class AuthProviderTest extends ControllerTestCase
{

    protected function setUp()
    {
        parent::setUp();

        Db::insert('users')->setArray(
            [
                'id' => 1,
                'login' => 'Donatello',
                'email' => 'donatello@turtles.org',
                'status' => 'pending'
            ]
        )->execute();

        Db::insert('users')->setArray(
            [
                'id' => 2,
                'login' => 'Bill',
                'email' => 'bill@turtles.org',
                'status' => 'active'
            ]
        )->execute();

        Auth::setIdentity(new \Application\Users\Row());
    }

    protected function tearDown()
    {
        Db::delete('users')->where('id IN (?)', [1, 2])->execute();
        Messages::popAll();
    }

    /**
     * @expectedException \Exception
     */

    public function testProviderNotFound()
    {
        new AuthProvider('fake_data');
    }

    /**
     * @expectedException \Bluz\Auth\AuthException
     */
    public function testUserStatusNotActive()
    {
        $provider = new AuthProvider('Facebook');
        $authRow = new Row();
        $authRow->userId = 1;
        $provider->alreadyRegisteredLogic($authRow);
    }

    public function testUserStatusActive()
    {
        $provider = new AuthProvider('Facebook');
        $provider->setResponse($this->getApp());
        $authRow = new Row();
        $authRow->userId = 2;
        try {
            $provider->alreadyRegisteredLogic($authRow);
        } catch (RedirectException $e) {
        }
        $this->assertNotNull(Auth::getIdentity());

    }

    /**
     * @expectedException \Exception
     */
    public function testFailureHybridProvider()
    {
        $provider = new AuthProvider('olo');
        $this->assertInstanceOf('\Hybrid_Provider_Adapter', $provider->authenticate('olo'));
    }

    public function testOptions()
    {
        $provider = new AuthProvider('Facebook');
        $this->assertNotEmpty($provider->getOptions());
    }

    public function testAvailableProviders()
    {
        $provider = new AuthProvider('Facebook');
        $this->assertContains("Facebook", $provider->getAvailableProviders());
    }
}


text:
package org.lwjgl.opengl;

import java.nio.IntBuffer;

import org.lwjgl.BufferUtils;

import static org.lwjgl.opengl.GL11.*;

/** This class represents the state necessary for render-to-texture. */
public final class RenderTexture {

	// ----------------------------------------------------------------------------------
	// ----------------------------- WGL_ARB_render_texture -----------------------------
	// ----------------------------------------------------------------------------------

	/*
	Accepted by the <piAttributes> parameter of wglGetPixelFormatAttribivARB,
	wglGetPixelFormatAttribfvARB, and the <piAttribIList> and <pfAttribIList>
	parameters of wglChoosePixelFormatARB:
	*/
	private static final int WGL_BIND_TO_TEXTURE_RGB_ARB = 0x2070;
	private static final int WGL_BIND_TO_TEXTURE_RGBA_ARB = 0x2071;

	/*
	Accepted by the <piAttribList> parameter of wglCreatePbufferARB and
	by the <iAttribute> parameter of wglQueryPbufferARB:
	*/
	private static final int WGL_TEXTURE_FORMAT_ARB = 0x2072;
	private static final int WGL_TEXTURE_TARGET_ARB = 0x2073;
	private static final int WGL_MIPMAP_TEXTURE_ARB = 0x2074;

	/*
	Accepted as a value in the <piAttribList> parameter of
	wglCreatePbufferARB and returned in the value parameter of
	wglQueryPbufferARB when <iAttribute> is WGL_TEXTURE_FORMAT_ARB:
	*/
	private static final int WGL_TEXTURE_RGB_ARB = 0x2075;
	private static final int WGL_TEXTURE_RGBA_ARB = 0x2076;

	/*
	Accepted as a value in the <piAttribList> parameter of
	wglCreatePbufferARB and returned in the value parameter of
	wglQueryPbufferARB when <iAttribute> is WGL_TEXTURE_TARGET_ARB:
	*/
	private static final int WGL_TEXTURE_CUBE_MAP_ARB = 0x2078;
	private static final int WGL_TEXTURE_1D_ARB = 0x2079;
	private static final int WGL_TEXTURE_2D_ARB = 0x207A;
	private static final int WGL_NO_TEXTURE_ARB = 0x2077;

	/*
	Accepted by the <piAttribList> parameter of wglSetPbufferAttribARB and
	by the <iAttribute> parameter of wglQueryPbufferARB:
	*/
	static final int WGL_MIPMAP_LEVEL_ARB = 0x207B;
	static final int WGL_CUBE_MAP_FACE_ARB = 0x207C;

	/*
	Accepted as a value in the <piAttribList> parameter of
	wglSetPbufferAttribARB and returned in the value parameter of
	wglQueryPbufferARB when <iAttribute> is WGL_CUBE_MAP_FACE_ARB:
	*/
	static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x207D;
	static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x207E;
	static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x207F;
	static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x2080;
	static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x2081;
	static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x2082;

	/*
	Accepted by the <iBuffer> parameter of wglBindTexImageARB and
	wglReleaseTexImageARB:
	*/
	static final int WGL_FRONT_LEFT_ARB = 0x2083;
	static final int WGL_FRONT_RIGHT_ARB = 0x2084;
	static final int WGL_BACK_LEFT_ARB = 0x2085;
	static final int WGL_BACK_RIGHT_ARB = 0x2086;

	/*
	private static final int WGL_AUX0_ARB = 0x2087;
	private static final int WGL_AUX1_ARB = 0x2088;
	private static final int WGL_AUX2_ARB = 0x2089;
	private static final int WGL_AUX3_ARB = 0x208A;
	private static final int WGL_AUX4_ARB = 0x208B;
	private static final int WGL_AUX5_ARB = 0x208C;
	private static final int WGL_AUX6_ARB = 0x208D;
	private static final int WGL_AUX7_ARB = 0x208E;
	private static final int WGL_AUX8_ARB = 0x208F;
	private static final int WGL_AUX9_ARB = 0x2090;
	*/

	// -------------------------------------------------------------------------------------------
	// ----------------------------- WGL_NV_render_texture_rectangle -----------------------------
	// -------------------------------------------------------------------------------------------

	/*
	Accepted by the <piAttributes> parameter of wglGetPixelFormatAttribivARB,
	wglGetPixelFormatAttribfvARB, and the <piAttribIList> and <pfAttribIList>
	parameters of wglChoosePixelFormatARB:
	*/
	private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = 0x20A0;
	private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = 0x20A1;

	/*
	Accepted as a value in the <piAttribList> parameter of wglCreatePbufferARB
	and returned in the value parameter of wglQueryPbufferARB when
	<iAttribute> is WGL_TEXTURE_TARGET_ARB:
	*/
	private static final int WGL_TEXTURE_RECTANGLE_NV = 0x20A2;

	// ---------------------------------------------------------------------------------------
	// ----------------------------- WGL_NV_render_depth_texture -----------------------------
	// ---------------------------------------------------------------------------------------

	/*
	Accepted by the <piAttributes> parameter of wglGetPixelFormatAttribivARB,
	wglGetPixelFormatAttribfvARB, and the <piAttribIList> and <pfAttribIList>
	parameters of wglChoosePixelFormatARB:
	*/
	private static final int WGL_BIND_TO_TEXTURE_DEPTH_NV = 0x20A3;
	private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = 0x20A4;

	/*
	Accepted by the <piAttribList> parameter of wglCreatePbufferARB and
	by the <iAttribute> parameter of wglQueryPbufferARB:
	*/
	private static final int WGL_DEPTH_TEXTURE_FORMAT_NV = 0x20A5;

	/*
	Accepted as a value in the <piAttribList> parameter of wglCreatePbufferARB
	and returned in the value parameter of wglQueryPbufferARB when
	<iAttribute> is WGL_DEPTH_TEXTURE_FORMAT_NV:
	*/
	private static final int WGL_TEXTURE_DEPTH_COMPONENT_NV = 0x20A6;

	/*
	Accepted by the <iBuffer> parameter of wglBindTexImageARB:
	*/
	static final int WGL_DEPTH_COMPONENT_NV = 0x20A7;

	/** The TEXTURE_1D target. */
	public static final int RENDER_TEXTURE_1D = WGL_TEXTURE_1D_ARB;

	/** The TEXTURE_2D target. */
	public static final int RENDER_TEXTURE_2D = WGL_TEXTURE_2D_ARB;

	/** The TEXTURE_RECTANGLE target. */
	public static final int RENDER_TEXTURE_RECTANGLE = WGL_TEXTURE_RECTANGLE_NV;

	/** The TEXTURE_CUBE_MAP target. */
	public static final int RENDER_TEXTURE_CUBE_MAP = WGL_TEXTURE_CUBE_MAP_ARB;

	IntBuffer pixelFormatCaps;
	IntBuffer pBufferAttribs;

	/**
	 * Creates a RenderTexture object for enabling render-to-texture on a P-buffer.
	 *

	 * NOTE: Only one of useRGB and useRGBA can be true at the same time.
	 *

	 * NOTE: useRGB(A) and useDepth can be true at the same time, thus allowing two different render textures.
	 *

	 * NOTE: The target parameter can be one of the following:
	 *

	 * RENDER_TEXTURE_1D RENDER_TEXTURE_2D RENDER_TEXTURE_RECTANGLE RENDER_TEXTURE_CUBE_MAP
	 *
	 * @param useRGB      - When true the P-buffer can be used as an RGB render texture.
	 * @param useRGBA     - When true the P-buffer can be used as an RGBA render texture.
	 * @param useDepth    - When true the P-buffer can be used as a depth render texture.
	 * @param isRectangle - When true rectangle textures will be allowed on the P-buffer.
	 * @param target      - The texture target of the render texture.
	 * @param mipmaps     - How many mipmap levels to allocate on the P-buffer.
	 */
	public RenderTexture(boolean useRGB, boolean useRGBA, boolean useDepth, boolean isRectangle, int target, int mipmaps) {
		if ( useRGB && useRGBA )
			throw new IllegalArgumentException("A RenderTexture can't be both RGB and RGBA.");

		if ( mipmaps < 0 )
			throw new IllegalArgumentException("The mipmap levels can't be negative.");

		if ( isRectangle && target != RENDER_TEXTURE_RECTANGLE )
			throw new IllegalArgumentException("When the RenderTexture is rectangle the target must be RENDER_TEXTURE_RECTANGLE.");

		pixelFormatCaps = BufferUtils.createIntBuffer(4);
		pBufferAttribs = BufferUtils.createIntBuffer(8);

		if ( useRGB ) {
			pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV : WGL_BIND_TO_TEXTURE_RGB_ARB);
			pixelFormatCaps.put(GL_TRUE);

			pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB);
			pBufferAttribs.put(WGL_TEXTURE_RGB_ARB);
		} else if ( useRGBA ) {
			pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV : WGL_BIND_TO_TEXTURE_RGBA_ARB);
			pixelFormatCaps.put(GL_TRUE);

			pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB);
			pBufferAttribs.put(WGL_TEXTURE_RGBA_ARB);
		}

		if ( useDepth ) {
			pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV : WGL_BIND_TO_TEXTURE_DEPTH_NV);
			pixelFormatCaps.put(GL_TRUE);

			pBufferAttribs.put(WGL_DEPTH_TEXTURE_FORMAT_NV);
			pBufferAttribs.put(WGL_TEXTURE_DEPTH_COMPONENT_NV);
		}

		pBufferAttribs.put(WGL_TEXTURE_TARGET_ARB);
		pBufferAttribs.put(target);

		if ( mipmaps != 0 ) {
			pBufferAttribs.put(WGL_MIPMAP_TEXTURE_ARB);
			pBufferAttribs.put(mipmaps);
		}

		pixelFormatCaps.flip();
		pBufferAttribs.flip();
	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Asparagus with Mushrooms and Fresh Coriander</title>
      <categories>
        <cat>Diabetic</cat>
        <cat>Vegetables</cat>
        <cat>Side dish</cat></categories>
      <yield>6</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>pound</unit></amt>
        <item>Fresh Asparagus;</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Butter; (yea! right!) =OR=-</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Margarine;</item></ing>
      <ing>
        <amt>
          <qty>1/2</qty>
          <unit>pounds</unit></amt>
        <item>Mushrooms; sliced (2 cups)</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Shallots;</item></ing>
      <ing>
        <amt>
          <qty>1/2</qty>
          <unit>teaspoons</unit></amt>
        <item>Salt;</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit/></amt>
        <item>Freshly ground black pepper;</item></ing>
      <ing>
        <amt>
          <qty>4</qty>
          <unit>tablespoons</unit></amt>
        <item>Fresh coriander; chopped</item></ing></ingredients>
    <directions>
      <step>  Trim off tough part of asparagus stalk, about 2 to 3 inches from bottom.
  Use a vegetable peeler to scrap asgaragus to about 1 inch from top. Cut
  asparagus on diagonal into 1 inch pieces. Melt butter in a non stick frying
  pan.  Add mushrooms and cook over high heat, tossing and shaking, until
  mushrooms are lightly browned. Add asparagus. Cook, stirring and tossing
  for about 1 minute. Add shallots, salt and pepper. Sprinkle with coriander.
  Cook for 30 seconds. Food Exchange per serving: 1 VEGETABLE EXCHANGE + 1
  FAT EXCHANGE

  From Gemini's MASSIVE MealMaster collection at www.synapse.com/~gemini

</step></directions></recipe></recipeml>


text:
using namespace Math;

void UIWidget::Init()
{
	AddComponent<RenderingComponent>();

	// Init mesh
	if (!_mesh)
	{
		auto desc = MeshDesc();
		desc.verticesSlots.emplace_back();
		auto& slot = desc.verticesSlots.back();
		slot.verticesCount = 4;

		slot.attribues.push_back(
			MeshVertexSlotAttributeDesc()
			._semantic(VI_ATTRIBUTE_SEMANTIC_POSITION)
			._format(VI_ATTRIBUTE_FORMAT_POSITION));
		slot.stride += RHIFormatSize(VI_ATTRIBUTE_FORMAT_POSITION);
		slot.attribues.push_back(
			MeshVertexSlotAttributeDesc()
			._semantic(VI_ATTRIBUTE_SEMANTIC_UVW)
			._format(VI_ATTRIBUTE_FORMAT_UVW));
		slot.stride += RHIFormatSize(VI_ATTRIBUTE_FORMAT_UVW);

		auto buffer = MakeMemoryBlob((size_t)(slot.stride * slot.verticesCount));
		slot.data = buffer;

		// Write indices data
		desc.indices.push_back(0);
		desc.indices.push_back(1);
		desc.indices.push_back(2);

		desc.indices.push_back(0);
		desc.indices.push_back(2);
		desc.indices.push_back(3);

		// Create mesh
		_mesh = std::make_shared<Mesh>();
		_mesh->Init(desc);

		UpdateMeshData();
	}
	GetComponent<RenderingComponent>()->SetMesh(_mesh);

	// Init material
	// Color only
	{
		auto uiMaterialTemplate = MaterialTemplate::Get("UIMaterial_ColorOnly");
		if (!uiMaterialTemplate)
		{
			// Init ui material template
			uiMaterialTemplate = MaterialTemplate::Create("UIMaterial_ColorOnly");
			ASSERT(uiMaterialTemplate);

			auto colorVar = uiMaterialTemplate->NewVariable("color", MATERIAL_VAR_TYPE_SCALAR, 4);

			auto colorVarOP = uiMaterialTemplate->CreateOperator<MaterialTemplateOpScalarVariable>();
			colorVarOP->varID = colorVar->ID();
			uiMaterialTemplate->BaseColorSlot().op = colorVarOP;

			auto opacityOP = uiMaterialTemplate->CreateOperator<MaterialTemplateOpSelector>();
			opacityOP->SetConnector(colorVarOP, RHI_COLOR_CHANNEL_INDEX_A, RHI_COLOR_CHANNEL_INDEX_R);
			uiMaterialTemplate->OpacitySlot().op = opacityOP;
		}

		ASSERT(uiMaterialTemplate);
		_colorMaterial = uiMaterialTemplate->CreateInstance();
	}

	GetComponent<RenderingComponent>()->SetMaterial(_colorMaterial);

	SetLayout(UI_LAYOUT_FLEX);
}

Ptr<UIRoot> UIWidget::GetUIRoot() const
{
	auto parent = GetParent();
	if (parent && parent->Is<UIRoot>())
	{
		return std::static_pointer_cast<UIRoot>(parent);
	}
	else if(parent && parent->Is<UIWidget>())
	{
		return parent->As<UIWidget>()->GetUIRoot();
	}
	else
	{
		return nullptr;
	}
}

void UIWidget::SetPosition(const Math::float2& pos)
{
	if ( !pos.Equal(GetPosition()) )
	{
		_position = pos;
		auto transform = GetComponent<SceneComponent>()->Transform();
		transform.Translation(float3(_position.x(), _position.y(), 0.0f));
		GetComponent<SceneComponent>()->Transform(transform);
	}
}
Math::float2 UIWidget::GetPosition() const
{
	return _position;
}

Math::float2 UIWidget::GetScreenPosition() const
{
	auto pos = float2(0, 0);

	auto sceneCom = GetComponent<SceneComponent>();
	auto worldTransform = sceneCom->WorldTransform();
	pos = worldTransform.TransformCoord(float3(pos.x(), pos.y(), 0.0f));

	auto root = GetUIRoot();
	if (root)
		pos = root->WorldToScreenPos(pos);

	return pos;
}

void UIWidget::SetSize(const Math::float2& size)
{
	if (!_size.Equal(size))
	{
		_size = size;
		UpdateMeshData();

		if (_layout)
			_layout->Layout();
	}
}
Math::float2 UIWidget::GetSize() const
{
	return _size;
}

Math::Rect UIWidget::GetRect() const
{
	auto min = float2(0, 0);
	auto max = min + GetSize();

	auto sceneCom = GetComponent<SceneComponent>();
	auto worldTransform = sceneCom->WorldTransform();
	min = worldTransform.TransformCoord(float3(min.x(), min.y(), 0.0f));
	max = worldTransform.TransformCoord(float3(max.x(), max.y(), 0.0f));

	Rect rect;
	rect._min = MinVec(min, max);
	rect._max = MaxVec(min, max);

	return rect;
}

void UIWidget::UpdateMeshData()
{
	if (!_mesh)
		return;

	auto buffer = _mesh->Desc().verticesSlots[0].data;

	auto writer = MemoryBufferWriter(buffer.Pointer());

	float3 scale = float3(_size.x(), _size.y(), 1.0f);

	// Write vertices data
	// In screen space, left up origin, X axis point to right and Y axis point to down
	// left up
	// position
	writer.Write(float3(0, 0, 0));
	// uvw
	writer.Write(float3(0, 0, 0));

	// right up
	// position
	writer.Write(float3(1, 0, 0) * scale);
	// uvw
	writer.Write(float3(1, 0, 0));

	// right bottom
	// position
	writer.Write(float3(1, 1, 0) * scale);
	// uvw
	writer.Write(float3(1, 1, 0));

	// left bottom
	// position
	writer.Write(float3(0, 1, 0) * scale);
	// uvw
	writer.Write(float3(0, 1, 0));

	// Update rendering data
	_mesh->ResetRenderingData();
}

void UIWidget::PrepareRendering()
{
	// Compute composite alpha
	_compositeAlpha = alpha;
	auto parent = GetParent();
	if (parent && parent->Is<UIWidget>())
	{
		_compositeAlpha *= parent->As<UIWidget>()->_compositeAlpha;
	}

	// Set material's param
	auto material = GetComponent<RenderingComponent>()->GetMaterial().lock();
	if (material)
	{
		auto var = material->GetVariable("color");
		if (var)
		{
			var->AsScalar()->value = bgColor;
		}
	}

	GetComponent<RenderingComponent>()->PrepareRendering();
}

void UIWidget::Render(const Ptr<RenderView>& view)
{
	if (!view || !view->target)
		return;

	auto renderingCom = GetComponent<RenderingComponent>();
	if (renderingCom
		&& !renderingCom->GetMesh().expired()
		&& !renderingCom->GetMaterial().expired())
	{
		auto pass = RHIRenderPass::Find("UIRenderer");
		ASSERT(pass);
		auto pipeline = RHIGraphicsPipeline::Find("UIRenderer",
		{
			renderingCom->GetMesh().lock(),
			renderingCom->GetMaterial().lock()
		});
		ASSERT(pipeline);

		pass->Begin({ view->target }, int3(0), false);
		pipeline->Bind();

		// Bind view
		view->BindRendering(pipeline);

		// Bind rendering component
		renderingCom->BindRendering(pipeline);

		pipeline->UpdateDescriptorBindings();

		//Draw mesh
		RHI::Device->MainCmdBuffer()->CmdDraw(renderingCom->GetMesh().lock()->RenderingData());

		pass->End();
	}
}

void UIWidget::TriggerEnter()
{
	_onEnterEvent();
}
void UIWidget::TriggerExit()
{
	_onExitEvent();
}
void UIWidget::TriggerMouseButtonDown()
{
	_onMouseDownEvent();
}
void UIWidget::TriggerMouseButtonUp()
{
	_onMouseUpEvent();
}
void UIWidget::TriggerClick()
{
	_onClickEvent();
}

void UIWidget::SetLayout(UILayoutType layoutType)
{
	if (_layout && _layout->GetLayoutType() == layoutType)
		return;

	switch (layoutType)
	{
	case UI_LAYOUT_DUMMY:
	{
		_layout = std::make_shared<UILayout>();
	}
		break;
	case UI_LAYOUT_FLEX:
	{
		_layout = std::make_shared<UIFlexLayout>();
	}
		break;
	default:
		ASSERT(false);
		break;
	}

	if (_layout)
	{
		_layout->SetWidget(this);
		_layout->Layout();
	}
}

void UIWidget::AddChild(const Ptr<Actor>& actor)
{
	Actor::AddChild(actor);

	if(_layout)
		_layout->Layout();
}

void UIWidget::RemoveChild(const Ptr<Actor>& actor)
{
	Actor::RemoveChild(actor);

	if(_layout)
		_layout->Layout();
}


text:
    - remove abstract class Map
    - remove Types.scala
    - simplified FieldValue.scala

# v0.2.2 some simplifications:
    delete Board.scala, InformationForShot + ShotResult -> Types.scala, ShipType + Direction -> Ship.scala, HitType -> FieldValue.scala

# v0.2.1 some simplifications:
    delete Board.scala, InformationForShot + ShotResult -> Types.scala, ShipType + Direction -> Ship.scala, HitType -> FieldValue.scala

# v0.2 modifications to 'Coordinate.scala'

- simplify method 'Coordinate.fromIndex' from recursive approach to a more concise mathematical way

      def fromIndex(index: Int, dimLetters: Int) : Coordinate = {
        def lineToCoordinateRecursive(indexCurrent: Int, dimensionDigitsCounter: Int) : Coordinate = {
          if (indexCurrent < dimLetters)
            new Coordinate(indexCurrent, dimensionDigitsCounter)
          else
            lineToCoordinateRecursive(indexCurrent - dimLetters, dimensionDigitsCounter + 1)
        }
        lineToCoordinateRecursive(indexCurrent = index, dimensionDigitsCounter = 0)
      }

      ===>

      def fromIndex(index: Int, dimLetters: Int) = Coordinate(index / dimLetters, index % dimLetters)


text:
export * from './equal.pipe';
export * from './group-by.pipe';


text:
@interface ImagePreviewViewController : UIViewController

// Sets the displayed image to |data|.
- (void)updateImageData:(NSData*)data;

@end

#endif  // IOS_CHROME_BROWSER_UI_CONTEXT_MENU_IMAGE_PREVIEW_VIEW_CONTROLLER_H_


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('main', '0018_form'),
    ]

    operations = [
        migrations.AddField(
            model_name='form',
            name='name',
            field=models.CharField(default='1', max_length=200),
            preserve_default=False,
        ),
    ]


text:
{
  jest.resetModules();
  reactProdInvariant = require("reactProdInvariant");
}


text:
package web

import (
	"time"

	"github.com/gin-gonic/gin"
)

//Model base model
type Model struct {
	ID        uint      `gorm:"primary_key" json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

//Link link model
type Link struct {
	Href  string `json:"href"`
	Label string `json:"label"`
}

//OK success return
var OK = gin.H{"ok": true}


text:
using A4CoreBlog.Data.Common.Models;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace A4CoreBlog.Data.Models
{
    public class Post : DescribableEntity
    {
        private ICollection<PostComment> _comments;

        public Post()
        {
            _comments = new HashSet<PostComment>();
        }

        [Key]
        public int Id { get; set; }
        public int BlogId { get; set; }
        public virtual Blog Blog { get; set; }
        public string AuthorId { get; set; }
        public virtual User Author { get; set; }

        public virtual ICollection<PostComment> Comments
        {
            get => _comments;
            set => _comments = value;
        }
    }
}


text:
#ifndef VCOS_STRING_H
#define VCOS_STRING_H

/**
  * \file
  *
  * String functions.
  *
  */

#ifdef __cplusplus
extern "C" {
#endif

#include <stdlib.h> // For size_t
#include "interface/vcos/vcos_types.h"
#include "vcos_platform.h"

/** Case insensitive string comparison.
  *
  */

VCOS_INLINE_DECL
int vcos_strcasecmp(const char *s1, const char *s2);

VCOS_INLINE_DECL
int vcos_strncasecmp(const char *s1, const char *s2, size_t n);

VCOSPRE_ int VCOSPOST_ vcos_snprintf(char *buf, size_t buflen, const char *fmt, ...);

#ifdef __cplusplus
}
#endif
#endif


text:
package org.kie.workbench.common.stunner.bpmn.client.forms.fields.variablesEditor;

import org.jboss.errai.ui.client.widget.HasModel;
import org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.Variable.VariableType;
import org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.VariableRow;
import org.kie.workbench.common.stunner.bpmn.client.forms.util.ListBoxValues;

public interface VariableListItemWidgetView extends HasModel<VariableRow> {

    String CUSTOM_PROMPT = "Custom" + ListBoxValues.EDIT_SUFFIX;
    String ENTER_TYPE_PROMPT = "Enter type" + ListBoxValues.EDIT_SUFFIX;

    void init();

    void setParentWidget(final VariablesEditorWidgetView.Presenter parentWidget);

    void notifyModelChanged();

    void setDataTypes(final ListBoxValues dataTypeListBoxValues);

    VariableType getVariableType();

    String getDataTypeDisplayName();

    void setDataTypeDisplayName(final String dataTypeDisplayName);

    String getCustomDataType();

    void setCustomDataType(final String customDataType);

    void setReadOnly(final boolean readOnly);
}


text:
Register

    <form action="" method="POST" [formGroup]="registerForm" (ngSubmit)="register()">
      <md-input-container>
        <input md-input name="email" id="email" [formControl]="email" placeholder="Email">
      </md-input-container>

email can not be shorter than 5 characters.

email is required.

email has not hasBlackWord.

      <md-input-container>
        <input md-input name="email" type="password" name="password" id="password" [formControl]="password"
               placeholder="Password">
      </md-input-container>

The password is required.

      <button [disabled]="!registerForm.valid" md-button color="primary" type="button">Register</button>
    </form>


text:
package main

import (
	"context"
	"database/sql"
	"fmt"

	models "github.com/xo/xo/_examples/northwind/oracle"
)

func runOracle(ctx context.Context, db *sql.DB) error {
	p, err := models.ProductByProductID(ctx, db, 16)
	if err != nil {
		return err
	}
	fmt.Printf("product %d: %q\n", p.ProductID, p.ProductName)
	return nil
}


text:
`amoc_coordinator`

## Description

This module allows to synchronize the users and act on groups of them.

The coordinator reacts to new users showing up in a system, according to the *Coordination Plan*.
The *Coordination Plan* consists of *Coordination Items*, and each of them is defined as one of the following: `{NumberOfUsers, CoordinationActions}`.
 - When the `NumberOfUsers` is set to `all`, then only *Coordination Actions* with the arities `/1, /2` are handled.
 The *Coordination Items* with `all` are triggered by the `timeout` event type.
 - When the `NumberOfUsers` is set to a positive integer, all *Coordination Actions* with arities `/1, /2` and `/3` are handled.

The timeout timer is reset by calling the `add` function.
A new batch size is set in the `NumberOfUsers`. Each user in the batch calls the `add` function registering to the coordinator and triggering the *Coordination Plan*.
If more then one of the *Coordination Items* matching the `NumberOfUsers` is triggered, each of them will be passed a respective number of users.
For example if the *Coordination Plan* is `[{2, Act1}, {3, Act2}]` then on the 6th user calling `add`, `Act1` will be called with 2 users passed and `Act2` will be called with 3 users passed.

*Coordination Actions* may be one of the following:
 - `fun(Event) -> any()` - this type of action does not care about particular users, but only about the number of them;
 - `fun(Event, ListOfUsersData) -> any()` - this type of action gets `ListOfUsersData` which is a list of `{Pid, Data}` tuples with `Pid`s passed by users calling `amoc_coordinator:add/2` or `amoc_coordinator:add/3`;
- `fun(Event, User1, User2) -> any()` - this type of action gets `distinct pairs` from the batch of users `User1` and `User2` which are `{Pid, Data}` tuples with `Pid`s passed by users calling `amoc_coordinator:add/2` or `amoc_coordinator:add/3`;

where an `Event` is a `{EventType, NumOfUsers}` tuple, in which `NumOfUsers` is the number of users passed to the event.

The order of *Coordination Actions* execution is not guaranteed.
It's guaranteed that all the *Coordination Actions* with `all` are executed after all numbered *Coordination Actions* are done.

`distinct pairs` - in the context, these are pairs from a given collection of users, where:
 - when `{A, B}` is in the `distinct pairs` then `{B, A}` is not;
 - `{A, A}` is not in the `distinct pairs`;
 - all pairs are distinct;
 - Eg. for `[a]`, the `distinct pairs` collection is `[{a, undefined}]`;
 - Eg. for `[a, b]`, the `distinct pairs` collection is `[{a, b}]`;
 - Eg. for `[a, b, c]`, the `distinct pairs` collection is `[{a, b}, {a, c}, {b, c}]`.

## Exports

#### `start(CoordinatorName, CoordinationPlan) -> ok | error`
#### `start(CoordinatorName, CoordinationPlan, Timeout) -> ok | error`

##### Types
```erlang
CoordinatorName :: atom()
CoordinationPlan  :: [ CoordinationItem ]
CoordinationItem :: {NumberOfUsers :: pos_integer() | all, CoordinationActions}
CoordinationActions :: [ CoordinationActions ] | CoordinationAction
CoordinationAction ::
    fun(Event) -> any() |
    fun(Event, ListOfUsersData) -> any() |
    fun(Event, MaybeUser, MaybeUser) -> any()
Event :: {EventType, NumOfUsers}
EventType :: coordinate | timeout | stop | reset
NumOfUsers :: non_neg_integer()
ListOfUsersData :: [ User ]
MaybeUser :: undefined | User
User :: {UsersPid :: pid(), Data :: any()}
Timeout :: pos_integer() | infinity
```

This function starts a coordinator. Usually is called in `init/0` of a amoc scenario.

#### `add(CoordinatorName, Data) -> ok`
#### `add(CoordinatorName, Pid, Data) -> ok`

##### Types
```erlang
CoordinatorName :: atom()
UsersPid :: pid()
Data :: any()
```

This function adds the current process data. It is usually called in `start/2` of a amoc scenario.

## Example

This scenario will demonstrate how do the `users` interact with `amoc_coordinator`:

```erlang
-module(example).

-export([init/0]).
-export([start/2]).

init() ->
    Plan = [
        {2, fun(Event) ->
                io:fwrite("Two new users showed up: Event = ~p\n", [Event])
            end},
        {2, fun(Event, ListOfUsers) ->
                io:fwrite("Two new users showed up: Event = ~p; ListOfUsers = ~p\n", [Event, ListOfUsers]),
                [ Pid ! {hello, Data} || {Pid, Data} <- ListOfUsers]
            end},
        {2, fun(Event, User1, User2) ->
                io:fwrite("Two new users showed up: Event = ~p; User1 = ~p; User2 = ~p\n", [Event, User1, User2])
            end},

        {3, fun(_Event) ->
                io:fwrite("Three new users showed up\n", [])
            end},
        {all, fun(Event) ->
                io:fwrite("All users have called amoc_coordinator:add in Event = ~p\n", [Event])
            end}

    ],
    Settings = [setting1, {setting2, something}],
    amoc_coordinator:start(?MODULE, Plan),
    {ok, Settings}.

start(Id, _Settings) ->
    io:fwrite("User = ~p\n", [Id]),
    amoc_coordinator:add(?MODULE, Id),
    receive
        Msg ->
            io:fwrite("{Msg = ~p, Id = ~p\n", [Msg, Id])
    end,
    ok.
```

To run it:

```bash
$ make rel
$ _build/default/rel/amoc/bin/amoc console

1> amoc:do(example, 5, []).
```

Filtered, formated and explained output:

```erlang
User = 1  % First user is started

ok  % result of calling amoc:do/3

User = 2 % First user is started

% We have 2 users added to amoc_coordinator so all of actions {2, _} are triggered:
Two new users showed up: Event = {coordinate,2}; User1 = {<0.1142.0>,2}; User2 = {<0.1140.0>,1}
% This action triggers sending {hello,Id} to the users 1 and 2
Two new users showed up: Event = {coordinate,2}; ListOfUsers = [{<0.1142.0>,2},{<0.1140.0>,1}]
Two new users showed up: Event = {coordinate,2}

% Users 1 and 2 received messages and print them:
{Msg = {hello,2}, Id = 2
{Msg = {hello,1}, Id = 1

User = 3
% We have 3 users added to amoc_coordinator so all of the {3, _} actions are triggered:
Three new users showed up

User = 4
% We have 4 and 4 rem 2 == 0 therefore users added to amoc_coordinator so all of the {3, _} actions are triggered:
Two new users showed up: Event = {coordinate,2}; User1 = {<0.1144.0>,4}; User2 = {<0.1143.0>,3}
Two new users showed up: Event = {coordinate,2}; ListOfUsers = [{<0.1144.0>,4},{<0.1143.0>,3}]
Two new users showed up: Event = {coordinate,2}

{Msg = {hello,4}, Id = 4
{Msg = {hello,3}, Id = 3
User = 5

% You need to wait for a while, and ...
% Timeout has been reached, which triggers all of the Coordination Actions with the remaining number of users.
Three new users showed up
Two new users showed up: Event = {timeout,1}; User1 = {<0.1139.0>,5}; User2 = undefined
Two new users showed up: Event = {timeout,1}; ListOfUsers = [{<0.1139.0>,5}]
{Msg = {hello,5}, Id = 5
Two new users showed up: Event = {timeout,1}
All users have called amoc_coordinator:add in Event = {timeout,5}
```


text:
/*
 * ModalEraseCustomer Messages
 *
 * This contains all the text for the ModalEraseCustomer component.
 */
import { defineMessages } from 'react-intl';

export default defineMessages({
  header: {
    id: 'app.components.ModalEraseCustomer.header',
    defaultMessage: 'This is the ModalEraseCustomer component !',
  },
  content: {
    id: 'app.components.ModalEraseCustomer.content',
    defaultMessage: '¿ Seguro de borrar este Customer ?',
  },
});


text:
<Error>
	<ErrorStatus>1</ErrorStatus>
	<Status>1</Status>
	<ErrorMessage><![CDATA[$var['error']]]></ErrorMessage>
	<StatusMessage><![CDATA[Messaggio non accettato - E' stato superato il numero di messaggi massimo giornaliero spediti dal tuo IP. Per ridurre la possibilità di spam, il tuo messaggio e stato bloccato.  ]]></StatusMessage>
</Error>

<title>Spam Intercettato</title>BgColor" text="$this->TextColor" link="$this->LinkColor" vlink="$this->VlinkColor" alink="$this->LinkColor">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

<LINK href="javascript/style$this->browser.css" rel="stylesheet" type="text/css">

Messaggio non accettato

E' stato superato il numero di messaggi massimo giornaliero spediti dal tuo IP. Per ridurre la possibilità di spam, il tuo messaggio e stato bloccato.

Contatta il tuo amministratore di posta ($this->admin_email) per assistenza.