text:
package org.openrtb.common.json;

import static org.junit.Assert.assertEquals;

import java.io.IOException;

import org.junit.Test;
import org.openrtb.common.model.Identification;

/**
 * Verifies the {@link Identification} object's translation to/from JSON.
 */
public class IdentificationJsonTranslatorTest {

    private static final Identification IDENT;
    static {
        IDENT = new Identification("The_DSP", System.currentTimeMillis());
        IDENT.setToken("4a49b3cab1374931bbb0a5af11eeef43");
    }

    private static final String PRETTY_VALUE =
        "{\n" +
        "  \"organization\" : \""+IDENT.getOrganization()+"\",\n" +
        "  \"timestamp\" : "+IDENT.getTimestamp()+",\n" +
        "  \"token\" : \""+IDENT.getToken()+"\"\n" +
        "}\n";

    private static final String EXPECTED_VALUE = PRETTY_VALUE.replaceAll("[ \n]", "");

    AbstractJsonTranslator<Identification> test = new IdentificationJsonTranslator();

    public static void validateObject(Identification expectedValue, Identification actualValue) {
        assertEquals("unable to deserialize the organization value",
                     expectedValue.getOrganization(), actualValue.getOrganization());
        assertEquals("unable to deserialize the timestamp value",
                     expectedValue.getTimestamp(), actualValue.getTimestamp());
        assertEquals("unable to deserialize the token value",
                     expectedValue.getToken(), actualValue.getToken());
    }

    @Test
    public void serializeObject() throws Exception {
        assertEquals(EXPECTED_VALUE, test.toJSON(IDENT));
    }

    @Test
    public void deserializeObject() throws Exception {
        validateObject(IDENT, test.fromJSON(EXPECTED_VALUE));
    }

    @Test
    public void serializeEmptyObject() throws IOException {
        assertEquals("{}", test.toJSON(new Identification()));
    }

    @Test
    public void deserializeEmptyObject() throws IOException {
        validateObject(new Identification(), test.fromJSON("{}"));
    }

    /**
     * This class is used internally for the test to verify the serialization
     * and de-serialization of the {@link Identification} object to and from
     * JSON.
     *
     * @see AbstractJsonTranslator
     */
    private static class IdentificationJsonTranslator extends AbstractJsonTranslator<Identification> {
        public IdentificationJsonTranslator() {
            super(IdentificationJsonTranslator.class);
        }
    }
}


text:
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Genesis.idlib.Models;

namespace Genesis.idlib.Data
{
    public class AppUserLoginMap{

        public AppUserLoginMap(EntityTypeBuilder<IdentityUserLogin<long>> entityBuilder)
        {
             entityBuilder.ToTable("AspNetUserLogins");
             entityBuilder.HasKey(e=> new {e.ProviderKey, e.LoginProvider});
             entityBuilder.Property(e=>e.UserId).IsRequired();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package VMOMI::HostGraphicsConfigSharedPassthruAssignmentPolicy;
use parent 'VMOMI::SimpleType';

use strict;
use warnings;

1;


text:
layout: page
title: "About"
subheadline: "Get to know Trisha Andrews"
show_meta: false
teaser: "Everything you wanted to know about me, your resident data scientist and blogger"
permalink: "/about/"
#header:
#    image_fullwidth: "header_drop.jpg"
---
<img src="../images/trisha_photo.JPG" alt="My photo" style="width: 300px;">

I'm Trisha, and I like numbers, robots, and music. In order to further the first (and possibly second) of those passions, I've moved to NYC for the summer to attend an immersive data science bootcamp at Metis. I'm here to fill in the gaps in my statistical knowledge while broadening and reinforcing my knowledge of coding and machine learning.

Prior to this summer, I was living in Colorado, where I had originally moved in order to attend Colorado College (aka CC). At CC, I got a BA in computer science and nearly double majored in chemistry, but I became increasingly involved in my violin and other ensembles, so I decided to pick up a music minor instead. My favorite CS class was machine learning, and I did an internship at Texas Tech University after my junior year, where I focused on knowledge representation and reasoning for mobile autonomous robots, and, back at CC, my senior year project made use of a ROS Turtlebot2 robot.

After my graduation in May 2014, I spent some time traveling, playing violin, and working with the [Bowed Piano Ensemble][1], which I have been a member of for four years. Now I'm looking forward to learning more about data science and pursuing a career where I get to generate insights by playing with numbers all day. If you want to chat, feel free to [message me][2] or check out any of the links at the bottom of the page.

 [1]: https://www.youtube.com/watch?v=JJJoUb4wOeU
 [2]: mailto:andrews.trisha.a@gmail.com


text:
package com.jummyshapefile.shp;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.jummyshapefile.shapefile.model.Geometry;
import com.jummyshapefile.shapefile.model.MultiPoint;
import com.jummyshapefile.shapefile.model.NullShape;
import com.jummyshapefile.shapefile.model.Point;
import com.jummyshapefile.shapefile.model.Polygon;
import com.jummyshapefile.shapefile.model.Polyline;
import com.jummyshapefile.utils.ByteUtils;

/**
 * Class that reads a geometry in a record of a SHP file.
 *

 * Takes into account only the following shape types (defined by the ESRI
 * Shapefile format):
 *

 *
0 Null shape
 *
1 Point
 *
3 Polyline
 *
5 Polygon
 *
8 MultiPoint
 *

 * For more field types, see the documentation:
 *

 * https://en.m.wikipedia.org/wiki/Shapefile
 *
 * @see Geometry
 */
public class SHPGeometryReader {
	/**
	 * Returns a Geometry object representing the byte array.
	 *
	 * @param data
	 *            the byte array representing the geometry
	 *
	 * @return a Geometry object representing the byte array
	 * @throws IOException
	 *             if there is a problem reading the geometry
	 *
	 * @see Geometry
	 */
	public Geometry readGeometry(final byte[] data, final int geometryType)
			throws IOException {
		Geometry output = null;

		if (data == null) {
			throw new IllegalArgumentException("The byte array is null");
		}

		switch (geometryType) {
		case 0:
			output = readNullShape(data,
					SHPParameters.SHP_RECORDHEADER_SHAPETYPE_SIZE);
			break;
		case 1:
			output = readPoint(data,
					SHPParameters.SHP_RECORDHEADER_SHAPETYPE_SIZE);
			break;
		case 3:
			output = readPolyline(data,
					SHPParameters.SHP_RECORDHEADER_SHAPETYPE_SIZE);
			break;
		case 5:
			output = readPolygon(data,
					SHPParameters.SHP_RECORDHEADER_SHAPETYPE_SIZE);
			break;
		case 8:
			output = readMultiPoint(data,
					SHPParameters.SHP_RECORDHEADER_SHAPETYPE_SIZE);
			break;
		default:
			throw new UnsupportedOperationException(
					"Geometry type not allowed (not implemented): "
							+ geometryType);
		}

		return output;
	}

	/**
	 * Reads a null shape from a byte array.
	 *
	 * @param data
	 *            the byte array
	 * @param offset
	 *            the initial offset in the byte array
	 *
	 * @return a NullShape object representing the byte array
	 * @throws IOException
	 *             if there is a problem reading the null shape
	 *
	 * @see Geometry
	 * @see NullShape
	 */
	private Geometry readNullShape(final byte[] data, final int offset)
			throws IOException {
		final Geometry output = new NullShape();

		if (data == null) {
			throw new IllegalArgumentException("The byte array is null");
		}

		return output;
	}

	/**
	 * Reads a point from a byte array.
	 *
	 * @param data
	 *            the byte array
	 * @param offset
	 *            the initial offset in the byte array
	 *
	 * @return a Point object representing the byte array
	 * @throws IOException
	 *             if there is a problem reading the point
	 *
	 * @see Geometry
	 * @see Point
	 */
	private Geometry readPoint(final byte[] data, final int offset)
			throws IOException {
		final Point output = new Point();

		if (data == null) {
			throw new IllegalArgumentException("The byte array is null");
		}

		int off = offset;

		output.setX(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		output.setY(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));

		output.setMinX(output.getX());
		output.setMinY(output.getY());
		output.setMaxX(output.getX());
		output.setMaxY(output.getY());

		return output;
	}

	/**
	 * Reads a polyline from a byte array.
	 *
	 * @param data
	 *            the byte array
	 * @param offset
	 *            the initial offset in the byte array
	 *
	 * @return a Polyline object representing the byte array
	 * @throws IOException
	 *             if there is a problem reading the polyline
	 *
	 * @see Geometry
	 * @see Polyline
	 */
	private Geometry readPolyline(final byte[] data, final int offset)
			throws IOException {
		final Polyline output = new Polyline();

		if (data == null) {
			throw new IllegalArgumentException("The byte array is null");
		}

		int off = offset;

		output.setMinX(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		output.setMinY(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		output.setMaxX(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		output.setMaxY(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		final int numberOfParts = ByteUtils.readIntLeastSignificantFirst(data,
				SHPParameters.SHP_INT_LENGTH, off);
		off += SHPParameters.SHP_INT_LENGTH;

		final int numberOfPoints = ByteUtils.readIntLeastSignificantFirst(data,
				SHPParameters.SHP_INT_LENGTH, off);
		off += SHPParameters.SHP_INT_LENGTH;

		final int[] partsArray = new int[numberOfParts];
		for (int i = 0; i < numberOfParts; i++) {
			final int numPointsPart = ByteUtils.readIntLeastSignificantFirst(
					data, SHPParameters.SHP_INT_LENGTH, off);
			off += SHPParameters.SHP_INT_LENGTH;
			partsArray[i] = numPointsPart;
		}

		final List<List<Point>> parts = new ArrayList<List<Point>>();
		int numberOfPointsRead = 0;

		for (int i = 0; i < partsArray.length; i++) {
			final List<Point> points = new ArrayList<Point>();

			int numberOfPointsInPart = numberOfPoints - numberOfPointsRead;
			if (i < partsArray.length - 1) {
				numberOfPointsInPart = partsArray[i + 1] - partsArray[i];
			}

			for (int j = 0; j < numberOfPointsInPart; j++) {
				points.add((Point) readPoint(data, off));
				numberOfPointsRead++;
				off += 2 * SHPParameters.SHP_DOUBLE_LENGTH;
			}

			parts.add(points);
		}

		output.setParts(parts);

		return output;
	}

	/**
	 * Reads a polygon from a byte array.
	 *
	 * @param data
	 *            the byte array
	 * @param offset
	 *            the initial offset in the byte array
	 *
	 * @return a Polygon object representing the byte array
	 * @throws IOException
	 *             if there is a problem reading the polygon
	 *
	 * @see Geometry
	 * @see Polygon
	 */
	private Geometry readPolygon(final byte[] data, final int offset)
			throws IOException {
		final Polygon output = new Polygon();

		if (data == null) {
			throw new IllegalArgumentException("The byte array is null");
		}

		final Polyline polyline = (Polyline) readPolyline(data, offset);
		output.setMinX(polyline.getMinX());
		output.setMinY(polyline.getMinY());
		output.setMaxX(polyline.getMaxX());
		output.setMaxY(polyline.getMaxY());
		output.setParts(polyline.getParts());

		return output;
	}

	/**
	 * Reads a multipoint from a byte array.
	 *
	 * @param data
	 *            the byte array
	 * @param offset
	 *            the initial offset in the byte array
	 *
	 * @return a MultiPoint object representing the byte array
	 * @throws IOException
	 *             if there is a problem reading the multipoint
	 *
	 * @see Geometry
	 * @see MultiPoint
	 */
	private Geometry readMultiPoint(final byte[] data, final int offset)
			throws IOException {
		final MultiPoint output = new MultiPoint();

		if (data == null) {
			throw new IllegalArgumentException("The byte array is null");
		}

		int off = offset;

		output.setMinX(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		output.setMinY(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		output.setMaxX(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		output.setMaxY(ByteUtils.readDoubleLeastSignificantFirst(data,
				SHPParameters.SHP_DOUBLE_LENGTH, off));
		off += SHPParameters.SHP_DOUBLE_LENGTH;

		final int numberOfPoints = ByteUtils.readIntLeastSignificantFirst(data,
				SHPParameters.SHP_INT_LENGTH, off);
		off += SHPParameters.SHP_INT_LENGTH;

		final List<Point> points = new ArrayList<Point>();

		for (int i = 0; i < numberOfPoints; i++) {
			points.add((Point) readPoint(data, off));
			off += 2 * SHPParameters.SHP_DOUBLE_LENGTH;
		}

		output.setPoints(points);

		return output;
	}
}


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

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
org.apache.wicket.util.convert.converter (Wicket Parent 1.5.7 API)
</TITLE>

<META NAME="keywords" CONTENT="org.apache.wicket.util.convert.converter package">

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

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package org.apache.wicket.util.convert.converter

Default converter implementations.

See:

          Description

Class Summary

AbstractConverter<C>
Base class for locale aware type converters.

AbstractDecimalConverter<N extends Number>
Base class for all number converters.

AbstractIntegerConverter<I extends Number>
Base class for all number converters.

AbstractNumberConverter<N extends Number>
Base class for all number converters.

BigDecimalConverter
BigDecimal converter

 see IConverter

BooleanConverter
Converts from Object to Boolean.

ByteConverter
Converts from Object to Byte.

CalendarConverter
Converts to Calendar.

CharacterConverter
Converts from Object to Character.

DateConverter
Converts from Object to Date.

DoubleConverter
Converts from Object to Double.

FloatConverter
Converts from Object to Float.

IntegerConverter
Converts from Object to Integer.

LongConverter
Converts from Object to Long.

ShortConverter
Converts from Object to Short.

SqlDateConverter
Converts to Date.

SqlTimeConverter
Converts to Time.

SqlTimestampConverter
Converts to Timestamp.

ZeroPaddingIntegerConverter
Converts from Object to Integer, adding zero-padding.

Package org.apache.wicket.util.convert.converter Description

Default converter implementations.

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.


text:
<!DOCTYPE HTML>
<html>
  <head>
    <style>
      body { color: green }
    </style>
    <link rel="stylesheet"
          href="data:text/css,@media no-such-medium { body { color: red } }"
          type="text/css">
    <link rel="stylesheet"
          href="data:text/css,@media no-such-medium { body { color: red } }"
          type="text/css">
    <script>
      // Force cloning of the second linked sheet
      document.styleSheets[2].cssRules[0];
    </script>
  </head>
  <body>test</body>
</html>


text:
#include <aws/quicksight/model/Parameters.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Utils::Json;
using namespace Aws::Utils;

namespace Aws
{
namespace QuickSight
{
namespace Model
{

Parameters::Parameters() :
    m_stringParametersHasBeenSet(false),
    m_integerParametersHasBeenSet(false),
    m_decimalParametersHasBeenSet(false),
    m_dateTimeParametersHasBeenSet(false)
{
}

Parameters::Parameters(JsonView jsonValue) :
    m_stringParametersHasBeenSet(false),
    m_integerParametersHasBeenSet(false),
    m_decimalParametersHasBeenSet(false),
    m_dateTimeParametersHasBeenSet(false)
{
  *this = jsonValue;
}

Parameters& Parameters::operator =(JsonView jsonValue)
{
  if(jsonValue.ValueExists("StringParameters"))
  {
    Array<JsonView> stringParametersJsonList = jsonValue.GetArray("StringParameters");
    for(unsigned stringParametersIndex = 0; stringParametersIndex < stringParametersJsonList.GetLength(); ++stringParametersIndex)
    {
      m_stringParameters.push_back(stringParametersJsonList[stringParametersIndex].AsObject());
    }
    m_stringParametersHasBeenSet = true;
  }

  if(jsonValue.ValueExists("IntegerParameters"))
  {
    Array<JsonView> integerParametersJsonList = jsonValue.GetArray("IntegerParameters");
    for(unsigned integerParametersIndex = 0; integerParametersIndex < integerParametersJsonList.GetLength(); ++integerParametersIndex)
    {
      m_integerParameters.push_back(integerParametersJsonList[integerParametersIndex].AsObject());
    }
    m_integerParametersHasBeenSet = true;
  }

  if(jsonValue.ValueExists("DecimalParameters"))
  {
    Array<JsonView> decimalParametersJsonList = jsonValue.GetArray("DecimalParameters");
    for(unsigned decimalParametersIndex = 0; decimalParametersIndex < decimalParametersJsonList.GetLength(); ++decimalParametersIndex)
    {
      m_decimalParameters.push_back(decimalParametersJsonList[decimalParametersIndex].AsObject());
    }
    m_decimalParametersHasBeenSet = true;
  }

  if(jsonValue.ValueExists("DateTimeParameters"))
  {
    Array<JsonView> dateTimeParametersJsonList = jsonValue.GetArray("DateTimeParameters");
    for(unsigned dateTimeParametersIndex = 0; dateTimeParametersIndex < dateTimeParametersJsonList.GetLength(); ++dateTimeParametersIndex)
    {
      m_dateTimeParameters.push_back(dateTimeParametersJsonList[dateTimeParametersIndex].AsObject());
    }
    m_dateTimeParametersHasBeenSet = true;
  }

  return *this;
}

JsonValue Parameters::Jsonize() const
{
  JsonValue payload;

  if(m_stringParametersHasBeenSet)
  {
   Array<JsonValue> stringParametersJsonList(m_stringParameters.size());
   for(unsigned stringParametersIndex = 0; stringParametersIndex < stringParametersJsonList.GetLength(); ++stringParametersIndex)
   {
     stringParametersJsonList[stringParametersIndex].AsObject(m_stringParameters[stringParametersIndex].Jsonize());
   }
   payload.WithArray("StringParameters", std::move(stringParametersJsonList));

  }

  if(m_integerParametersHasBeenSet)
  {
   Array<JsonValue> integerParametersJsonList(m_integerParameters.size());
   for(unsigned integerParametersIndex = 0; integerParametersIndex < integerParametersJsonList.GetLength(); ++integerParametersIndex)
   {
     integerParametersJsonList[integerParametersIndex].AsObject(m_integerParameters[integerParametersIndex].Jsonize());
   }
   payload.WithArray("IntegerParameters", std::move(integerParametersJsonList));

  }

  if(m_decimalParametersHasBeenSet)
  {
   Array<JsonValue> decimalParametersJsonList(m_decimalParameters.size());
   for(unsigned decimalParametersIndex = 0; decimalParametersIndex < decimalParametersJsonList.GetLength(); ++decimalParametersIndex)
   {
     decimalParametersJsonList[decimalParametersIndex].AsObject(m_decimalParameters[decimalParametersIndex].Jsonize());
   }
   payload.WithArray("DecimalParameters", std::move(decimalParametersJsonList));

  }

  if(m_dateTimeParametersHasBeenSet)
  {
   Array<JsonValue> dateTimeParametersJsonList(m_dateTimeParameters.size());
   for(unsigned dateTimeParametersIndex = 0; dateTimeParametersIndex < dateTimeParametersJsonList.GetLength(); ++dateTimeParametersIndex)
   {
     dateTimeParametersJsonList[dateTimeParametersIndex].AsObject(m_dateTimeParameters[dateTimeParametersIndex].Jsonize());
   }
   payload.WithArray("DateTimeParameters", std::move(dateTimeParametersJsonList));

  }

  return payload;
}

} // namespace Model
} // namespace QuickSight
} // namespace Aws


text:
ToureNPlaner Javascript Client
==============================

Installation:
-------------

The webclient can be used without any installation or you can build a
compressed version which increases the loading time and (potentially)
the performance.
To build a compressed version ``ant`` is required. Go into the build/
folder and use ``ant build`` for a compressed version, ``ant minify``
for an also minified version.
See build/config/project.properties for more customizations.


text:
require 'spec_helper'

describe AccessibleAttributes do
  it "should be a Module" do
    AccessibleAttributes.should be_a(Module)
  end
end


text:
@implementation UIView (RAC)
- (RACSignal*)tx_racSignalWhenTap{
    for (UIGestureRecognizer *gesture in self.gestureRecognizers) {
        [self removeGestureRecognizer:gesture];
    }

    UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] init];

    [self.gestureRecognizers enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        if (![obj isKindOfClass:[UITapGestureRecognizer class]]) return;

        UITapGestureRecognizer *tap = obj;
        BOOL rightTouches = (tap.numberOfTouchesRequired == 1);
        BOOL rightTaps = (tap.numberOfTapsRequired == 1);
        if (rightTouches && rightTaps) {
            [gesture requireGestureRecognizerToFail:obj];
        }
    }];

    [self addGestureRecognizer:gesture];
    return [gesture rac_gestureSignal];
}
@end


text:
<?php

require_once "Bootstrap.php";

use IZI\Algorithm\BasicChiSquareAlgorithm;
use IZI\FileLoader\XMLLoader;

class BasicChiSquareAlgorithmTest extends PHPUnit_Framework_TestCase
{

    protected $ETreeRules;
    protected $Xpath;

    public function setUp()
    {
        $loader = new XMLLoader();
        $ETree = $loader->load(DATA_PATH.'etree_result.pmml');
        $this->Xpath = new \DOMXPath($ETree);
        $this->ETreeRules = $this->Xpath->evaluate('//ETreeRules')->item(0);
    }

    public function testEvaluate()
    {
        $algorithm = new BasicChiSquareAlgorithm($this->ETreeRules, $this->Xpath);
        $algorithm->evaluate();
        $expected = [
            'Age_in_years' => 1,
            'Repayment' => 0.2,
            'Amount' => 0.12,
            'Age' => 0.1,
            'Duration' => 0.1,
        ];

        $this->assertEquals($expected, $algorithm->getAttributes());
    }

}


text:
package com.github.thorbenkuck.netcom2.interfaces;

import com.github.thorbenkuck.netcom2.network.shared.Session;

/**
 * This Class is used to abstract away the Send-mechanism.
 *

 * It decouples the sender and the sending {@link Session}, whilst still
 * maintaining the possibility to send something over the {@link com.github.thorbenkuck.netcom2.network.shared.connections.DefaultConnection}.
 *

 * With that you can change the target of sending using the strategy pattern. By providing an Setter for the SendBridge
 * the sender may be changed at runtime.
 *
 * @version 1.0
 * @see Session#send(Object)
 * @see com.github.thorbenkuck.netcom2.network.shared.clients.Client#send(Object)
 * @since 1.0
 */
@FunctionalInterface
public interface SendBridge {

	/**
	 * This call will send the Object o over the {@link com.github.thorbenkuck.netcom2.network.shared.connections.DefaultConnection}
	 * of the internally registered Sender.
	 *
	 * @param o the Object, that should be send.
	 */
	void send(final Object o);

}


text: Minecraft mod that disallows enchantments


text:
<?php

namespace Store\ProductBundle\Repository;

use Doctrine\ORM\EntityRepository;

class PromotionRepository extends EntityRepository
{
    public function findIfActual()
    {
        $now = new \DateTime("NOW");

        $q = $this->createQueryBuilder('p')
            ->where('p.start < :now')
            ->andWhere('p.end is NULL')
            ->orWhere('p.end > :now')
            ->andWhere('p.disabled = 0')
            ->andWhere('p.archived is NULL')
            ->orderBy('p.start')
            ->setParameter('now', $now);

        $query = $q->getQuery();

        return $query->getResult();

    }
}


text:
ActiveRecord::Schema.define(version: 20150909165524) do

  create_table "albums", force: :cascade do |t|
    t.string   "name",       limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "photos", force: :cascade do |t|
    t.integer  "album_id",           limit: 4
    t.datetime "order_date"
    t.datetime "created_at",                     null: false
    t.datetime "updated_at",                     null: false
    t.string   "image_file_name",    limit: 255
    t.string   "image_content_type", limit: 255
    t.integer  "image_file_size",    limit: 4
    t.datetime "image_updated_at"
  end

  add_index "photos", ["album_id"], name: "index_photos_on_album_id", using: :btree

  create_table "users", force: :cascade do |t|
    t.string   "name",                  limit: 255
    t.boolean  "blocked",               limit: 1
    t.string   "email",                 limit: 255
    t.string   "password",              limit: 255
    t.string   "salt",                  limit: 255
    t.string   "token",                 limit: 255
    t.datetime "token_valid_until"
    t.integer  "failed_login_attempts", limit: 4
    t.datetime "login_blocked_until"
    t.datetime "created_at",                        null: false
    t.datetime "updated_at",                        null: false
  end

end


text:
<!doctype html>

		<meta charset="utf-8">

		<title>Apps Híbrido</title>

		<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
		<meta name="author" content="Hakim El Hattab">

		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<link rel="stylesheet" href="css/reveal.min.css">
		<link rel="stylesheet" href="css/theme/default.css" id="theme">

		<link rel="stylesheet" href="lib/css/zenburn.css">

    <link rel="stylesheet" href="css/my-style.css">

Apps Híbridos

Com Phonegap

						Criado por Tiago Braga / @tiagobraga / contato@tiagobraga.cc

Ah mlk!

Tiago Braga, 26 anos(Até o dia 24 de Fevereiro)

Sou Desenvolvedor Web, com 7 anos de mercado.
Trabalhei na Plan B por quase 4 anos e atualmente trabalho na JCHEBLY, desenvolvendo para a Surface / PixelSense com C#.

Jabá Número 1

CEP

http://bit.ly/CEP-01001-000

Jabá Número 2

Smiller

http://bit.ly/Smiller

Para começar... O que é um App Híbrido?

Um App Híbrido não utiliza de linguagem nativa do dispositivo para funcionar, ele usa tecnologias como HTML, CSS e JAVASCRIPT para o seu desenvolvimento.
De certa forma, eles podem ser considerados nativos, pois utilizam uma parte nativa para comunicação (WebView).

Mas e aí, o que tem o Nativo melhor que o Híbrido?

Velocidade - Acesso direto ao Sistema Operacional;

Interface - Se quiser que seu App já tenha navegação nativa do SO;

Cache - 'Acesso ilimitado'.

E o Híbrido...

Desenvolvimento para qualquer Plataforma;

Custo de Desenvolvimento - Um Código, N plataformas;

Manutenção - Tem front-end no mercado? :D ;

Debug - Podendo ser rodado normalmente no Browser.

              Então... Vamos dar uma espiadinha no Phonegap?

Uai... Seu Jabá com Phonegap tá meio fraco... Você não tem nenhum App Híbrido?

"Vou te mostrar um App que fiz, tá bom?! :D"

Uma das formas de criar Apps Híbridos com as tecnologias que já conhecemos, como: HTML5, CSS3 e JAVASCRIPT

É um framework open source e disponibiliza para o desenvolvedor uma API, que você pode acessar por exemplo, a lista de contatos do dispositivo.

E ainda podemos usar...

... além dos 'plugins' já conhecidos.

              Então... Vamos dar uma espiadinha de como o Phonegap funciona?

Linha de Comando

Se você já tiver Node.js instalado na sua máquina,
digite o sequite comando:

Passo 1*

              $ npm install -g phonegap

Comando que instala o Phonegap no pacote do Node.

            * Todos os Detalhes

Seu primeiro App Híbrido com Phonegap

Antes, escolha seu diretório e digite o seguinte comando:

Passo 2*

              $ phonegap create hello com.example.hello HelloWorld

            * Todos os Detalhes

hello: É o nome do seu diretório;

com.example.hello: Namespace do seu Aplicativo;

HelloWorld: É o nome do seu Aplicativo.

Projeto Bruto

Esse é seu projeto bruto. Daqui pra frente, você é que manda.

Agora vamos fazer o Build para iOS.

Build

              $ phonegap build ios

Instalação

              $ phonegap install ios

              Agora, vou mostrar o App Híbrido que desenvolvi.

Sou Chevrolet
 app Híbrido

UI - Interface

              Agora, vou te mostrar alguns Apps com Phonegap.

Tripcase

Untappd

Além do Phonegap

Desenvolvimento mobile baseado em um SDK JAVASCRIPT.

          Documentação

Além do Phonegap

Como já existia o Sencha ExtJS para criar aplicações com interface rica, foi desenvolvido o Sencha Touch, para que os desenvolvedores pudessem criar aplicações Mobile em HTML5.

          Documentação

Dúvidas?

Obrigado!


text:
#include <QPainter>
#include <QPixmap>

#include "gl_text_renderer.h"
#include "visualization/shaders/giw_shaders.h"

GLTextRenderer::GLTextRenderer(GLCanvas* gl_canvas)
    : font("Times New Roman", font_size)
    , text_prog(gl_canvas)
    , gl_canvas_(gl_canvas)
{
}

GLTextRenderer::~GLTextRenderer()
{
    gl_canvas_->glDeleteTextures(1, &text_tex);
    gl_canvas_->glDeleteBuffers(1, &text_vbo);
}

bool GLTextRenderer::initialize()
{
    text_prog.create(shader::text_vert_shader,
                     shader::text_frag_shader,
                     ShaderProgram::FormatR,
                     "rgba",
                     {"mvp",
                      "buff_sampler",
                      "text_sampler",
                      "pix_coord",
                      "brightness_contrast"});

    gl_canvas_->glGenTextures(1, &text_tex);
    gl_canvas_->glActiveTexture(GL_TEXTURE0);
    gl_canvas_->glBindTexture(GL_TEXTURE_2D, text_tex);
    gl_canvas_->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
    gl_canvas_->glGenBuffers(1, &text_vbo);
    generate_glyphs_texture();

    return true;
}

void GLTextRenderer::generate_glyphs_texture()
{
    // Required characters for numbers, scientific notation (e), nan, inf
    const char text[] = "0123456789., -+enaif";
    const unsigned char* p;
    const int border_size = 0;

    QFontMetrics g(font);

    glActiveTexture(GL_TEXTURE0);
    glBindTexture(GL_TEXTURE_2D, text_tex);

    // Generate text bitmap
    QSize texture_size(g.size(Qt::TextSingleLine, text));

    text_texture_width = text_texture_height = 1.0f;
    while (text_texture_width < texture_size.width())
        text_texture_width *= 2.f;
    while (text_texture_height < texture_size.height())
        text_texture_height *= 2.f;

    const int mipmap_levels = 5;

    {
        int tex_level_width = text_texture_width;
        int tex_level_height = text_texture_height;

        for (int i = 0; i < mipmap_levels; ++i) {
            gl_canvas_->glTexImage2D(GL_TEXTURE_2D,
                                     i,
                                     GL_R8,
                                     tex_level_width,
                                     tex_level_height,
                                     0,
                                     GL_RED,
                                     GL_UNSIGNED_BYTE,
                                     nullptr);

            tex_level_width = std::max(1, tex_level_width / 2);
            tex_level_height = std::max(1, tex_level_height / 2);
        }
    }

    QPixmap pixmap(texture_size);
    pixmap.fill(QColor(0, 0, 0));
    QPainter painter(&pixmap);
    painter.setPen(QColor(255, 255, 255));
    painter.setFont(font);
    painter.drawText(0, g.ascent(), text);
    QImage img = pixmap.toImage().convertToFormat(QImage::Format_Grayscale8);

    std::vector<uint8_t> packed_texture(text_texture_width *
                                        text_texture_height);
    uint8_t* packed_texture_ptr = packed_texture.data();

    int real_ascent  = texture_size.height() - 1;
    int real_descent = 0;

    bool found_real_descent = false;
    bool found_real_ascent  = false;
    // Pack bitmap and compute real ascent and descent lines
    for (int y = 0; y < texture_size.height(); ++y) {
        uint8_t* imgptr = img.scanLine(y);
        int x;

        bool found_filled_pixel = false;
        for (x = 0; x < texture_size.width(); ++x) {
            packed_texture_ptr[x] = imgptr[x];

            found_filled_pixel = found_filled_pixel || imgptr[x] > 0;
        }

        // If the row was completely empty...
        if (!found_filled_pixel) {
            if (!found_real_descent) {
                real_descent = y;
            } else if (!found_real_ascent) {
                real_ascent       = y;
                found_real_ascent = true;
            }
        } else {
            found_real_descent = true;
        }

        for (; x < text_texture_width; ++x) {
            packed_texture_ptr[x] = 0;
        }
        packed_texture_ptr += static_cast<int>(text_texture_width);
    }

    // Compute text box size
    float box_w = 0;
    float box_h = 0;

    const int cropped_bitmap_height = real_ascent - real_descent;

    for (p = reinterpret_cast<const unsigned char*>(text); *p; p++) {
        int advance_x     = g.width(*p);
        int bitmap_height = g.height();

        text_texture_advances[*p][0] = advance_x;
        text_texture_advances[*p][1] = 0;
        text_texture_sizes[*p][0]    = advance_x;
        text_texture_sizes[*p][1]    = cropped_bitmap_height;
        text_texture_tls[*p][0]      = 0;
        text_texture_tls[*p][1]      = cropped_bitmap_height;

        box_w += advance_x + 2 * border_size;
        box_h = std::max(box_h, (float)bitmap_height + 2 * border_size);
    }

    // Clears generated buffer
    {
        gl_canvas_->glTexSubImage2D(GL_TEXTURE_2D,
                                    0,
                                    0,
                                    0,
                                    text_texture_width,
                                    text_texture_height,
                                    GL_RED,
                                    GL_UNSIGNED_BYTE,
                                    packed_texture.data());
    }

    int x = 0;
    for (p = reinterpret_cast<const unsigned char*>(text); *p; p++) {
        int advance_x = g.width(*p);

        text_texture_offsets[*p][0] = x + border_size;
        text_texture_offsets[*p][1] = real_descent + border_size;

        x += advance_x + border_size * 2;
    }

    gl_canvas_->glGenerateMipmap(GL_TEXTURE_2D);
    gl_canvas_->glTexParameteri(
        GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    gl_canvas_->glTexParameteri(
        GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    gl_canvas_->glTexParameteri(
        GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
    gl_canvas_->glTexParameteri(
        GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
    gl_canvas_->glTexParameteri(
        GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_BORDER);
}


text:
<!DOCTYPE html>

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

PhyloTree example

		<svg width=700 height=700 id="treeplot"></svg>

		<svg width=800 height=800 id="treeplot2"></svg>

Layout

	<select id="layout">
		<option value="rect">rectangular</option>
		<option value="radial">radial</option>
		<option value="unrooted">unrooted</option>
		<option value="clock">clock</option>
	</select>

distance

	<select id="distance">
		<option value="div">divergence</option>
		<option value="num_date">time</option>
		<option value="level">level</option>
	</select>
	<button id="size">Random size</button>
	<button id="color">Random color</button>
	<button id="both">Random both</button>
	<button id="reset">reset view</button>


text:
package cn.eric.ustate.profiledetail.dao;

public interface ProfiledetailMapper {

}


text:
.form-changepw {
  max-width: 330px;
  padding: 15px;
  margin: 0 auto;
}
.form-changepw .form-changepw-heading{
  margin-bottom: 10px;
}

#id_currentPassword {
  margin-bottom: -1px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
#id_newPassword {
    margin-bottom: -1px;
    border-radius:0;
}
#id_newPasswordConfirm {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}


text:
require 'spec_helper'

class Convection::Model::Template::Resource
  describe ElastiCacheSecurityGroup do
    let(:elasticache_template) do
      Convection.template do
        description 'Elasticache Test Template'

        elasticache_security_group 'MyRedisSecGroup' do
          description 'Redis cache security group'
        end
      end
    end

    subject do
      template_json
        .fetch('Resources')
        .fetch('MyRedisSecGroup')
        .fetch('Properties')
    end

    it 'has a description' do
      expect(subject['Description']).to eq('Redis cache security group')
    end

    private

    def template_json
      JSON.parse(elasticache_template.to_json)
    end
  end
end


text:
REBOL [
	title: "Rebol/Flash Dialect (RSWF) main rules"
	author: "Oldes"
	email: oliva.david@seznam.cz
]

any [

;### Display list

	;## ShowFrame (display list)
	;** Inserts ShowFrame tag which instructs Flash Player to display the contents of the display list.
	'showFrame
	(
		showFrame
	)
	|
	;## Show number! frames (display list)
	;** Inserts one or more ShowFrame tags which instructs Flash Player to display the contents of the display list.
	'show set arg1 opt [integer! | none] ['frames | 'frame]
	(
		loop any [arg1 1] [showFrame]
	)
	|
	;## End (display list)
	;** End of SWF file or sprite
	'end
	(
		unless including [ins #{0000}]
	)
	|
	;## Place (display list)
	;** Adds character to the display list, or modifies the attributes of a character that is already on the display list.
	['Place | 'PlaceObject2]
		set arg1 [integer! | word! | block!] ;* ID or block with IDs of a character/s
		[
			  'at set arg2 pair!           ;* Position
			| set arg2 opt [block! | none] ;* or block with position and transform spec.
			;- position spec can contain:
			;-   at pair!   - new position
			;-   multiply [integer! | tuple! | block!] - Multiplication Transforms
			;-   add      [integer! | tuple! | block!] - Addition Transforms
			;-   rotate   [number! | pair | block!]    - Rotation
			;-   scale    [number! | pair | block!]    - Scale
			;-   skew     [number! | pair | block!]    - Skew
			;-   reflect  [number! | pair | block!]    - Reflect
			;-   blend [
			;-		  Normal
			;-		| Layer
			;-		| Darken
			;-		| Multiply
			;-		| Lighten
			;-		| Screen
			;-		| Overlay
			;-		| HardLight
			;-		| Add
			;-		| Subtract
			;-		| Diference"
			;-		| Invert
			;-		| Alpha
			;-		| Erase
			;-   ]
			;-  actions block!    - block with clip event actions
		]
	(
		ins-place arg1 arg2
	)
	|
	;## MoveDepth (display list)
	;** Moves character on specified depth to new position
	'MoveDepth
		set arg1 opt [integer!]             ;* Depth
		[
			  'at set arg2 pair!            ;* New position
			| set arg2 opt [block! | none]  ;* Or block with position spec.
			;- position spac can contain:
			;-   at pair!   - new position
			;-   multiply [integer! | tuple! | block!] - Multiplication Transforms
			;-   add      [integer! | tuple! | block!] - Addition Transforms
			;-   rotate   [number! | pair | block!]    - Rotation
			;-   scale    [number! | pair | block!]    - Scale
			;-   skew     [number! | pair | block!]    - Skew
			;-   reflect  [number! | pair | block!]    - Reflect
		]
	(
		use [bin flags m a][
			bin: make binary! 40
			flags: make string! "00000001"
			case [
				pair? arg2 [arg2: reduce ['at arg2]]
				none? arg2 [arg2: reduce ['at 0x0 ]]
			]
			m: select arg2 'multiply
			a: select arg2 'add
			if any [not none? a	not none? m	][
				insert bin bits-to-bin create-cxform/withalpha m a
				flags/5: #"1"
			]
			if pos: select arg2 'at [
				pos: either block? pos [
					to pair! reduce [to integer! 20 * pos/1 to integer! 20 * pos/2]
				][	pos * 20]
				insert bin bits-to-bin create-matrix pos arg2
				flags/6: #"1"
			]
			insert bin int-to-ui16 either integer? arg1 [arg1][last-depth]
			insert bin load rejoin ["2#{" flags "}"]
 			ins form-tag 26 bin
		]
	)
	|
	;## Remove (display list)
	;** Removes the specified character (at the specified depth) from the display list.
	['remove | 'RemoveObject | 'odstranit | 'odstraò | 'destituir | 'liquidar]
	 some [
		set arg1 [integer! | word!] ;* ID of character to remove
		set arg2 integer!           ;* Depth of character
		(
			ins form-tag 5 rejoin [
				int-to-ui16 get-id arg1
				int-to-ui16 arg2
			]
		)
	]
	|
	;## RemoveDepth (display list)
	;** Removes the character at the specified depth from the display list.
	['RemoveDepth | 'RemoveDepths]
		[set arg1 block! | copy arg1 some [integer!]] ;* Depths to remove (block or integer list)
	(	foreach tmp arg1 [ins form-tag 28 int-to-ui16 tmp] )
	|
	;## Layout (display list)
	;** Places one or more GUI objects on stage
	'Layout
		set arg1 block!  ;* Block with layout dialect
	(	compile-layout arg1  )
	|

;
;
;
;### Sprite

	;## Sprite (sprite)
	;** Defines a sprite character
	['sprite | 'sprajt | 'DefineSprite | 'MovieClip]
		set arg1 opt [integer! | none]            ;* Optional sprite ID
		set arg2 [
			  binary!                             ;* Precompiled binary data
			| block!                              ;* Block with sprite content
			| word!                               ;* Existing shape which will be placed to the first sprite frame
			| file!                               ;* Imports another SWF file as a sprite
			| url!                                ;* Imports another SWF file as a sprite
		]
		opt ['init] set arg3 opt [block! | none]  ;* Optional Init actions for new sprite
	(
		if any [file? arg2 url? arg2][arg2: reduce ['import-swf arg2]]
		compile-sprite arg1 arg2 arg3
	)
	|
	;## EmptySprite (sprite)
	;** Creates empty sprite
	['EmptySprite | 'prázdný 'sprajt]
		set arg1 [integer! | none] ;* Optional ID of the new sprite
	(
		ins-def form-tag 39 rejoin [set-id arg1 #{010040000000}]
	)
	|
	;## Image stream (bitmaps)
	;** Creates a Sprite with sequence of images on each frame
	'ImageStream
		set arg1  [integer! | none]   ;* Optional ID of the new sprite
		set arg2 opt [file! | block!] ;* Image file, directory with images or block with image files or urls
		set arg3 opt [pair! | none]   ;* Specify size for all images so the size will not be auto detected (slower)
		                              ;- note that there is no resizing done on images is the size is different
		set arg4 opt [block! | none]  ;* now with 'onFirstFrame, 'onEachFrame and 'onLastFrame action's blocks,
								      ;* 'name and 'noPlace ('exportOnly) directive
		                              ;- for example: [onLastFrame [stop()]]
	(
		compile-imageStream arg1 arg2 arg3 arg4
	)
	|
;
;
;
;### Shapes

	;## Shape (shapes)
	;** Defines a shape character
	['Shape | 'tvar | 'DefineShape]
		set arg1 opt [integer! | none] ;* Shape id
		set arg2 block! ;* Block with ShapeDialect
	(	create-shape arg1 arg2 )
	|

	;## Image (shapes)
	;** Defines a shape character from an existing bitmap
	['image | 'bitmap-to-image]
		set arg1 [word! | file! | url!] ;* ID of the existing bitmap character or image file
;		set arg2 ['as 'sprite | none]   ;* Automatically creates a sprite as well
	(

		use [size id][
			if any [file? arg1 url? arg1][
				insert set-word-buff id: to-word join 'bmp_ either empty? set-word-buff [
					get-new-id
				][	first set-word-buff	]
				load-img arg1 none
				arg1: id
			]
			size: select placed-images get-id arg1

			parse/all compose/deep [
				Shape [
					Bounds 0x0 (size)
					smoothing   on
					image      (arg1)
				]
			] tag-rules
		]
	)
	|
	;## Multi-image (shapes)
	;** Defines multiple shapes from an existing bitmap
	'multi-image
		set arg1 [integer! | word!] ;* ID of the existing bitmap character
		set arg2 block!             ;* Specifications of new shapes
		;- The spec can be:
		;-   clipped [on | off | true | false]  - Sets if the image fill should be clipped
		;-   [no smoothing | smoothing off]     - turns off bitmap smoothing
		;-   smoothing opt [on]                 - turns on bitmap smoothing
		;-   set-word! pair! pair! opt [pair!]  - id of the new image,
		;-                                        ofset to image position in bitmap
		;-                                        size of the new image
		;-                                        optional final size
	(
		use [bmp w ofs sz sz2 clip sm][
			bmp: arg1
			sm: 'off
			clip: "clipped"
			parse/all arg2 [any[
				  'clipped ['off | 'false] (clip: "")
				| 'clipped ['on  | 'true ] (clip: "clipped")
				| ['no 'smoothing | 'smoothing 'off] (sm: 'off)
				| ['smoothing opt 'on] (sm: 'on)
				|
				set w set-word! ;id of the new image
				set ofs pair!	;ofset to image position
				set sz pair!	;size of the new image
				set sz2 opt [pair!] ;optimal final size
				(
;print ["smoothing: " sm]
					compile load rejoin [{
						} w {: shape [
							bounds 0x0 } sz {
							with transparency
							smoothing } sm {
							fill-style [bitmap } bmp { at } 0x0 - ofs { } clip {]
							box 0x0 } either none? sz2 [sz][sz2] {
						]
					}]
				)
				| arg1: any-type! (make-warning! arg1)
			]]
		]
	)
	|
;	'DefineShape set arg1 integer! set arg2 binary! (
;		ins-def form-tag 2 join set-id arg1 arg2
;	)
;	|
;	'DefineShape2 set arg1 integer! set arg2 binary! (
;		ins-def form-tag 22 join set-id arg1 arg2
;	)

;
;
;
;### Bitmaps

	;## Bitmap (bitmaps)
	;** Defines a bitmap character from image file
	['bitmap | 'bitmapa | 'DefineBits]
		set arg1 opt [integer! | none]          ;* The result bitmap ID
		set arg2 [file! | url!]                 ;* Image file to use
		(arg3: none) opt ['size set arg3 pair!] ;* Optional image size if needed
	(
		either none? arg3 [
			load-img arg2 arg1
		][	load-img/size arg2 arg1 arg3]
	)
	|
	;## Alpha bitmap (bitmaps)
	;** Defines bitmap with support for transparency (alpha values)
	['alpha 'bitmap | 'DefineBitsLossless2]
		set arg1 opt [integer! | none] ;* Bitmap id
		set arg2     [file!    | url!] ;* Image file to use
	(
		load-img/alpha arg2 arg1
	)
	|
	;## JPEG (DefineBitsJPEG2 or DefineBitsJPEG3)
	;** Defines a bitmap character with JPEG compression adding alpha channel (opacity) data.
	'JPEG
		set arg1 opt [integer! | none] ;* Bitmap id
		set arg2     [file!    | url!] ;* Image file to use
	(
		ins-bitmap-jpeg  arg1 arg2
	)
	|
	;## Bitmaps (bitmaps)
	;** Defines multiple bitmaps
	['bitmaps | 'bitmapy]
		set tmp opt ['images | 'obrázky | none] ;* Creates equivalent shapes as well
		set arg1 block!                         ;* Bitmaps minidialect code:
		;- from [file! | url!] - specifies base dir for files
		;- key  tuple!         - color which should be used as transparent
		;- no key              - turns key color off
		;- make sprites        - creates not only shapes but sprites as well
		;- precise             - creates bitmaps with one pixel transparent edge
		;- [smoothing | smoothing on]     - turns bitmap smoothing on
		;- [no smoothing | smoothing off] - turns bitmap smoothing off
		;- opt [word! | set-word! | none] [file! | url!] - optional bitmap id and source file
	(
		ins-bitmaps arg1 not none? tmp
	)
	|
	;## Bitmap layout (bitmaps)
	;** Creates bitmap using Rebol's LAYOUT function
	['bitmap 'layout | 'bitmapové 'rozložení]
		set arg1 opt [integer! | none] ;* The result bitmap ID
		set arg2 block!                ;* Block with Rebol's layout code
		set arg3 opt [block!   | none] ;* Create-img args [key tuple!]
	(
		ins-bitmap-layout arg1 arg2 arg3
	)
	|
;	'DefineBitsLossless2 set arg1 integer! set arg2 binary! (
;		ins-def form-tag 36 join set-id arg1 arg2
;	)
;	| 'DefineSprite set arg1 opt [integer! | none] set arg2 binary! (
;		ins-def form-tag 39 join set-id arg1 arg2
;	)
;
;
;
;### Fonts and text

	;## Font (fonts and text)
	;** Defines the shape outlines of each glyph used in a particular font.
	['Font | 'DefineFont2]
		(arg2: arg3: none)
		set arg1 [
			  block!      ;* Block with font specification (system font = no outlines)
			  ;- possible args in font spec are:
			  ;-  name string!  - Name of the font, default "_sans"
			  ;-  italic        - Font is italic
			  ;-  bold          - Font is bold
			  ;-  small         - Font is small. Character glyphs are aligned on pixel boundaries for dynamic and input text.
			  ;-  encoding [ShiftJIS | Unicode | ANSI] ;Used encoding (not needed for SWF6 and later), default ANSI
			| string!     ;* Name of the system font (no outlines)
			| [
				  binary! ;* Binary data with font specification
				| file!   ;* Binaty data with font specification in external file
				| url!    ;* --//--
			]
				opt 'as set arg2 opt [string! | none] ;* Optional way how to change font name before import
				copy arg3 any [;* OPTIONS:
					  'bold    ;* Sets the BOLD flag
					| 'italic  ;* Sets the ITALIC flag
					| 'normal  ;* Resets both BOLD and ITALIC flags to zero
					| 'pixel   ;* Sets SmallText flag - glyphs are aligned on pixel boundaries for dynamic and input text.
					| 'noAlign ;* Included font file doesn't have alignZones part
					           ;- if omitted, the compiler tries to find the .align file for this font
				]
		]
	(
		ins-DefineFont2 arg1 arg2 arg3
	)
	|
	;## Font3 (fonts and text)
	;** Defines the shape outlines of each glyph used in a particular font using align zones data.
	['Font3 | 'DefineFont3]
		set arg1 [binary! | file! | url!]                  ;* Precompiled binary data of the font3 tag
		(arg2: none)
		opt ['alignZone set arg2 [binary! | file! | url!]] ;* Precompiled binary data of align zones
	(
		unless binary? arg1 [arg1: read/binary get-filepath arg1]
		ins-def form-tag 75 join (set-id none) arg1
		if arg2 [
			unless binary? arg2 [arg2: read/binary get-filepath arg2]
			ins-def form-tag 73 join (int-to-ui16 last-id) arg2
		]
	)
	|
	;## AntiAliasing (fonts and text)
	;** Defines continuous stroke modulation (CSM) settings for existing font
	['AntiAliasing | 'CSMTextSettings]
		set arg1 [integer! | word!]            ;* Font ID to use settings with
		set arg2 opt [block! | binary! | none] ;*CSM settings in binary format
	(
		ins-def form-tag 74 join (int-to-ui16 get-id arg1) either binary? arg2 [arg2][#{48000048430000A74300}] ;#{48000080410000004100}
	)
	|
	;## EditText (fonts and text)
	;** defines a dynamic text object, or text field.
	['EditText | 'Text]
		set arg1 opt [string! | word! | lit-word! | none] ;* Name of the variable where the contents of the text field are stored.
		set arg2 pair!  ;* Size of the text field
		set arg3 block! ;* EditText specification.
		;- the spec can contain:
		;-   maxLength integer!                           - maximum length of string
		;-   color [tuple! | issue!]                      - color of the text
		;-   font [[integer! | word! | string!] integer!] - existing font ID and font height
		;-   wordWrap       - text will wrap automatically when the end of line is reached
		;-   multiline      - text field is multi-line and will scroll automatically
		;-   password       - all characters are displayed as an asterisk
		;-   readOnly       - text editing is disabled
		;-   noSelect       - disables interactive text selection
		;-   border         - causes a border to be drawn around the text field
		;-   HTML           - HTML content
		;-   useOutlines    - use glyph font
	(
		ins-EditText arg1 arg2 arg3
	)
	|

;
;
;
;### Buttons

	;## Button (buttons)
	;** Defines button character
	['Button | 'DefineButton2]
		set arg1 block! ;* Button definition block
	(
		use [bin tmp buff v key menu? old-act-bin i actions? ofs id st][
			bin: make binary! 20
			insert bin set-id select arg1 'id
			menu?: either any [none? tmp: select arg1 'as tmp <> 'push][#{01}][#{00}]
			insert tail bin menu?
			menu?: menu? = #{01}
			;button shapes:
			tmp: select arg1 'shapes
			buff: make string! 100
			foreach [states facets] tmp [
				st: make string! "00000000"
				if word? states [states: join copy [] states]
				foreach state states [
					if found? v: find [hit down over up] state [
						poke st 4 + index? v #"1"
					]
				]
				ofs: either none? ofs: select facets 'at [0x0][ofs * 20]
				if none? id: select facets 'id [id: first facets]
				append buff st
				append buff enbase/base rejoin [
					int-to-ui16 get-id id	;character
					int-to-ui16 either none? v: select facets 'layer [1][v]		;layer
				] 2
				append buff create-matrix ofs facets
				buff: byte-align buff
				append buff create-cxform/withalpha
					select facets 'multiply
					select facets 'add
				buff: byte-align buff
			]
			buff: bits-to-bin buff
			append buff #{00}

			;button actions:
			tmp: select arg1 'actions
			actions?: (block? tmp) and (not empty? tmp)
			insert tail bin either actions? [int-to-ui16 (length? buff) + 2][#{0000}]
			insert tail bin buff
			if actions? [
				old-act-bin: copy action-bin
				i: 0
				foreach [states actions] tmp [
					i: i + 2
					unless block? states [states: join copy [] states]
					st: make string! "000000000"
					key: make string! "0000000"
					buff: make binary! 10
					parse states [
						some [
							'DragOut (either menu? [st/1: #"1"][st/5: #"1"])
							| 'DragOver (either menu? [st/2: #"1"][st/4: #"1"])
							| 'ReleaseOutside (unless menu? [st/3: #"1"])
							| 'Release (st/6: #"1")
							| 'Press (st/7: #"1")
							| 'RollOut (st/8: #"1")
							| 'RollOver  (st/9: #"1")
							| 'key set v [char! | string!] (
								if string? v [v: v/1]
								key: next enbase/base to binary! v 2
							)
						] to end
					]
					unless empty? st [
						insert buff join compile-actions actions #{00}
						insert buff reverse load rejoin ["2#{" key st "}"]
						insert buff either i = length? tmp [#{0000}][
							int-to-ui16 (length? buff) + 2
						]
						;insert buff int-to-ui16 (length? buff) + 2
						insert tail bin buff
					]
				]
				action-bin: copy old-act-bin

			]
			ins-def form-tag 34 bin
		]
	)
	|

;
;
;
;### Actions

	;## Actions (actions)
	;** Instructs Flash Player to perform a list of actions when the current frame is complete.
	['Actions | 'DoAction | 'DoActions]
		set arg1 [block! | binary! | file! | url!] ;* Block with actions or precompiled binary
	(
		if any [file? arg1 url? arg1][arg1: read/binary arg1]
		either binary? arg1 [
			insert tail action-bin arg1
		][	insert tail action-bin compile-actions arg1]
	)
	|
	;## InitAction (actions)
	;** Same like Actions but these actions are executed earlier, and are executed only once
	['InitAction | 'InitActions | 'DoInitAction]
		set arg1 [word! | integer!] ;* ID of sprite to which these actions apply
		set arg2 [block! | binary!] ;* block of actions to parse or precompiled actions
	(
;probe arg2
		doInitAction arg1 arg2
	)
	|
	;## Class (actions)
	;** Defines a custom class, which lets you instantiate objects that share methods and properties that you define.
	'Class (arg2: arg3: arg4: none)
		opt ['extends set arg2 word!] ;* Name of existing super class
		set arg1 block!	              ;* Block with methods and properties of the new class
		                              ;- use 'init' function as a constructor
		opt ['with set arg3 block!]   ;* Additional actions to provide after init (not part of class)
	(
		create-class arg1 arg2 arg3
	)
	|
	;## Extends (actions)
	;** Just a shortcut for Class definition
	'Extends (arg3: none)
		set arg2 word!              ;* Name of existing super class
		set arg1 block!	            ;* Block with methods and properties of the new class
		opt ['with set arg3 block!] ;* Additional actions to provide after init (not part of class)
	(
		create-class arg1 arg2 arg3
	)
	|
	;## DoAction3 (actions)
	;** Compiles ActionScript3 file using Flex compiler (!! just for a testing !!)
	['Actions3 | 'DoAction3 | 'DoActions3]
		set arg1 [file! | url!] ;* ActionScript3 source file
	(
		use [fileParts name ext][
			fileParts: split-path arg1
			set [name ext] parse last fileParts "."
			if ext = "as" [
				call/wait rejoin [
					"java -jar " to-local-file rswf-root-dir/bin/asc.jar " -optimize " to-local-file arg1
				]
			]
			if exists? arg1: to-file rejoin [name ".abc"][
				probe arg1: read/binary arg1
				;ins form-tag 43 as-binary join name #{00}
				;ins form-tag 72 arg1
				ins form-tag 82 rejoin [
					int-to-ui32 10 "frame1" #{00}
					arg1
				]
				ins form-tag 76 rejoin [int-to-ui32 10 name #{00}]
			]
		]
	)
	|
	;## Stop (actions)
	;** Just a shortcut for DoAction [stop] (inserts Stop action)
	'stop
		set arg1 opt ['end] ;*And optionaly ends the movie
	(
		insert tail action-bin #{07}
		if arg1 = 'end [
			showFrame ins #{0000}
		]
	)
	|

;
;
;
;### Sound

	;## Sound (sound)
	;** Defines sound
	['sound | 'defineSound]
		set arg1 [file! | url!]  ;* Sound file to use
	(	create-defineSound arg1 )
	|
	;## Sounds (sound)
	;** Defines multiple sounds
	'sounds
		set arg1 block! ;* Block with sound files to use
	(
		foreach file arg1 [
			insert set-word-buff to-word rejoin ['snd_ last parse file "/"]
			;probe file
			create-defineSound file
		]
	)
	|
	;## StartSound (sound)
	;** Starts (or stops) playing a sound defined by DefineSound.
	['StartSound | 'play]
		set arg1 [word! | integer! | string!] ;* Sound ID to play
		set arg2 opt [block!]                 ;* Sound options
		  ;- Sound options can be:
		  ;-   noMultiple    - Don't start the sound if already playing
		  ;-   loop          - How many times it loops
	(
		use [info loop][
			unless block? arg2 [arg2: make block! []]
			info: #{00}
			if find arg2 'noMultiple [info: info or #{10}]
			loop: either select arg2 'loop [info: info or #{04} int-to-ui16 select arg2 'loop][#{}]
			ins form-tag 15 rejoin [
				int-to-ui16 get-id arg1
				info
				loop
			]
		]
	)
	|
	;## StopSound (sound)
	;** Stops playing the specified sound
	'StopSound
		set arg1 [word! | integer!] ;* Sound ID to stop playing
	(
		ins form-tag 15 join int-to-ui16 get-id arg1 #{20}
	)
	|
	;## MP3Stream (sound)
	;** Starts inserting MP3 file as a stream, (on each ShowFrame is inserted part of the MP3 file)
	'mp3Stream
		set arg1 [file! | url!] ;* Path to MP3 file
	(
;print ["mp3stream" arg1]
		use [file][
			either any [
				not none? file: get-filepath arg1
			][
				stream: make object! [
					type: 'mp3
					port: open/direct/binary file
					MakeHead?: true
					samplesPerFrame: 0
					delay: 0
					length: 0
					idealFrames: 0
					mp3frames: 0
					frame: 0
				]
			][
				print ["Mp3Stream file or url (" arg1 ") doesn't exists!"]
			]
		]
	)
	|
	;## Finish stream (sound)
	;** Inserts frames until the end of the MP3 file started with MP3Stream
	'finish 'stream (
		while [not none? stream][showFrame]
		remove/part skip tail body -2 2
	)
	|

;
;
;
;### Video

	;## Video (video)
	;** Creates VIDEO object
	'video
		set arg1 [integer! | none] ;* Optional ID of the video object
	(
		ins-def form-tag 60 rejoin [set-id arg1 #{0000A00078000000}]
	)
	|

;	['DefineVideo | 'DefineMovie] set arg1 opt [integer! | none] set arg2 [string! | url! | file!] (
;		ins-def form-tag 38 rejoin [set-id arg1 arg2 #{00}]
;	)
;	|
;
;
;
;### Control

	;## Background (control)
	;** Sets the background color of the display.
	['background | 'pozadí | 'fondo | 'SetBackgroundColor]
		set arg1 [tuple! | issue!] ;* Color of the movie background
	(
		unless including [
			ins form-tag 9 reduce either tuple? arg1 [to binary! arg1][issue-to-binary arg1]
		]

	)
	|
	;## Rebol (control)
	;** Evaluates Rebol code
	'Rebol
		set arg1 [block! | file! | url!] ;* Rebol code to evaluate
	(
		if error? tmp: try [do arg1][probe disarm tmp]
	)
	|
	;## Include (control)
	;** Includes and evaluates other RSWF script
	['Include | 'zahrnout | 'obsahuje | 'incluir]
		set arg1 [file! | url! | block!] ;* RSWF file to include
	(	include-files arg1 )
	|
	;## Require (control)
	;** Includes and evaluates other RSWF script but only once
	['require | 'needs | 'vyžaduje | 'požaduje | 'requise]
		set arg1 [file! | url! | block!] ;* RSWF file to include
	(	include-files/unique arg1 )
	|
	;## Export (control)
	;** Makes portions of a SWF file available for import by other SWF files
	['Export | 'ExportAssets]
		set arg1 block! ;* Block with one or more id and name pairs to export
	(
		ExportAssets arg1
	)
	|
	;## Import (control)
	;** Imports exported characters from another SWF file (while runtime).
	['Import | 'ImportAssets]
		set arg1 block! ;* Block with one or more id and name pairs to import
		opt ['from] set arg2 [url! | path! | word! | string! | file!] ;* path to the exporting SWF
	(
		ins-import-assets arg1 arg2
	)
	|
	;## Import-swf (control)
	;** Inserts almost all SWFtags from other SWF file (recounting used IDs)
	;** NOTE: this is not complete yet so there may be a problem with some files
	'import-swf
		(arg2: none)
		set arg1 [file! | url!]    ;* SWF file to insert
		opt ['no set arg2 ['end | 'show]] ;* Used if to set that END tag should not be included
	(
		ins-swf-file arg1 arg2
	)
	|
	;## Label (control)
	;** Gives the specified Name to the current frame. This name is used by ActionGoToLabel to identify the frame.
	['label | 'FrameLabel]
		set arg1 [string! | word! | lit-word!] ;* Name of the label
	(
		ins form-tag 43 rejoin [#{} arg1 #{00}]
	)
	|

;
;
;
;### Special

	;## Set-word! (special)
	;** Stores set-word for use with named IDs
	set arg1 set-word!
	(
		insert set-word-buff arg1: to word! arg1
		if find names-ids-table arg1 [
			make-warning!/msg none reform ["Reusing word: " arg1]
		]
;print ["TSW" mold set-word-buff]
	)
	|
	;## Get-word! (special)
	;** Used with set-word! to give another name to existing character ID
	set arg1 get-word! (
		either all [
			not none? set-word
			not none? tmp: select names-ids-table to-word arg1
		] [	do-set-word tmp ][
			make-warning! arg1
		]
	)
	|
	;## Comment (special)
	;** Ignores the argument value (used to insert large comments or comment out block of code)
	'comment
		set arg any-type! ;* Argument values which is not evaluated
	|
	;## SWFTag (special)
	;** Inserts any precompiled SWF tag
	['SWFtag | 'prepared]
		set arg1 integer!  ;* SWF tag ID
		set arg2 binary!   ;* Precompiled binary data
	(
		ins-def form-tag arg1 arg2
	)
;	|
;	'ScalingGrid set arg1 [integer! | word!] set arg2 pair! set arg3 pair! (
;
;	)
	|
	;## MetaData (special)
	;** Inserts MetaData in XML format into file
	'MetaData
		set arg1 [string! | block!] ;* metadata
	(
		ins-def form-metadata arg1
	)
	|
	;## FileAttributes (special)
	;** NOTE: to be done, now just used with binary
	'FileAttributes
		set arg1 [binary! | integer!] ;* 8Bytes or integer with FileAttributes
	(
		;ins-def
		FileAttributes: form-tag 69 probe either binary? arg1 [copy/part arg1 4][int-to-ui32 arg1]
	)
	|
	;## UseNetwork (special)
	;** Sets file attributes to enable networking on local or not
	['UseNetwork | 'network 'privileges | 'local-with-networking | 'allow 'networking]
		set arg1 ['off | 'false | 'on | 'off | none]
	(
		;ins-def
		FileAttributes: form-tag 69 either find [off false] arg1 [#{00000000}][#{01000000}]
	)
	|
	;## ScriptLimits (special)
	;** Overrides the default settings for maximum recursion depth and Actions time-out
	'ScriptLimits
		set arg1 integer!	;* maximum recursion (default probably 256)
		set arg2 integer!	;* Actions time-out in seconds (default is between 15 to 20 seconds)
	(
		;ins-def
		ScriptLimits: form-tag 65 join int-to-ui16 (max 1 min 65535 arg1) int-to-ui16 (max 1 min 65535 arg2)
	)
	|
	;## SerialNumber (special)
	;** Sets info about compiler (do not use it if you don't know what it does)
	'SerialNumber
	set arg1 opt [binary! | none] ;* 26Bytes of binary data as a serialNumber
	(
		ins-def form-tag 41 either arg1 [copy/part arg1 26][#{01000000000000000200965F0200000000006B68088212010000}]
	)
	|

	;## Units (special)
	;** Sets if used position units are in twips or pixels
	'Units ['twips (twips?: true) | 'pixels (twips?: false)]
	|

;
;
;
;### Undocumented or obsolete

;	copy arg3 any ['vertical | 'horizontal | 'v | 'h] 'extended 'image set arg1 file! copy arg2 any [integer!] (
;		extended-image arg1 arg2 arg3
;	)
;	| ['ex-vertical-image | 'extendedVerticalImage] set arg1 [block!] (
;		makeVerticalExtendedImage arg1
;	)
;	| ['ex-horizontal-image | 'extendedHorizontalImage] set arg1 [block!] (
;		makeHorizontalExtendedImage arg1
;	)
;	| 'make 'window set arg1 block! (
;		make-window arg1
;	)
;	|
	'animation set arg1 block! (
		;print ["animation" mold arg1]
		use [i fr-pos to-pos frms step-x step-y pos positions][
			parse/all arg1 [any [
				'move set arg1 [word! | lit-word! | integer!]
					opt 'from set fr-pos pair!
					opt 'to set to-pos pair!
					opt 'in set frms integer! opt 'frames
					(
						step-x: (to-pos/x - fr-pos/x) / frms
						step-y: (to-pos/y - fr-pos/y) / frms
						;print ["move" arg1 fr-pos to-pos frms step-x step-y]
						positions: make block! frms
						pos: make block! reduce [fr-pos/x fr-pos/y]
						insert positions 20 * fr-pos
						repeat i frms [
							pos/1: pos/1 + step-x
							pos/2: pos/2 + step-y
							;pos/2: (pos/2 + (i * step-y)) * (sine (90 / frms ) * i))
							;print ["pos" mold pos]
							insert tail positions to pair! reduce [
								to integer! 20 * pos/1
								to integer! 20 * pos/2
							]
						]

						insert/only animations reduce [arg1 positions]
					)
			]]
			;probe animations
		]
	)

	| arg1: any-type! (make-warning! arg1)
]
to end


text:
from glob import glob
import json

with open("templates/data.map", "r") as f:
  file_map = json.loads(f.read())

with open("templates/ini_template.tmp") as f:
  ini_template = f.read()

with open("templates/vxt_template.tmp") as f:
  vxt_template = f.read()

for file, name in file_map.items():
  with open("./maps/{}.ini".format(file), "w") as f:
    f.write(ini_template.format(name=name))

  with open("./maps/{}.vxt".format(file), "w") as f:
    f.write(vxt_template)

  with open("./maps/{}.lua".format(file), "w") as f:
    f.write("local _ = require('bzst17')")


text:
package models

import (
	"errors"
	"strconv"
	"time"
)

var (
	UserList map[string]*User
)

func init() {
	UserList = make(map[string]*User)
	u := User{"admin", "admin", "password", Profile{"Siarhei", "Hladkou", "male", 43, "United States", "siarhei.hladkou@gmail.com"}}
	UserList["admin"] = &u
}

type User struct {
	Id       string
	Username string
	Password string
	Profile  Profile
}

type Profile struct {
    FirstName string
    LastName string
	Gender  string
	Age     int
	Address string
	Email   string
}

func AddUser(u User) string {
	u.Id = "user_" + strconv.FormatInt(time.Now().UnixNano(), 10)
	UserList[u.Id] = &u
	return u.Id
}

func GetUser(uid string) (u *User, err error) {
	if u, ok := UserList[uid]; ok {
		return u, nil
	}
	return nil, errors.New("User not exists")
}

func GetAllUsers() map[string]*User {
	return UserList
}

func UpdateUser(uid string, uu *User) (a *User, err error) {
	if u, ok := UserList[uid]; ok {
		if uu.Username != "" {
			u.Username = uu.Username
		}
		if uu.Password != "" {
			u.Password = uu.Password
		}
		if uu.Profile.FirstName != "" {
			u.Profile.FirstName = uu.Profile.FirstName
		}
		if uu.Profile.LastName != "" {
			u.Profile.LastName = uu.Profile.LastName
		}
		if uu.Profile.Age != 0 {
			u.Profile.Age = uu.Profile.Age
		}
		if uu.Profile.Address != "" {
			u.Profile.Address = uu.Profile.Address
		}
		if uu.Profile.Gender != "" {
			u.Profile.Gender = uu.Profile.Gender
		}
		if uu.Profile.Email != "" {
			u.Profile.Email = uu.Profile.Email
		}
		return u, nil
	}
	return nil, errors.New("User Not Exist")
}

func Login(username, password string) bool {
	for _, u := range UserList {
		if u.Username == username && u.Password == password {
			return true
		}
	}
	return false
}

func DeleteUser(uid string) {
	delete(UserList, uid)
}


text:
package org.apache.hadoop.tools.rumen;

import java.io.Closeable;
import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;

/**
 * Interface to output a sequence of objects of type T.
 */
public interface Outputter<T> extends Closeable {
  /**
   * Initialize the {@link Outputter} to a specific path.
   * @param path The {@link Path} to the output file.
   * @param conf Configuration
   * @throws IOException
   */
  public void init(Path path, Configuration conf) throws IOException;

  /**
   * Output an object.
   * @param object The objecte.
   * @throws IOException
   */
  public void output(T object) throws IOException;

}


text:
<?php

namespace Application\MyNotesBundle\Entity;

use Doctrine\ORM\EntityRepository;

/**
 * NotesCategoriesRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class TodolistCategoriesRepository extends EntityRepository
{
}


text:
namespace Urho3D
{

static const Vector3 DEFAULT_BOUNDING_BOX_MIN(-10.0f, -10.0f, -10.0f);
static const Vector3 DEFAULT_BOUNDING_BOX_MAX(10.0f, 10.0f, 10.0f);
static const Color DEFAULT_AMBIENT_COLOR(0.1f, 0.1f, 0.1f);
static const Color DEFAULT_FOG_COLOR(0.0f, 0.0f, 0.0f);
static const float DEFAULT_FOG_START = 250.0f;
static const float DEFAULT_FOG_END = 1000.0f;
static const float DEFAULT_FOG_HEIGHT = 0.0f;
static const float DEFAULT_FOG_HEIGHT_SCALE = 0.5f;

extern const char* SCENE_CATEGORY;

Zone::Zone(Context* context) :
    Drawable(context, DRAWABLE_ZONE),
    inverseWorldDirty_(true),
    heightFog_(false),
    override_(false),
    ambientGradient_(false),
    ambientColor_(DEFAULT_AMBIENT_COLOR),
    fogColor_(DEFAULT_FOG_COLOR),
    fogStart_(DEFAULT_FOG_START),
    fogEnd_(DEFAULT_FOG_END),
    fogHeight_(DEFAULT_FOG_HEIGHT),
    fogHeightScale_(DEFAULT_FOG_HEIGHT_SCALE),
    priority_(0)
{
    boundingBox_ = BoundingBox(DEFAULT_BOUNDING_BOX_MIN, DEFAULT_BOUNDING_BOX_MAX);
}

Zone::~Zone() = default;

void Zone::RegisterObject(Context* context)
{
    context->RegisterFactory<Zone>(SCENE_CATEGORY);

    URHO3D_ACCESSOR_ATTRIBUTE("Is Enabled", IsEnabled, SetEnabled, bool, true, AM_DEFAULT);
    URHO3D_ATTRIBUTE_EX("Bounding Box Min", Vector3, boundingBox_.min_, MarkNodeDirty, DEFAULT_BOUNDING_BOX_MIN, AM_DEFAULT);
    URHO3D_ATTRIBUTE_EX("Bounding Box Max", Vector3, boundingBox_.max_, MarkNodeDirty, DEFAULT_BOUNDING_BOX_MAX, AM_DEFAULT);
    URHO3D_ATTRIBUTE_EX("Ambient Color", Color, ambientColor_, MarkCachedAmbientDirty, DEFAULT_AMBIENT_COLOR, AM_DEFAULT);
    URHO3D_ATTRIBUTE_EX("Ambient Brightness", float, ambientBrightness_, MarkCachedAmbientDirty, 1.0f, AM_DEFAULT);
    URHO3D_ATTRIBUTE_EX("Background Brightness", float, backgroundBrightness_, MarkCachedAmbientDirty, 0.0f, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Is Background Static", bool, backgroundStatic_, false, AM_DEFAULT);
    URHO3D_ATTRIBUTE_EX("Fog Color", Color, fogColor_, MarkCachedAmbientDirty, DEFAULT_FOG_COLOR, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Fog Start", float, fogStart_, DEFAULT_FOG_START, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Fog End", float, fogEnd_, DEFAULT_FOG_END, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Fog Height", float, fogHeight_, DEFAULT_FOG_HEIGHT, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Fog Height Scale", float, fogHeightScale_, DEFAULT_FOG_HEIGHT_SCALE, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Height Fog Mode", bool, heightFog_, false, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Override Mode", bool, override_, false, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Ambient Gradient", bool, ambientGradient_, false, AM_DEFAULT);
    URHO3D_ATTRIBUTE_EX("Priority", int, priority_, MarkNodeDirty, 0, AM_DEFAULT);
    URHO3D_MIXED_ACCESSOR_ATTRIBUTE("Zone Texture", GetZoneTextureAttr, SetZoneTextureAttr, ResourceRef,
        ResourceRef(TextureCube::GetTypeStatic()), AM_DEFAULT);
    URHO3D_ATTRIBUTE("Light Mask", int, lightMask_, DEFAULT_LIGHTMASK, AM_DEFAULT);
    URHO3D_ATTRIBUTE("Shadow Mask", int, shadowMask_, DEFAULT_SHADOWMASK, AM_DEFAULT);
    URHO3D_ACCESSOR_ATTRIBUTE("Zone Mask", GetZoneMask, SetZoneMask, unsigned, DEFAULT_ZONEMASK, AM_DEFAULT);
}

void Zone::DrawDebugGeometry(DebugRenderer* debug, bool depthTest)
{
    if (debug && IsEnabledEffective())
        debug->AddBoundingBox(boundingBox_, node_->GetWorldTransform(), Color::GREEN, depthTest);
}

void Zone::SetBoundingBox(const BoundingBox& box)
{
    boundingBox_ = box;
    OnMarkedDirty(node_);
    MarkNetworkUpdate();
}

void Zone::SetAmbientColor(const Color& color)
{
    ambientColor_ = color;
    MarkNetworkUpdate();
    MarkCachedAmbientDirty();
}

void Zone::SetAmbientBrightness(float brightness)
{
    ambientBrightness_ = brightness;
    MarkNetworkUpdate();
    MarkCachedAmbientDirty();
}

void Zone::SetBackgroundBrightness(float brightness)
{
    backgroundBrightness_ = brightness;
    MarkNetworkUpdate();
    MarkCachedAmbientDirty();
}

void Zone::SetBackgroundStatic(bool isStatic)
{
    backgroundStatic_ = isStatic;
}

void Zone::SetFogColor(const Color& color)
{
    fogColor_ = color;
    MarkNetworkUpdate();
    MarkCachedAmbientDirty();
}

void Zone::SetFogStart(float start)
{
    if (start < 0.0f)
        start = 0.0f;

    fogStart_ = start;
    MarkNetworkUpdate();
}

void Zone::SetFogEnd(float end)
{
    if (end < 0.0f)
        end = 0.0f;

    fogEnd_ = end;
    MarkNetworkUpdate();
}

void Zone::SetFogHeight(float height)
{
    fogHeight_ = height;
    MarkNetworkUpdate();
}

void Zone::SetFogHeightScale(float scale)
{
    fogHeightScale_ = scale;
    MarkNetworkUpdate();
}

void Zone::SetPriority(int priority)
{
    priority_ = priority;
    MarkNetworkUpdate();
}

void Zone::SetZoneTexture(Texture* texture)
{
    zoneTexture_ = texture;
    UpdateZoneTextureSubscription();
    MarkCachedTextureDirty();
    MarkNetworkUpdate();
}

void Zone::SetHeightFog(bool enable)
{
    heightFog_ = enable;
    MarkNetworkUpdate();
}

void Zone::SetOverride(bool enable)
{
    override_ = enable;
    MarkNetworkUpdate();
}

void Zone::SetAmbientGradient(bool enable)
{
    ambientGradient_ = enable;
    MarkNetworkUpdate();
}

const ReflectionProbeData* Zone::GetReflectionProbe() const
{
    return &reflectionProbeData_.Get();
}

const Vector3 Zone::GetAmbientLighting() const
{
    return cachedAmbientLighting_.Get();
}

const SphericalHarmonicsDot9 Zone::GetAmbientAndBackgroundLighting() const
{
    return cachedAmbientAndBackgroundLighting_.Get();
}

const Matrix3x4& Zone::GetInverseWorldTransform() const
{
    if (inverseWorldDirty_)
    {
        inverseWorld_ = node_ ? node_->GetWorldTransform().Inverse() : Matrix3x4::IDENTITY;
        inverseWorldDirty_ = false;
    }

    return inverseWorld_;
}

const Color& Zone::GetAmbientStartColor()
{
    if (!ambientGradient_)
        return ambientColor_;

    if (!lastAmbientStartZone_ || !lastAmbientEndZone_)
        UpdateAmbientGradient();

    return ambientStartColor_;
}

const Color& Zone::GetAmbientEndColor()
{
    if (!ambientGradient_)
        return ambientColor_;

    if (!lastAmbientStartZone_ || !lastAmbientEndZone_)
        UpdateAmbientGradient();

    return ambientEndColor_;
}

bool Zone::IsInside(const Vector3& point) const
{
    // Use an oriented bounding box test
    Vector3 localPoint(GetInverseWorldTransform() * point);
    return boundingBox_.IsInside(localPoint) != OUTSIDE;
}

void Zone::SetZoneTextureAttr(const ResourceRef& value)
{
    auto* cache = GetSubsystem<ResourceCache>();
    zoneTexture_ = static_cast<Texture*>(cache->GetResource(value.type_, value.name_));
    UpdateZoneTextureSubscription();
    MarkCachedTextureDirty();
    MarkCachedAmbientDirty();
}

ResourceRef Zone::GetZoneTextureAttr() const
{
    return GetResourceRef(zoneTexture_, TextureCube::GetTypeStatic());
}

void Zone::OnMarkedDirty(Node* node)
{
    // Due to the octree query and weak pointer manipulation, is not safe from worker threads
    Scene* scene = GetScene();
    if (scene && scene->IsThreadedUpdate())
    {
        scene->DelayedMarkedDirty(this);
        return;
    }

    Drawable::OnMarkedDirty(node);

    // Notify Octree
    if (octant_)
        octant_->GetOctree()->MarkZoneDirty(this);

    // Clear zone reference from all drawables inside the bounding box, and mark gradient dirty in neighbor zones
    ClearDrawablesZone();

    inverseWorldDirty_ = true;
}

void Zone::OnWorldBoundingBoxUpdate()
{
    worldBoundingBox_ = boundingBox_.Transformed(node_->GetWorldTransform());
}

void Zone::UpdateAmbientGradient()
{
    // In case no neighbor zones are found, reset ambient start/end with own ambient color
    ambientStartColor_ = ambientColor_;
    ambientEndColor_ = ambientColor_;
    lastAmbientStartZone_ = this;
    lastAmbientEndZone_ = this;

    if (octant_)
    {
        const Matrix3x4& worldTransform = node_->GetWorldTransform();
        Vector3 center = boundingBox_.Center();
        Vector3 minZPosition = worldTransform * Vector3(center.x_, center.y_, boundingBox_.min_.z_);
        Vector3 maxZPosition = worldTransform * Vector3(center.x_, center.y_, boundingBox_.max_.z_);

        ea::vector<Zone*> result;
        {
            PointOctreeQuery query(reinterpret_cast<ea::vector<Drawable*>&>(result), minZPosition, DRAWABLE_ZONE);
            octant_->GetOctree()->GetDrawables(query);
        }

        // Gradient start position: get the highest priority zone that is not this zone
        int bestPriority = M_MIN_INT;
        Zone* bestZone = nullptr;
        for (auto i = result.begin(); i != result.end(); ++i)
        {
            Zone* zone = *i;
            int priority = zone->GetPriority();
            if (priority > bestPriority && zone != this && zone->IsInside(minZPosition))
            {
                bestZone = zone;
                bestPriority = priority;
            }
        }

        if (bestZone)
        {
            ambientStartColor_ = bestZone->GetAmbientColor();
            lastAmbientStartZone_ = bestZone;
        }

        // Do the same for gradient end position
        {
            PointOctreeQuery query(reinterpret_cast<ea::vector<Drawable*>&>(result), maxZPosition, DRAWABLE_ZONE);
            octant_->GetOctree()->GetDrawables(query);
        }
        bestPriority = M_MIN_INT;
        bestZone = nullptr;

        for (auto i = result.begin(); i != result.end(); ++i)
        {
            Zone* zone = *i;
            int priority = zone->GetPriority();
            if (priority > bestPriority && zone != this && zone->IsInside(maxZPosition))
            {
                bestZone = zone;
                bestPriority = priority;
            }
        }

        if (bestZone)
        {
            ambientEndColor_ = bestZone->GetAmbientColor();
            lastAmbientEndZone_ = bestZone;
        }
    }
}

void Zone::OnRemoveFromOctree()
{
    ClearDrawablesZone();
}

void Zone::ClearDrawablesZone()
{
    const BoundingBox& currentWorldBoundingBox = GetWorldBoundingBox();
    const BoundingBox dirtyWorldBoundingBox = currentWorldBoundingBox.Merged(lastWorldBoundingBox_);
    if (octant_)
    {
        ea::vector<Drawable*> result;
        BoxOctreeQuery query(result, dirtyWorldBoundingBox, DRAWABLE_GEOMETRY | DRAWABLE_ZONE);
        octant_->GetOctree()->GetDrawables(query);

        for (auto i = result.begin(); i != result.end(); ++i)
        {
            Drawable* drawable = *i;
            DrawableFlags drawableFlags = drawable->GetDrawableFlags();
            if (drawableFlags & DRAWABLE_GEOMETRY)
                drawable->SetZone(nullptr);
            else if (drawableFlags & DRAWABLE_ZONE)
            {
                auto* zone = static_cast<Zone*>(drawable);
                zone->lastAmbientStartZone_.Reset();
                zone->lastAmbientEndZone_.Reset();
            }
        }
    }

    lastWorldBoundingBox_ = currentWorldBoundingBox;
    lastAmbientStartZone_.Reset();
    lastAmbientEndZone_.Reset();
}

void Zone::UpdateCachedData()
{
    if (cachedTextureLighting_.IsInvalidated())
    {
        SphericalHarmonicsDot9 sh;
        if (zoneTexture_)
        {
            const ea::string& zoneTextureName = zoneTexture_->GetName();
            auto cache = GetSubsystem<ResourceCache>();
            auto zoneImage = !zoneTextureName.empty() ? cache->GetTempResource<ImageCube>(zoneTextureName) : nullptr;
            if (zoneImage)
                sh = SphericalHarmonicsDot9(zoneImage->CalculateSphericalHarmonics());
            else
                URHO3D_LOGWARNING(
                    "Cannot extract spherical harmonics from Zone texture without corresponding resource in cache");
        }

        cachedTextureLighting_.Restore(sh);
    }

    if (cachedAmbientLighting_.IsInvalidated())
    {
        cachedAmbientLighting_.Restore((ambientColor_ * ambientBrightness_).GammaToLinear().ToVector3());
    }

    if (cachedAmbientAndBackgroundLighting_.IsInvalidated())
    {
        SphericalHarmonicsDot9 sh = zoneTexture_
            ? cachedTextureLighting_.Get()
            : SphericalHarmonicsDot9(fogColor_.GammaToLinear());

        sh *= backgroundBrightness_;
        sh += GetAmbientLighting();

        cachedAmbientAndBackgroundLighting_.Restore(sh);
    }

    if (reflectionProbeData_.IsInvalidated())
    {
        ReflectionProbeData data;
        data.reflectionMap_ = zoneTexture_ ? zoneTexture_->Cast<TextureCube>() : nullptr;
        auto renderer = GetSubsystem<Renderer>();
        if (!data.reflectionMap_ && renderer)
            data.reflectionMap_ = renderer->GetBlackCubeMap();
        data.roughnessToLODFactor_ = data.reflectionMap_ ? LogBaseTwo(data.reflectionMap_->GetWidth()) : 1.0f;
        data.reflectionMapSH_ = cachedTextureLighting_.Get();

        reflectionProbeData_.Restore(data);
    }
}

void Zone::UpdateZoneTextureSubscription()
{
    UnsubscribeFromEvent(E_RELOADFINISHED);
    if (zoneTexture_)
    {
        SubscribeToEvent(zoneTexture_, E_RELOADFINISHED,
            [&](StringHash eventType, VariantMap& eventData)
        {
            MarkCachedTextureDirty();
        });
    }
}

void Zone::MarkCachedAmbientDirty()
{
    cachedAmbientLighting_.Invalidate();
    cachedAmbientAndBackgroundLighting_.Invalidate();
}

void Zone::MarkCachedTextureDirty()
{
    cachedTextureLighting_.Invalidate();
    reflectionProbeData_.Invalidate();
}

}


text:
import { Laya } from "Laya";
import { Camera } from "laya/d3/core/Camera";
import { MeshSprite3D } from "laya/d3/core/MeshSprite3D";
import { Scene3D } from "laya/d3/core/scene/Scene3D";
import { Vector3 } from "laya/d3/math/Vector3";
import { Vector4 } from "laya/d3/math/Vector4";
import { PrimitiveMesh } from "laya/d3/resource/models/PrimitiveMesh";
import { Stage } from "laya/display/Stage";
import { Texture2D } from "laya/resource/Texture2D";
import { Handler } from "laya/utils/Handler";
import { Stat } from "laya/utils/Stat";
import { Laya3D } from "Laya3D";
import { CameraMoveScript } from "../common/CameraMoveScript";
import { UnlitMaterial } from "laya/d3/core/material/UnlitMaterial";
import { Browser } from "laya/utils/Browser";

export class GPUCompression_ASTC{

    private mat:UnlitMaterial;
    constructor() {
		Laya3D.init(0, 0);
		Laya.stage.scaleMode = Stage.SCALE_FULL;
		Laya.stage.screenMode = Stage.SCREEN_NONE;
		Stat.show();

		var scene: Scene3D = (<Scene3D>Laya.stage.addChild(new Scene3D()));

		var camera: Camera = (<Camera>scene.addChild(new Camera(0, 0.1, 100)));
		camera.transform.translate(new Vector3(0, 2, 5));
		camera.transform.rotate(new Vector3(-15, 0, 0), true, false);
		camera.addComponent(CameraMoveScript);
		camera.clearColor = new Vector4(0.2, 0.2, 0.2, 1.0);

        let meshSprite = new MeshSprite3D(PrimitiveMesh.createBox());
        this.mat = new UnlitMaterial();
        scene.addChild(meshSprite);
        meshSprite.meshRenderer.sharedMaterial = this.mat;
        if(!Browser.onAndroid&&!Browser.onIOS){
            console.log("PC不支持ASTC纹理");
            return;
        }

		Texture2D.load("res/threeDimen/texture/ASTC4x4Test.ktx", Handler.create(this, function (texture: Texture2D): void {
			this.mat.albedoTexture = texture;
			//修改材质贴图的平铺和偏移
		}));

    }
}


text:
/**
 *
 */
package jayhorn.utils;

import java.util.LinkedHashMap;
import java.util.Map;

import soottocfg.cfg.type.Type;

/**
 * @author schaef
 *
 */
public class GhostRegister {

	public final Map<String, Type> ghostVariableMap = new LinkedHashMap<String, Type>();

	public static GhostRegister v() {
		if (instance==null) {
			instance = new GhostRegister();
		}
		return instance;
	}

	public static void reset() {
		instance = null;
	}

	private static GhostRegister instance = null;

	private GhostRegister() {
	}

}


text:
package ru.shemplo.pluses.entity;

public class GroupEntity implements MyEntity {

    private static final long serialVersionUID = 0L;

    private final String name, teacher;
    private int size;

    public final String TITLE, COMMENT, CREATED;
    private final int headteacherID;
    public final int ID;

    public GroupEntity (int id, String title, String comment, String created,
                        int headteacher, boolean active) {
        this.TITLE = title; this.COMMENT = comment;
        this.headteacherID = headteacher;
        this.CREATED = created;
        this.ID = id;

        teacher = "Alexey Rusakov Pro";
        name = this.TITLE;
    }

    //TODO: constructors
    static private int tmp = 1;
    public GroupEntity(int id, int population) {
        teacher = "Alexey Rusakov";
        this.size = population;
        this.name = "G" + id;

        this.TITLE = this.name; this.COMMENT = "";
        this.headteacherID = -1;
        this.CREATED = "now";
        this.ID = id;
    }

    public String getName() {
        return name;
    }

    public String getTeacher() {
        return teacher;
    }

    public int getSize() {
        return size;
    }
}


text:
import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';

export default class DropDownMenuOpenImmediateExample extends React.Component {

  constructor(props) {
    super(props);
    this.state = {value: 2};
  }

  handleChange = (event, index, value) => this.setState({value});

  render() {
    return (
      <DropDownMenu value={this.state.value} onChange={this.handleChange} openImmediately={true}>
        <MenuItem value={1} primaryText="Never" />
        <MenuItem value={2} primaryText="Every Night" />
        <MenuItem value={3} primaryText="Weeknights" />
        <MenuItem value={4} primaryText="Weekends" />
        <MenuItem value={5} primaryText="Weekly" />
      </DropDownMenu>
    );
  }
}


text:
<html  style="overflow: hidden">
        <script>

            function go2Random()
            {
                var authorColor = getParameterByName('authorColor');
                if (authorColor != "") {
                    window.location = "whiteboard/" + randomPadName() + "?authorColor=" + authorColor;
                } else {
                    window.location = "whiteboard/" + randomPadName();
                }
            }

            function randomPadName()
            {
                var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
                var string_length = 10;
                var randomstring = '';
                for (var i = 0; i < string_length; i++)
                {
                    var rnum = Math.floor(Math.random() * chars.length);
                    randomstring += chars.substring(rnum, rnum + 1);
                }
                return randomstring;
            }

            function getParameterByName(name)
            {
                name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
                var regexS = "[\\?&]" + name + "=([^&#]*)";
                var regex = new RegExp(regexS);
                var results = regex.exec(window.location.search);
                if(results == null) {
                    return "";
                }
                else {
                    return decodeURIComponent(results[1].replace(/\+/g, " "));
                }
            }

           go2Random();
        </script>
</html>


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.bigtableadmin.v2.model;

/**
 * Metadata type for the operation returned by CreateBackup.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Bigtable Admin API. For a detailed explanation
 * see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class CreateBackupMetadata extends com.google.api.client.json.GenericJson {

  /**
   * If set, the time at which this operation finished or was cancelled.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String endTime;

  /**
   * The name of the backup being created.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * The name of the table the backup is created from.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String sourceTable;

  /**
   * The time at which this operation started.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String startTime;

  /**
   * If set, the time at which this operation finished or was cancelled.
   * @return value or {@code null} for none
   */
  public String getEndTime() {
    return endTime;
  }

  /**
   * If set, the time at which this operation finished or was cancelled.
   * @param endTime endTime or {@code null} for none
   */
  public CreateBackupMetadata setEndTime(String endTime) {
    this.endTime = endTime;
    return this;
  }

  /**
   * The name of the backup being created.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * The name of the backup being created.
   * @param name name or {@code null} for none
   */
  public CreateBackupMetadata setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * The name of the table the backup is created from.
   * @return value or {@code null} for none
   */
  public java.lang.String getSourceTable() {
    return sourceTable;
  }

  /**
   * The name of the table the backup is created from.
   * @param sourceTable sourceTable or {@code null} for none
   */
  public CreateBackupMetadata setSourceTable(java.lang.String sourceTable) {
    this.sourceTable = sourceTable;
    return this;
  }

  /**
   * The time at which this operation started.
   * @return value or {@code null} for none
   */
  public String getStartTime() {
    return startTime;
  }

  /**
   * The time at which this operation started.
   * @param startTime startTime or {@code null} for none
   */
  public CreateBackupMetadata setStartTime(String startTime) {
    this.startTime = startTime;
    return this;
  }

  @Override
  public CreateBackupMetadata set(String fieldName, Object value) {
    return (CreateBackupMetadata) super.set(fieldName, value);
  }

  @Override
  public CreateBackupMetadata clone() {
    return (CreateBackupMetadata) super.clone();
  }

}


text:
'use strict';

/* Assignment #2 End-to-End Testing
 * Prepared By: Len Payne
 * For: CPD-3262
 * 2014/01/21
 */
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */

describe('Contact List App', function() {

  beforeEach(function() {
    browser().navigateTo('app/index.html');
  });

  it('should have six tr elements with the class "contact"', function() {
	expect(repeater('tr.contact').count()).toBe(6);
  });

  it('should filter on Cooper to only two results', function() {
	input('query').enter('Cooper');
    expect(repeater('tr.contact').count()).toBe(2);
  });

  it('should order correctly by Extension', function() {
	input('query').enter('33');
	select('orderProp').option('Extension');
	expect(repeater('tr.contact', 'Contact List').column('contact.first')).
          toEqual(["Liane", "Rick", "Samantha"]);
  });

  it('should order correctly by First Name', function() {
	input('query').enter('Cooper');
	select('orderProp').option('First Name');
	expect(repeater('tr.contact', 'Contact List').column('contact.first')).
          toEqual(["Jim", "Liane"]);
  });

  it('should order correctly by Last Name', function() {
	input('query').enter('L');
	select('orderProp').option('Last Name');
	expect(repeater('tr.contact', 'Contact List').column('contact.first')).
          toEqual(["Liane", "Len"]);
  });

  it('should render contact-specific links', function() {
    input('query').enter('Len');
	element('.contact td.first a').click();
	expect(browser().location().url()).toBe('/contacts/len');
  });

  it('should re-direct index.html to index.html#/contacts', function() {
	browser().navigateTo('app/index.html');
	expect(browser().location().url()).toBe('/contacts');
  });
});
describe('Contact List Detail View', function() {
  beforeEach(function() {
    browser().navigateTo('app/index.html#/contacts/len');
  });

  it('should display Len page properly', function() {
    expect(binding('contact.first')).toBe('Len');
	expect(binding('contact.last')).toBe('Payne');
  });

  it('should have a link back to the contact list at the top of the page', function() {
    element('a:first').click();
	expect(browser().location().url()).toBe('/contacts');
  });
});