text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text.RegularExpressions;
    /// <summary>
    /// Summary for the Validation class
    /// </summary>
public static class Validation {
    /// <summary>
    /// Determines whether the specified eval string contains only alpha characters.
    /// </summary>
    /// <param name="evalString">The eval string.</param>
    /// <returns>
    /// 	<c>true</c> if the specified eval string is alpha; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsAlpha(this string evalString) {
        return !Regex.IsMatch(evalString, RegexPattern.ALPHA);
    }

    /// <summary>
    /// Determines whether the specified eval string contains only alphanumeric characters
    /// </summary>
    /// <param name="evalString">The eval string.</param>
    /// <returns>
    /// 	<c>true</c> if the string is alphanumeric; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsAlphaNumeric(this string evalString) {
        return !Regex.IsMatch(evalString, RegexPattern.ALPHA_NUMERIC);
    }

    /// <summary>
    /// Determines whether the specified eval string contains only alphanumeric characters
    /// </summary>
    /// <param name="evalString">The eval string.</param>
    /// <param name="allowSpaces">if set to <c>true</c> [allow spaces].</param>
    /// <returns>
    /// 	<c>true</c> if the string is alphanumeric; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsAlphaNumeric(this string evalString, bool allowSpaces) {
        if (allowSpaces)
            return !Regex.IsMatch(evalString, RegexPattern.ALPHA_NUMERIC_SPACE);
        return IsAlphaNumeric(evalString);
    }

    /// <summary>
    /// Determines whether the specified eval string contains only numeric characters
    /// </summary>
    /// <param name="evalString">The eval string.</param>
    /// <returns>
    /// 	<c>true</c> if the string is numeric; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsNumeric(this string evalString) {
        return !Regex.IsMatch(evalString, RegexPattern.NUMERIC);
    }

    /// <summary>
    /// Determines whether the specified email address string is valid based on regular expression evaluation.
    /// </summary>
    /// <param name="emailAddressString">The email address string.</param>
    /// <returns>
    /// 	<c>true</c> if the specified email address is valid; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsEmail(this string emailAddressString) {
        return Regex.IsMatch(emailAddressString, RegexPattern.EMAIL);
    }

    /// <summary>
    /// Determines whether the specified string is lower case.
    /// </summary>
    /// <param name="inputString">The input string.</param>
    /// <returns>
    /// 	<c>true</c> if the specified string is lower case; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsLowerCase(this string inputString) {
        return Regex.IsMatch(inputString, RegexPattern.LOWER_CASE);
    }

    /// <summary>
    /// Determines whether the specified string is upper case.
    /// </summary>
    /// <param name="inputString">The input string.</param>
    /// <returns>
    /// 	<c>true</c> if the specified string is upper case; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsUpperCase(this string inputString) {
        return Regex.IsMatch(inputString, RegexPattern.UPPER_CASE);
    }

    /// <summary>
    /// Determines whether the specified string is a valid GUID.
    /// </summary>
    /// <param name="guid">The GUID.</param>
    /// <returns>
    /// 	<c>true</c> if the specified string is a valid GUID; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsGuid(this string guid) {
        return Regex.IsMatch(guid, RegexPattern.GUID);
    }

    /// <summary>
    /// Determines whether the specified string is a valid US Zip Code, using either 5 or 5+4 format.
    /// </summary>
    /// <param name="zipCode">The zip code.</param>
    /// <returns>
    /// 	<c>true</c> if it is a valid zip code; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsZIPCodeAny(this string zipCode) {
        return Regex.IsMatch(zipCode, RegexPattern.US_ZIPCODE_PLUS_FOUR_OPTIONAL);
    }

    /// <summary>
    /// Determines whether the specified string is a valid US Zip Code, using the 5 digit format.
    /// </summary>
    /// <param name="zipCode">The zip code.</param>
    /// <returns>
    /// 	<c>true</c> if it is a valid zip code; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsZIPCodeFive(this string zipCode) {
        return Regex.IsMatch(zipCode, RegexPattern.US_ZIPCODE);
    }

    /// <summary>
    /// Determines whether the specified string is a valid US Zip Code, using the 5+4 format.
    /// </summary>
    /// <param name="zipCode">The zip code.</param>
    /// <returns>
    /// 	<c>true</c> if it is a valid zip code; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsZIPCodeFivePlusFour(this string zipCode) {
        return Regex.IsMatch(zipCode, RegexPattern.US_ZIPCODE_PLUS_FOUR);
    }

    /// <summary>
    /// Determines whether the specified string is a valid Social Security number. Dashes are optional.
    /// </summary>
    /// <param name="socialSecurityNumber">The Social Security Number</param>
    /// <returns>
    /// 	<c>true</c> if it is a valid Social Security number; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsSocialSecurityNumber(this string socialSecurityNumber) {
        return Regex.IsMatch(socialSecurityNumber, RegexPattern.SOCIAL_SECURITY);
    }

    /// <summary>
    /// Determines whether the specified string is a valid IP address.
    /// </summary>
    /// <param name="ipAddress">The ip address.</param>
    /// <returns>
    /// 	<c>true</c> if valid; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsIPAddress(this string ipAddress) {
        return Regex.IsMatch(ipAddress, RegexPattern.IP_ADDRESS);
    }

    /// <summary>
    /// Determines whether the specified string is a valid US phone number using the referenced regex string.
    /// </summary>
    /// <param name="telephoneNumber">The telephone number.</param>
    /// <returns>
    /// 	<c>true</c> if valid; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsUSTelephoneNumber(this string telephoneNumber) {
        return Regex.IsMatch(telephoneNumber, RegexPattern.US_TELEPHONE);
    }

    /// <summary>
    /// Determines whether the specified string is a valid currency string using the referenced regex string.
    /// </summary>
    /// <param name="currency">The currency string.</param>
    /// <returns>
    /// 	<c>true</c> if valid; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsUSCurrency(this string currency) {
        return Regex.IsMatch(currency, RegexPattern.US_CURRENCY);
    }

    /// <summary>
    /// Determines whether the specified string is a valid URL string using the referenced regex string.
    /// </summary>
    /// <param name="url">The URL string.</param>
    /// <returns>
    /// 	<c>true</c> if valid; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsURL(this string url) {
        return Regex.IsMatch(url, RegexPattern.URL);
    }

    /// <summary>
    /// Determines whether the specified string is consider a strong password based on the supplied string.
    /// </summary>
    /// <param name="password">The password.</param>
    /// <returns>
    /// 	<c>true</c> if strong; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsStrongPassword(this string password) {
        return Regex.IsMatch(password, RegexPattern.STRONG_PASSWORD);
    }

}


text: ../bin/rshell < single.txt

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>MeCab: Class List</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

MeCab

Main Page

Namespaces

Classes

Files

Class List

Class Members

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:

MeCab::Lattice	Lattice class

mecab_dictionary_info_t	DictionaryInfo structure

mecab_node_t	Node structure

mecab_path_t	Path structure

MeCab::Model	Model class

MeCab::Tagger	Tagger class

<address class="footer">
Generated on Mon Feb 18 2013 02:23:58 for MeCab by

 1.7.6.1
</address>


text:
namespace draco {

PlyEncoder::PlyEncoder()
    : out_buffer_(nullptr), in_point_cloud_(nullptr), in_mesh_(nullptr) {}

bool PlyEncoder::EncodeToFile(const PointCloud &pc,
                              const std::string &file_name) {
  std::unique_ptr<FileWriterInterface> file =
      FileWriterFactory::OpenWriter(file_name);
  if (!file) {
    return false;  // File couldn't be opened.
  }
  // Encode the mesh into a buffer.
  EncoderBuffer buffer;
  if (!EncodeToBuffer(pc, &buffer)) {
    return false;
  }
  // Write the buffer into the file.
  file->Write(buffer.data(), buffer.size());
  return true;
}

bool PlyEncoder::EncodeToFile(const Mesh &mesh, const std::string &file_name) {
  in_mesh_ = &mesh;
  return EncodeToFile(static_cast<const PointCloud &>(mesh), file_name);
}

bool PlyEncoder::EncodeToBuffer(const PointCloud &pc,
                                EncoderBuffer *out_buffer) {
  in_point_cloud_ = &pc;
  out_buffer_ = out_buffer;
  if (!EncodeInternal()) {
    return ExitAndCleanup(false);
  }
  return ExitAndCleanup(true);
}

bool PlyEncoder::EncodeToBuffer(const Mesh &mesh, EncoderBuffer *out_buffer) {
  in_mesh_ = &mesh;
  return EncodeToBuffer(static_cast<const PointCloud &>(mesh), out_buffer);
}
bool PlyEncoder::EncodeInternal() {
  // Write PLY header.
  // TODO(ostava): Currently works only for xyz positions and rgb(a) colors.
  std::stringstream out;
  out << "ply" << std::endl;
  out << "format binary_little_endian 1.0" << std::endl;
  out << "element vertex " << in_point_cloud_->num_points() << std::endl;

  const int pos_att_id =
      in_point_cloud_->GetNamedAttributeId(GeometryAttribute::POSITION);
  int normal_att_id =
      in_point_cloud_->GetNamedAttributeId(GeometryAttribute::NORMAL);
  int tex_coord_att_id =
      in_point_cloud_->GetNamedAttributeId(GeometryAttribute::TEX_COORD);
  const int color_att_id =
      in_point_cloud_->GetNamedAttributeId(GeometryAttribute::COLOR);

  if (pos_att_id < 0) {
    return false;
  }

  // Ensure normals are 3 component. Don't encode them otherwise.
  if (normal_att_id >= 0 &&
      in_point_cloud_->attribute(normal_att_id)->num_components() != 3) {
    normal_att_id = -1;
  }

  // Ensure texture coordinates have only 2 components. Don't encode them
  // otherwise. TODO(ostava): Add support for 3 component normals (uvw).
  if (tex_coord_att_id >= 0 &&
      in_point_cloud_->attribute(tex_coord_att_id)->num_components() != 2) {
    tex_coord_att_id = -1;
  }

  out << "property " << GetAttributeDataType(pos_att_id) << " x" << std::endl;
  out << "property " << GetAttributeDataType(pos_att_id) << " y" << std::endl;
  out << "property " << GetAttributeDataType(pos_att_id) << " z" << std::endl;
  if (normal_att_id >= 0) {
    out << "property " << GetAttributeDataType(normal_att_id) << " nx"
        << std::endl;
    out << "property " << GetAttributeDataType(normal_att_id) << " ny"
        << std::endl;
    out << "property " << GetAttributeDataType(normal_att_id) << " nz"
        << std::endl;
  }
  if (color_att_id >= 0) {
    const auto *const attribute = in_point_cloud_->attribute(color_att_id);
    if (attribute->num_components() > 0) {
      out << "property " << GetAttributeDataType(color_att_id) << " red"
          << std::endl;
    }
    if (attribute->num_components() > 1) {
      out << "property " << GetAttributeDataType(color_att_id) << " green"
          << std::endl;
    }
    if (attribute->num_components() > 2) {
      out << "property " << GetAttributeDataType(color_att_id) << " blue"
          << std::endl;
    }
    if (attribute->num_components() > 3) {
      out << "property " << GetAttributeDataType(color_att_id) << " alpha"
          << std::endl;
    }
  }
  if (in_mesh_) {
    out << "element face " << in_mesh_->num_faces() << std::endl;
    out << "property list uchar int vertex_indices" << std::endl;
    if (tex_coord_att_id >= 0) {
      // Texture coordinates are usually encoded in the property list (one value
      // per corner).
      out << "property list uchar " << GetAttributeDataType(tex_coord_att_id)
          << " texcoord" << std::endl;
    }
  }
  out << "end_header" << std::endl;

  // Not very efficient but the header should be small so just copy the stream
  // to a string.
  const std::string header_str = out.str();
  buffer()->Encode(header_str.data(), header_str.length());

  // Store point attributes.
  const int num_points = in_point_cloud_->num_points();
  for (PointIndex v(0); v < num_points; ++v) {
    const auto *const pos_att = in_point_cloud_->attribute(pos_att_id);
    buffer()->Encode(pos_att->GetAddress(pos_att->mapped_index(v)),
                     pos_att->byte_stride());
    if (normal_att_id >= 0) {
      const auto *const normal_att = in_point_cloud_->attribute(normal_att_id);
      buffer()->Encode(normal_att->GetAddress(normal_att->mapped_index(v)),
                       normal_att->byte_stride());
    }
    if (color_att_id >= 0) {
      const auto *const color_att = in_point_cloud_->attribute(color_att_id);
      buffer()->Encode(color_att->GetAddress(color_att->mapped_index(v)),
                       color_att->byte_stride());
    }
  }

  if (in_mesh_) {
    // Write face data.
    for (FaceIndex i(0); i < in_mesh_->num_faces(); ++i) {
      // Write the number of face indices (always 3).
      buffer()->Encode(static_cast<uint8_t>(3));

      const auto &f = in_mesh_->face(i);
      for (int c = 0; c < 3; ++c) {
        if (f[c] >= num_points) {
          // Invalid point stored on the |in_mesh_| face.
          return false;
        }
        buffer()->Encode(f[c]);
      }

      if (tex_coord_att_id >= 0) {
        // Two coordinates for every corner -> 6.
        buffer()->Encode(static_cast<uint8_t>(6));

        const auto *const tex_att =
            in_point_cloud_->attribute(tex_coord_att_id);
        for (int c = 0; c < 3; ++c) {
          buffer()->Encode(tex_att->GetAddress(tex_att->mapped_index(f[c])),
                           tex_att->byte_stride());
        }
      }
    }
  }
  return true;
}

bool PlyEncoder::ExitAndCleanup(bool return_value) {
  in_mesh_ = nullptr;
  in_point_cloud_ = nullptr;
  out_buffer_ = nullptr;
  return return_value;
}

const char *PlyEncoder::GetAttributeDataType(int attribute) {
  // TODO(ostava): Add support for more types.
  switch (in_point_cloud_->attribute(attribute)->data_type()) {
    case DT_FLOAT32:
      return "float";
    case DT_UINT8:
      return "uchar";
    case DT_INT32:
      return "int";
    default:
      break;
  }
  return nullptr;
}

}  // namespace draco


text:
package com.facebook.buck.cli;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import com.facebook.buck.io.MorePaths;
import com.facebook.buck.io.MorePathsForTests;
import com.facebook.buck.io.ProjectFilesystem;
import com.facebook.buck.parser.BuildTargetParser;
import com.facebook.buck.parser.NoSuchBuildTargetException;
import com.facebook.buck.testutil.FakeProjectFilesystem;
import com.facebook.buck.testutil.IdentityPathAbsolutifier;
import com.facebook.buck.testutil.integration.DebuggableTemporaryFolder;
import com.facebook.buck.testutil.integration.ProjectWorkspace;
import com.facebook.buck.testutil.integration.ProjectWorkspace.ProcessResult;
import com.facebook.buck.testutil.integration.TestDataHelper;
import com.facebook.buck.util.BuckConstant;
import com.facebook.buck.util.HumanReadableException;
import com.facebook.buck.util.environment.Platform;
import com.google.common.base.Joiner;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;

import org.easymock.EasyMock;
import org.junit.Rule;
import org.junit.Test;

import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.nio.file.Path;
import java.nio.file.Paths;

public class BuckConfigTest {

  @Rule
  public DebuggableTemporaryFolder temporaryFolder = new DebuggableTemporaryFolder();

  /**
   * Ensure that whichever alias is listed first in the file is the one used in the reverse map if
   * the value appears multiple times.
   */
  @Test
  public void testGetBasePathToAliasMap() throws IOException, NoSuchBuildTargetException {
    BuildTargetParser parser = new BuildTargetParser();
    Reader reader1 = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "fb4a   =   //java/com/example:fbandroid",
        "katana =   //java/com/example:fbandroid"));
    BuckConfig config1 = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        reader1,
        parser);
    assertEquals(
        ImmutableMap.of(Paths.get("java/com/example"), "fb4a"),
        config1.getBasePathToAliasMap());
    assertEquals(
        ImmutableMap.of(
            "fb4a", "//java/com/example:fbandroid",
            "katana", "//java/com/example:fbandroid"),
        config1.getEntriesForSection("alias"));

    Reader reader2 = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "katana =   //java/com/example:fbandroid",
        "fb4a   =   //java/com/example:fbandroid"));
    BuckConfig config2 = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        reader2,
        parser);
    assertEquals(
        ImmutableMap.of(Paths.get("java/com/example"), "katana"),
        config2.getBasePathToAliasMap());
    assertEquals(
        ImmutableMap.of(
            "fb4a", "//java/com/example:fbandroid",
            "katana", "//java/com/example:fbandroid"),
        config2.getEntriesForSection("alias"));

    Reader noAliasesReader = new StringReader("");
    BuckConfig noAliasesConfig = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        noAliasesReader,
        parser);
    assertEquals(ImmutableMap.of(), noAliasesConfig.getBasePathToAliasMap());
    assertEquals(ImmutableMap.of(), noAliasesConfig.getEntriesForSection("alias"));
  }

  @Test
  public void testConstructorThrowsForMalformedBuildTarget() throws IOException {
    Reader reader = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "fb4a   = :fb4a"));
    ProjectFilesystem projectFilesystem = EasyMock.createMock(ProjectFilesystem.class);
    EasyMock.replay(projectFilesystem);

    try {
      BuildTargetParser parser = new BuildTargetParser();
      BuckConfigTestUtils.createWithDefaultFilesystem(temporaryFolder, reader, parser);
      fail("Should have thrown HumanReadableException.");
    } catch (HumanReadableException e) {
      assertEquals("Path in :fb4a must start with //", e.getHumanReadableErrorMessage());
    }

    EasyMock.verify(projectFilesystem);
  }

  @Test
  public void testConstructorWithNonExistentBasePath() throws IOException {
    Reader reader = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "katana = //java/com/example:fb4a"));

    // BuckConfig should allow nonexistent targets without throwing.
    BuildTargetParser parser = new BuildTargetParser();
    BuckConfigTestUtils.createWithDefaultFilesystem(temporaryFolder, reader, parser);
  }

  @Test
  public void testGetBuildTargetForAlias() throws IOException, NoSuchBuildTargetException {
    BuildTargetParser parser = new BuildTargetParser();
    Reader reader = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "foo = //java/com/example:foo",
        "bar = //java/com/example:bar"));
    BuckConfig config = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        reader,
        parser);
    assertEquals("//java/com/example:foo", config.getBuildTargetForAlias("foo"));
    assertEquals("//java/com/example:bar", config.getBuildTargetForAlias("bar"));
    assertNull(
        "Invalid alias names, such as build targets, should be tolerated by this method.",
        config.getBuildTargetForAlias("//java/com/example:foo"));
    assertNull(config.getBuildTargetForAlias("baz"));

    Reader noAliasesReader = new StringReader("");
    BuckConfig noAliasesConfig = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        noAliasesReader,
        parser);
    assertNull(noAliasesConfig.getBuildTargetForAlias("foo"));
    assertNull(noAliasesConfig.getBuildTargetForAlias("bar"));
    assertNull(noAliasesConfig.getBuildTargetForAlias("baz"));
  }

  /**
   * Ensures that all public methods of BuckConfig return reasonable values for an empty config.
   */
  @Test
  public void testEmptyConfig() {
    BuckConfig emptyConfig = new FakeBuckConfig();
    assertEquals(ImmutableMap.<String, String>of(), emptyConfig.getEntriesForSection("alias"));
    assertNull(emptyConfig.getBuildTargetForAlias("fb4a"));
    assertEquals(ImmutableMap.<Path, String>of(), emptyConfig.getBasePathToAliasMap());
  }

  @Test
  public void testValidateAliasName() {
    BuckConfig.validateAliasName("f");
    BuckConfig.validateAliasName("_");
    BuckConfig.validateAliasName("F");
    BuckConfig.validateAliasName("fb4a");
    BuckConfig.validateAliasName("FB4A");
    BuckConfig.validateAliasName("FB4_");

    try {
      BuckConfig.validateAliasName("");
      fail("Should have thrown HumanReadableException");
    } catch (HumanReadableException e) {
      assertEquals("Alias cannot be the empty string.", e.getHumanReadableErrorMessage());
    }

    try {
      BuckConfig.validateAliasName("42meaningOfLife");
      fail("Should have thrown HumanReadableException");
    } catch (HumanReadableException e) {
      assertEquals("Not a valid alias: 42meaningOfLife.", e.getHumanReadableErrorMessage());
    }
  }

  @Test
  public void testReferentialAliases() throws IOException, NoSuchBuildTargetException {
    BuildTargetParser parser = new BuildTargetParser();

    Reader reader = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "foo            = //java/com/example:foo",
        "bar            = //java/com/example:bar",
        "foo_codename   = foo",
        "",
        "# Do not delete these: automation builds require these aliases to exist!",
        "automation_foo = foo_codename",
        "automation_bar = bar"));
    BuckConfig config = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        reader,
        parser);
    assertEquals("//java/com/example:foo", config.getBuildTargetForAlias("foo"));
    assertEquals("//java/com/example:bar", config.getBuildTargetForAlias("bar"));
    assertEquals("//java/com/example:foo", config.getBuildTargetForAlias("foo_codename"));
    assertEquals("//java/com/example:foo", config.getBuildTargetForAlias("automation_foo"));
    assertEquals("//java/com/example:bar", config.getBuildTargetForAlias("automation_bar"));
    assertNull(config.getBuildTargetForAlias("baz"));
  }

  @Test
  public void testUnresolvedAliasThrows() throws IOException, NoSuchBuildTargetException {
    BuildTargetParser parser = new BuildTargetParser();

    Reader reader = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "foo = //java/com/example:foo",
        "bar = food"));
    try {
      BuckConfigTestUtils.createWithDefaultFilesystem(temporaryFolder, reader, parser);
      fail("Should have thrown HumanReadableException.");
    } catch (HumanReadableException e) {
      assertEquals("No alias for: food.", e.getHumanReadableErrorMessage());
    }
  }

  @Test
  public void testDuplicateAliasDefinitionThrows() throws IOException, NoSuchBuildTargetException {
    BuildTargetParser parser = new BuildTargetParser();

    Reader reader = new StringReader(Joiner.on('\n').join(
        "[alias]",
        "foo = //java/com/example:foo",
        "foo = //java/com/example:foo"));
    try {
      BuckConfigTestUtils.createWithDefaultFilesystem(temporaryFolder, reader, parser);
      fail("Should have thrown HumanReadableException.");
    } catch (HumanReadableException e) {
      assertEquals(
          "Throw an exception if there are duplicate definitions for an alias, " +
              "even if the values are the same.",
          "Duplicate definition for foo in the [alias] section of your .buckconfig or " +
              ".buckconfig.local.",
          e.getHumanReadableErrorMessage());
    }
  }

  @Test
  public void testExcludedLabels() throws IOException {
    Reader reader = new StringReader(Joiner.on('\n').join(
        "[test]",
        "excluded_labels = windows, linux"));
    BuckConfig config = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        reader,
        null);

    assertEquals(
        ImmutableList.of("windows", "linux"),
        config.getDefaultRawExcludedLabelSelectors());
  }

  @Test
  public void testIgnorePaths() throws IOException {
    ProjectFilesystem filesystem = EasyMock.createMock(ProjectFilesystem.class);
    EasyMock.expect(filesystem.getAbsolutifier())
        .andReturn(IdentityPathAbsolutifier.getIdentityAbsolutifier())
        .times(2);
    EasyMock.replay(filesystem);

    BuildTargetParser parser = new BuildTargetParser();
    Reader reader = new StringReader(Joiner.on('\n').join(
        "[project]",
        "ignore = .git, foo, bar/, baz//, a/b/c"));
    BuckConfig config = BuckConfigTestUtils.createFromReader(
        reader,
        filesystem,
        parser,
        Platform.detect(),
        ImmutableMap.copyOf(System.getenv()));

    ImmutableSet<Path> ignorePaths = config.getIgnorePaths();
    assertEquals("Should ignore paths, sans trailing slashes", ignorePaths,
        MorePaths.asPaths(ImmutableSet.of(
          BuckConstant.BUCK_OUTPUT_DIRECTORY,
          ".idea",
          System.getProperty(BuckConfig.BUCK_BUCKD_DIR_KEY, ".buckd"),
          config.getCacheDir().toString(),
          ".git",
          "foo",
          "bar",
          "baz",
          "a/b/c")));

    EasyMock.verify(filesystem);
  }

  @Test
  public void testIgnorePathsWithRelativeCacheDir() throws IOException {
    ProjectFilesystem filesystem = EasyMock.createMock(ProjectFilesystem.class);
    EasyMock.expect(filesystem.getAbsolutifier())
        .andReturn(IdentityPathAbsolutifier.getIdentityAbsolutifier());
    BuildTargetParser parser = EasyMock.createMock(BuildTargetParser.class);
    EasyMock.replay(filesystem, parser);

    Reader reader = new StringReader(Joiner.on('\n').join(
        "[cache]",
        "dir = cache_dir"));
    BuckConfig config = BuckConfigTestUtils.createFromReader(
        reader,
        filesystem,
        parser,
        Platform.detect(),
        ImmutableMap.copyOf(System.getenv()));

    ImmutableSet<Path> ignorePaths = config.getIgnorePaths();
    assertTrue("Relative cache directory should be in set of ignored paths",
        ignorePaths.contains(Paths.get("cache_dir")));

    EasyMock.verify(filesystem, parser);
  }

  @Test
  public void testWifiBlacklist() throws IOException {
    BuckConfig config = createFromText(
        "[cache]",
        "dir = http",
        "blacklisted_wifi_ssids = yolocoaster");
    assertFalse(config.isWifiUsableForDistributedCache(Optional.of("yolocoaster")));
    assertTrue(config.isWifiUsableForDistributedCache(Optional.of("swagtastic")));

    config = createFromText(
        "[cache]",
        "dir = http");

    assertTrue(config.isWifiUsableForDistributedCache(Optional.of("yolocoaster")));
  }

  @Test
  public void testExpandUserHomeCacheDir() throws IOException {
    BuckConfig config = createFromText(
        "[cache]",
        "dir = ~/cache_dir");
    assertEquals(
        "User home cache directory must be expanded.",
        MorePaths.expandHomeDir(Paths.get("~/cache_dir")),
        config.getCacheDir());
  }

  @Test
  public void testResolveNullPathThatMayBeOutsideTheProjectFilesystem() throws IOException {
    BuckConfig config = createFromText("");
    assertNull(config.resolvePathThatMayBeOutsideTheProjectFilesystem(null));
  }

  @Test
  public void testResolveAbsolutePathThatMayBeOutsideTheProjectFilesystem() throws IOException {
    BuckConfig config = createFromText("");
    assertEquals(
        MorePathsForTests.rootRelativePath("foo/bar"),
        config.resolvePathThatMayBeOutsideTheProjectFilesystem(
            MorePathsForTests.rootRelativePath("foo/bar")));
  }

  @Test
  public void testResolveRelativePathThatMayBeOutsideTheProjectFilesystem() throws IOException {
    BuckConfig config = createFromText("");
    assertEquals(
        MorePathsForTests.rootRelativePath("project/foo/bar"),
        config.resolvePathThatMayBeOutsideTheProjectFilesystem(Paths.get("../foo/bar")));
  }

  @Test
  public void testBuckPyIgnorePaths() throws IOException {
    ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(
        this, "buck_py_ignore_paths", temporaryFolder);
    workspace.setUp();

    ProcessResult result = workspace.runBuckCommand("test", "--all");
    result.assertSuccess("buck test --all should exit cleanly");
  }

  @Test
  public void testGetDefaultTestTimeoutMillis() throws IOException {
    assertEquals(0L, new FakeBuckConfig().getDefaultTestTimeoutMillis());

    Reader reader = new StringReader(Joiner.on('\n').join(
        "[test]",
        "timeout = 54321"));
    BuckConfig config = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        reader,
        null);
    assertEquals(54321L, config.getDefaultTestTimeoutMillis());
  }

  @Test
  public void testGetMaxTraces() throws IOException {
    assertEquals(25, new FakeBuckConfig().getMaxTraces());

    Reader reader = new StringReader(Joiner.on('\n').join(
        "[log]",
        "max_traces = 42"));
    BuckConfig config = BuckConfigTestUtils.createWithDefaultFilesystem(
        temporaryFolder,
        reader,
        null);
    assertEquals(42, config.getMaxTraces());
  }

  @Test
  public void testGetAndroidTargetSdkWithSpaces() throws IOException {
    BuckConfig config = createFromText(
        "[android]",
        "target = Google Inc.:Google APIs:16");
    assertEquals(
        "Google Inc.:Google APIs:16",
        config.getValue("android", "target").get());
  }

  @Test
  public void testCreateAnsi() {
    FakeBuckConfig windowsConfig = new FakeBuckConfig(Platform.WINDOWS);
    // "auto" on Windows is equivalent to "never".
    assertFalse(windowsConfig.createAnsi(Optional.<String>absent()).isAnsiTerminal());
    assertFalse(windowsConfig.createAnsi(Optional.of("auto")).isAnsiTerminal());
    assertTrue(windowsConfig.createAnsi(Optional.of("always")).isAnsiTerminal());
    assertFalse(windowsConfig.createAnsi(Optional.of("never")).isAnsiTerminal());

    FakeBuckConfig linuxConfig = new FakeBuckConfig(Platform.LINUX);
    // We don't test "auto" on Linux, because the behavior would depend on how the test was run.
    assertTrue(linuxConfig.createAnsi(Optional.of("always")).isAnsiTerminal());
    assertFalse(linuxConfig.createAnsi(Optional.of("never")).isAnsiTerminal());
  }

  @Test
  public void getEnvUsesSuppliedEnvironment() {
    String name = "SOME_ENVIRONMENT_VARIABLE";
    String value = "SOME_VALUE";
    FakeBuckConfig config = new FakeBuckConfig(
        ImmutableMap.<String, ImmutableMap<String, String>>of(),
        ImmutableMap.of(name, value));
    String[] expected = {value};
    assertArrayEquals("Should match value in environment.", expected, config.getEnv(name, ":"));
  }

  private BuckConfig createFromText(String... lines) throws IOException {
    ProjectFilesystem projectFilesystem = new FakeProjectFilesystem() {
      @Override
      public Path getRootPath() {
        return MorePathsForTests.rootRelativePath("project/root");
      }
    };
    BuildTargetParser parser = new BuildTargetParser();
    StringReader reader = new StringReader(Joiner.on('\n').join(lines));
    return BuckConfigTestUtils.createFromReader(
        reader,
        projectFilesystem,
        parser,
        Platform.detect(),
        ImmutableMap.copyOf(System.getenv()));
  }

}


text:
'use strict';

describe('EventEmitter', function tests() {
  var EventEmitter = require('../').EventEmitter
    , chai = require('chai')
    , expect = chai.expect;

  chai.Assertion.includeStack = true;

  describe('EventEmitter#emit', function () {
    it('should return false when there are not events to emit', function () {
      var e = new EventEmitter();

      expect(e.emit('foo')).to.equal(false);
      expect(e.emit('bar')).to.equal(false);
    });

    it('emits with context', function (done) {
      var e = new EventEmitter()
        , context = 'bar';

      e.on('foo', function (bar) {
        expect(bar).to.equal('bar');
        expect(this).to.equal(context);

        done();
      }, context).emit('foo', 'bar');
    });

    it('emits with context, multiple arguments (force apply)', function (done) {
      var e = new EventEmitter()
        , context = 'bar';

      e.on('foo', function (bar) {
        expect(bar).to.equal('bar');
        expect(this).to.equal(context);

        done();
      }, context).emit('foo', 'bar', 1,2,3,4,5,6,7,8,9,0);
    });

    it('emits with context, multiple listeners (force loop)', function () {
      var e = new EventEmitter();

      e.on('foo', function (bar) {
        expect(bar).to.equal('bar');
        expect(this).to.equal('bar');
      }, 'bar');

      e.on('foo', function (bar) {
        expect(bar).to.equal('bar');
        expect(this).to.equal('foo');
      }, 'foo');

      e.emit('foo', 'bar');
    });

    it('emits with different contexts', function () {
      var e = new EventEmitter()
        , pattern = '';

      function writer() {
        pattern += this;
      }

      e.on('write', writer, 'foo');
      e.once('write', writer, 'bar');

      e.emit('write');
      expect(pattern).to.equal('foobar');
    });

    it('should return true when there are events to emit', function (done) {
      var e = new EventEmitter();

      e.on('foo', function () {
        process.nextTick(done);
      });

      expect(e.emit('foo')).to.equal(true);
      expect(e.emit('foob')).to.equal(false);
    });

    it('receives the emitted events', function (done) {
      var e = new EventEmitter();

      e.on('data', function (a, b, c, d, undef) {
        expect(a).to.equal('foo');
        expect(b).to.equal(e);
        expect(c).to.be.instanceOf(Date);
        expect(undef).to.equal(undefined);
        expect(arguments.length).to.equal(3);

        done();
      });

      e.emit('data', 'foo', e, new Date());
    });

    it('emits to all event listeners', function () {
      var e = new EventEmitter()
        , pattern = [];

      e.on('foo', function () {
        pattern.push('foo1');
      });

      e.on('foo', function () {
        pattern.push('foo2');
      });

      e.emit('foo');
      expect(pattern.join(';')).to.equal('foo1;foo2');
    });
  });

  describe('EventEmitter#listeners', function () {
    it('returns an empty array if no listeners are specified', function () {
      var e = new EventEmitter();

      expect(e.listeners('foo')).to.be.a('array');
      expect(e.listeners('foo').length).to.equal(0);
    });

    it('returns an array of function', function () {
       var e = new EventEmitter();

       function foo() {}

       e.on('foo', foo);
       expect(e.listeners('foo')).to.be.a('array');
       expect(e.listeners('foo').length).to.equal(1);
       expect(e.listeners('foo')).to.deep.equal([foo]);
    });

    it('is not vulnerable to modifications', function () {
      var e = new EventEmitter();

      function foo() {}

      e.on('foo', foo);

      expect(e.listeners('foo')).to.deep.equal([foo]);
      e.listeners('foo').length = 0;
      expect(e.listeners('foo')).to.deep.equal([foo]);
    });
  });

  describe('EventEmitter#once', function () {
    it('only emits it once', function () {
      var e = new EventEmitter()
        , calls = 0;

      e.once('foo', function () {
        calls++;
      });

      e.emit('foo');
      e.emit('foo');
      e.emit('foo');
      e.emit('foo');
      e.emit('foo');

      expect(e.listeners('foo').length).to.equal(0);
      expect(calls).to.equal(1);
    });

    it('only emits once if emits are nested inside the listener', function () {
      var e = new EventEmitter()
        , calls = 0;

      e.once('foo', function () {
        calls++;
        e.emit('foo');
      });

      e.emit('foo');
      expect(e.listeners('foo').length).to.equal(0);
      expect(calls).to.equal(1);
    });

    it('only emits once for multiple events', function () {
      var e = new EventEmitter()
        , multi = 0
        , foo = 0
        , bar = 0;

      e.once('foo', function () {
        foo++;
      });

      e.once('foo', function () {
        bar++;
      });

      e.on('foo', function () {
        multi++;
      });

      e.emit('foo');
      e.emit('foo');
      e.emit('foo');
      e.emit('foo');
      e.emit('foo');

      expect(e.listeners('foo').length).to.equal(1);
      expect(multi).to.equal(5);
      expect(foo).to.equal(1);
      expect(bar).to.equal(1);
    });

    it('only emits once with context', function (done) {
      var e = new EventEmitter()
        , context = 'foo';

      e.once('foo', function (bar) {
        expect(this).to.equal(context);
        expect(bar).to.equal('bar');

        done();
      }, context).emit('foo', 'bar');
    });
  });

  describe('EventEmitter#removeListener', function () {
    it('should only remove the event with the specified function', function () {
      var e = new EventEmitter();

      function bar() {}
      e.on('foo', function () {});
      e.on('bar', function () {});
      e.on('bar', bar);

      expect(e.removeListener('foo', bar)).to.equal(e);
      expect(e.listeners('foo').length).to.equal(1);
      expect(e.listeners('bar').length).to.equal(2);

      expect(e.removeListener('foo')).to.equal(e);
      expect(e.listeners('foo').length).to.equal(0);
      expect(e.listeners('bar').length).to.equal(2);

      expect(e.removeListener('bar', bar)).to.equal(e);
      expect(e.listeners('bar').length).to.equal(1);
      expect(e.removeListener('bar')).to.equal(e);
      expect(e.listeners('bar').length).to.equal(0);
    });
  });

  describe('EventEmitter#removeAllListeners', function () {
    it('removes all events for the specified events', function () {
      var e = new EventEmitter();

      e.on('foo', function () { throw new Error('oops'); });
      e.on('foo', function () { throw new Error('oops'); });
      e.on('bar', function () { throw new Error('oops'); });
      e.on('aaa', function () { throw new Error('oops'); });

      expect(e.removeAllListeners('foo')).to.equal(e);
      expect(e.listeners('foo').length).to.equal(0);
      expect(e.listeners('bar').length).to.equal(1);
      expect(e.listeners('aaa').length).to.equal(1);

      expect(e.removeAllListeners('bar')).to.equal(e);
      expect(e.removeAllListeners('aaa')).to.equal(e);

      expect(e.emit('foo')).to.equal(false);
      expect(e.emit('bar')).to.equal(false);
      expect(e.emit('aaa')).to.equal(false);
    });

    it('just nukes the fuck out of everything', function () {
      var e = new EventEmitter();

      e.on('foo', function () { throw new Error('oops'); });
      e.on('foo', function () { throw new Error('oops'); });
      e.on('bar', function () { throw new Error('oops'); });
      e.on('aaa', function () { throw new Error('oops'); });

      expect(e.removeAllListeners()).to.equal(e);
      expect(e.listeners('foo').length).to.equal(0);
      expect(e.listeners('bar').length).to.equal(0);
      expect(e.listeners('aaa').length).to.equal(0);

      expect(e.emit('foo')).to.equal(false);
      expect(e.emit('bar')).to.equal(false);
      expect(e.emit('aaa')).to.equal(false);
    });
  });

  it('inherits when used with require(util).inherits', function () {
    function Beast() {
      /* rawr, i'm a beast */
    }

    require('util').inherits(Beast, EventEmitter);

    var moop = new Beast()
      , meap = new Beast();

    expect(moop).to.be.instanceOf(Beast);
    expect(moop).to.be.instanceof(EventEmitter);

    moop.listeners();
    meap.listeners();

    moop.on('data', function () {
      throw new Error('I should not emit');
    });

    meap.emit('data', 'rawr');
    meap.removeListener('foo');
    meap.removeAllListeners();
  });
});


text:
package com.microsoft.spring.data.gremlin.web.service.web.domain;

public class Greeting {

    private String id;

    private String content;

    public Greeting() {
    }

    public Greeting(String id, String content) {
        this.id = id;
        this.content = content;
    }

    public String getId() {
        return id;
    }

    public String getContent() {
        return content;
    }
}


text:
Brooklyn CLI
============

This is the Command Line Interface that you can use to interact with Brooklyn.

Commands available
==================

```
$ brooklyn help
usage: brooklyn [(-v | --verbose)] [(-q | --quiet)] <command> [<args>]

The most commonly used brooklyn commands are:
    help     Display help information
    launch   Starts a brooklyn application. Note that a BROOKLYN_CLASSPATH environment variable needs to be set up beforehand to point to the user application classpath.

See 'brooklyn help <command>' for more information on a specific command.
```

Launch command options
======================

```
$ brooklyn help launch
NAME
        brooklyn launch - Starts a brooklyn application. Note that a
        BROOKLYN_CLASSPATH environment variable needs to be set up beforehand to
        point to the user application classpath.

SYNOPSIS
        brooklyn [(-q | --quiet)] [(-v | --verbose)] launch
                [(-s <script URI> | --script <script URI>)] [(-nc | --noConsole)] [(-l <location list> | --location <location list> | --locations <location list>)...]
                (-a <application class or file> | --app <application class or file>)
                [(-p <port number> | --port <port number>)]

OPTIONS
        -a <application class or file>, --app <application class or file>
            The Application to start. For example my.AppName or
            file://my/AppName.groovy or classpath://my/AppName.groovy

        -l <location list>, --location <location list>, --locations <location
        list>
            Specifies the locations where the application will be launched.

        -nc, --noConsole
            Whether to start the web console

        -p <port number>, --port <port number>
            Specifies the port to be used by the Brooklyn Management Console.

        -q, --quiet
            Quiet mode

        -s <script URI>, --script <script URI>
            EXPERIMENTAL. URI for a Groovy script to parse and load. This script
            will run before starting the app.

        -v, --verbose
            Verbose mode
```

Example usage
=============

Launching one of the examples on localhost:
```
$ BROOKLYN_HOME=/path/to/brooklyn
$ PATH=$PATH:${BROOKLYN_HOME}/usage/dist/brooklyn-0.4.0-SNAPSHOT-dist/bin              # use right BROOKLYN_VERSION
$ export BROOKLYN_CLASSPATH=${BROOKLYN_HOME}/examples/simple-web-cluster/target/classes/   # point this to your app
$ brooklyn launch --app brooklyn.demo.SingleWebServerExample            # --location is set to localhost by default
```

----
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you 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.


text:
package org.apache.jackrabbit.oak.segment;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;

import javax.annotation.Nonnull;

import com.google.common.base.Supplier;
import org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState;
import org.apache.jackrabbit.oak.segment.file.FileStore;
import org.apache.jackrabbit.oak.segment.file.FileStoreBuilder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

public class NodeRecordTest {

    private static class Generation implements Supplier<Integer> {

        private int generation;

        public void set(int generation) {
            this.generation = generation;
        }

        @Override
        public Integer get() {
            return generation;
        }

    }

    @Rule
    public TemporaryFolder root = new TemporaryFolder();

    private FileStore newFileStore() throws Exception {
        return FileStoreBuilder.fileStoreBuilder(root.getRoot()).build();
    }

    @Test
    public void unreferencedNodeRecordShouldBeRoot() throws Exception {
        try (FileStore store = newFileStore()) {
            SegmentWriter writer = SegmentWriterBuilder.segmentWriterBuilder("test").build(store);
            SegmentNodeState state = writer.writeNode(EmptyNodeState.EMPTY_NODE);
            writer.flush();
        }
    }

    @Test
    public void stableIdShouldPersistAcrossGenerations() throws Exception {
        try (FileStore store = newFileStore()) {
            SegmentWriter writer;

            writer = SegmentWriterBuilder.segmentWriterBuilder("1").withGeneration(1).build(store);
            SegmentNodeState one = writer.writeNode(EmptyNodeState.EMPTY_NODE);
            writer.flush();

            writer = SegmentWriterBuilder.segmentWriterBuilder("2").withGeneration(2).build(store);
            SegmentNodeState two = writer.writeNode(one);
            writer.flush();

            writer = SegmentWriterBuilder.segmentWriterBuilder("3").withGeneration(3).build(store);
            SegmentNodeState three = writer.writeNode(two);
            writer.flush();

            assertArrayEquals(three.getStableIdBytes(), two.getStableIdBytes());
            assertArrayEquals(two.getStableIdBytes(), one.getStableIdBytes());
        }
    }

    @Test
    public void baseNodeStateShouldBeReusedAcrossGenerations() throws Exception {
        try (FileStore store = newFileStore()) {
            Generation generation = new Generation();

            // Create a new SegmentWriter. It's necessary not to have any cache,
            // otherwise the write of some records (in this case, template
            // records) will be cached and prevent this test to fail.

            SegmentWriter writer = SegmentWriterBuilder.segmentWriterBuilder("test")
                    .withGeneration(generation)
                    .withWriterPool()
                    .with(nodesOnlyCache())
                    .build(store);

            generation.set(1);

            // Write a new node with a non trivial template. This record will
            // belong to generation 1.

            SegmentNodeState base = writer.writeNode(EmptyNodeState.EMPTY_NODE.builder()
                    .setProperty("a", "a")
                    .setProperty("k", "v1")
                    .getNodeState()
            );
            writer.flush();

            generation.set(2);

            // Compact that same record to generation 2.

            SegmentNodeState compacted = writer.writeNode(base);
            writer.flush();

            // Assert that even if the two records have the same stable ID,
            // their physical ID and the ID of their templates are different.

            assertEquals(base.getStableId(), compacted.getStableId());
            assertNotEquals(base.getRecordId(), compacted.getRecordId());
            assertNotEquals(base.getTemplateId(), compacted.getTemplateId());

            // Create a new builder from the base, pre-compaction node state.
            // The base node state is from generation 1, but this builder will
            // be from generation 2 because every builder in the pool is
            // affected by the change of generation. Writing a node state from
            // this builder should perform a partial compaction.

            SegmentNodeState modified = (SegmentNodeState) base.builder().setProperty("k", "v2").getNodeState();

            // Assert that the stable ID of this node state is different from
            // the one in the base state. This is expected, since we have
            // modified the value of a property.

            assertNotEquals(modified.getStableId(), base.getStableId());
            assertNotEquals(modified.getStableId(), compacted.getStableId());

            // The node state should have reused the template from the compacted
            // node state, since this template didn't change and the code should
            // have detected that the base state of this builder was compacted
            // to a new generation.

            assertEquals(modified.getTemplateId(), compacted.getTemplateId());

            // Similarly the node state should have reused the property from
            // the compacted node state, since this property didn't change.

            Record modifiedProperty = (Record) modified.getProperty("a");
            Record compactedProperty = (Record) compacted.getProperty("a");

            assertNotNull(modifiedProperty);
            assertNotNull(compactedProperty);
            assertEquals(modifiedProperty.getRecordId(), compactedProperty.getRecordId());
        }
    }

    private WriterCacheManager nodesOnlyCache() {
        return new WriterCacheManager() {

            WriterCacheManager defaultCache = new WriterCacheManager.Default();

            @Nonnull
            @Override
            public RecordCache<String> getStringCache(int generation) {
                return Empty.INSTANCE.getStringCache(generation);
            }

            @Nonnull
            @Override
            public RecordCache<Template> getTemplateCache(int generation) {
                return Empty.INSTANCE.getTemplateCache(generation);
            }

            @Nonnull
            @Override
            public NodeCache getNodeCache(int generation) {
                return defaultCache.getNodeCache(generation);
            }
        };
    }

}


text:
create table t1 (i int, j int);

CREATE INDEX idx1 ON t1 (i);

CREATE  INDEX idx2 on t1(j);

ALTER  INDEX idx1 on t1(j) REBUILD;

show indexes from t1;

drop  table t1 ;

--+ holdcas on;

create table t1 (i int, j int);

CREATE INDEX idx1 ON t1 (i);

CREATE  INDEX idx2 on t1(j);

ALTER  INDEX idx1 on t1(j) REBUILD;

show indexes from t1;

drop  table t1 ;

commit;

--+ holdcas off;

create table t1 (FirstName varchar(20),LastName varchar(20),Age int,gender char (1));

insert into t1 value('yin', 'jian ye',31,'M');

CREATE INDEX first_name_lower ON t1 (LOWER(FirstName));

create  INDEX first_name_lower1 on t1(firstname) WHERE LOWER(FirstName)='yin';

ALTER  INDEX first_name_lower on t1(firstname) WHERE LOWER(FirstName)='yin' REBUILD;

show indexes from t1;

alter  INDEX first_name_lower1 on t1(firstname) REBUILD;

ALTER  INDEX first_name_lower on t1(FirstName) REBUILD;

ALTER  INDEX first_name_lower on t1(FirstName desc) REBUILD;

drop  table t1 ;

--+ holdcas on;

create table t1 (FirstName varchar(20),LastName varchar(20),Age int,gender char (1));

insert into t1 value('yin', 'jian ye',31,'M');

CREATE INDEX first_name_lower ON t1 (LOWER(FirstName));

create  INDEX first_name_lower1 on t1(firstname) WHERE LOWER(FirstName)='yin';

ALTER  INDEX first_name_lower on t1(firstname) WHERE LOWER(FirstName)='yin' REBUILD;

show indexes from t1;

alter  INDEX first_name_lower1 on t1(firstname) REBUILD;

ALTER  INDEX first_name_lower on t1(FirstName) REBUILD;

ALTER  INDEX first_name_lower on t1(FirstName desc) REBUILD;

drop  table t1 ;

commit;

--+ holdcas off;


text:
(function (window) {
  var Muuri = window.Muuri;

  QUnit.module('Item methods');

  QUnit.test(
    'isShowing: should return true if the item is animating to visible and otherwise false',
    function (assert) {
      assert.expect(5);

      var done = assert.async();
      var container = utils.createGridElements();
      var grid = new Muuri(container);
      var item = grid.getItems()[0];
      var teardown = function () {
        grid.destroy();
        container.parentNode.removeChild(container);
        done();
      };

      assert.strictEqual(
        item.isShowing(),
        false,
        'An item should not be in showing state when the it`s visible'
      );
      grid.hide([item], {
        onFinish: function () {
          assert.strictEqual(
            item.isShowing(),
            false,
            'An item should not be in showing state when the it`s hidden'
          );
          grid.show([item], {
            onFinish: function () {
              assert.strictEqual(
                item.isShowing(),
                false,
                'An item should not be in showing state after it has finished the show animation'
              );
              teardown();
            },
          });
          assert.strictEqual(
            item.isShowing(),
            true,
            'An item should be in showing state when it`s being animated to visible'
          );
        },
      });
      assert.strictEqual(
        item.isShowing(),
        false,
        'An item should not be in showing state when the it`s being animated to hidden'
      );
    }
  );
})(this);


text:
/**
 * Created by Aman on 10/09/14.
 */

module.exports = function(app, request, response, params){
    return {
        'index': function (command) {
//            if(command){
                console.log("\n\nin index:" + command.name);
                command.validate();
//            }
            this.showView('dummy.html');
        },
        'hello': function () {
            console.log("in hello");
        },
        'home': function () {
            response.write("Hello home! <br/>" + params.id + "-" + app.name);
        },
        'restricted': function(){
            response.write("You can't see me! ;-)");
        }
    }
};


text:
package com.amazonaws.services.ssmcontacts.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * A personal contact or escalation plan that Incident Manager engages during an incident.
 *

 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Contact implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * The Amazon Resource Name (ARN) of the contact or escalation plan.
     *

     */
    private String contactArn;
    /**
     *

     * The unique and identifiable alias of the contact or escalation plan.
     *

     */
    private String alias;
    /**
     *

     * The full name of the contact or escalation plan.
     *

     */
    private String displayName;
    /**
     *

     * Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is type
     * ESCALATION.
     *

     */
    private String type;

    /**
     *

     * The Amazon Resource Name (ARN) of the contact or escalation plan.
     *

     *
     * @param contactArn
     *        The Amazon Resource Name (ARN) of the contact or escalation plan.
     */

    public void setContactArn(String contactArn) {
        this.contactArn = contactArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the contact or escalation plan.
     *

     *
     * @return The Amazon Resource Name (ARN) of the contact or escalation plan.
     */

    public String getContactArn() {
        return this.contactArn;
    }

    /**
     *

     * The Amazon Resource Name (ARN) of the contact or escalation plan.
     *

     *
     * @param contactArn
     *        The Amazon Resource Name (ARN) of the contact or escalation plan.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Contact withContactArn(String contactArn) {
        setContactArn(contactArn);
        return this;
    }

    /**
     *

     * The unique and identifiable alias of the contact or escalation plan.
     *

     *
     * @param alias
     *        The unique and identifiable alias of the contact or escalation plan.
     */

    public void setAlias(String alias) {
        this.alias = alias;
    }

    /**
     *

     * The unique and identifiable alias of the contact or escalation plan.
     *

     *
     * @return The unique and identifiable alias of the contact or escalation plan.
     */

    public String getAlias() {
        return this.alias;
    }

    /**
     *

     * The unique and identifiable alias of the contact or escalation plan.
     *

     *
     * @param alias
     *        The unique and identifiable alias of the contact or escalation plan.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Contact withAlias(String alias) {
        setAlias(alias);
        return this;
    }

    /**
     *

     * The full name of the contact or escalation plan.
     *

     *
     * @param displayName
     *        The full name of the contact or escalation plan.
     */

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    /**
     *

     * The full name of the contact or escalation plan.
     *

     *
     * @return The full name of the contact or escalation plan.
     */

    public String getDisplayName() {
        return this.displayName;
    }

    /**
     *

     * The full name of the contact or escalation plan.
     *

     *
     * @param displayName
     *        The full name of the contact or escalation plan.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public Contact withDisplayName(String displayName) {
        setDisplayName(displayName);
        return this;
    }

    /**
     *

     * Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is type
     * ESCALATION.
     *

     *
     * @param type
     *        Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is
     *        type ESCALATION.
     * @see ContactType
     */

    public void setType(String type) {
        this.type = type;
    }

    /**
     *

     * Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is type
     * ESCALATION.
     *

     *
     * @return Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is
     *         type ESCALATION.
     * @see ContactType
     */

    public String getType() {
        return this.type;
    }

    /**
     *

     * Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is type
     * ESCALATION.
     *

     *
     * @param type
     *        Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is
     *        type ESCALATION.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see ContactType
     */

    public Contact withType(String type) {
        setType(type);
        return this;
    }

    /**
     *

     * Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is type
     * ESCALATION.
     *

     *
     * @param type
     *        Refers to the type of contact. A single contact is type PERSONAL and an escalation plan is
     *        type ESCALATION.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see ContactType
     */

    public Contact withType(ContactType type) {
        this.type = type.toString();
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getContactArn() != null)
            sb.append("ContactArn: ").append(getContactArn()).append(",");
        if (getAlias() != null)
            sb.append("Alias: ").append(getAlias()).append(",");
        if (getDisplayName() != null)
            sb.append("DisplayName: ").append(getDisplayName()).append(",");
        if (getType() != null)
            sb.append("Type: ").append(getType());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof Contact == false)
            return false;
        Contact other = (Contact) obj;
        if (other.getContactArn() == null ^ this.getContactArn() == null)
            return false;
        if (other.getContactArn() != null && other.getContactArn().equals(this.getContactArn()) == false)
            return false;
        if (other.getAlias() == null ^ this.getAlias() == null)
            return false;
        if (other.getAlias() != null && other.getAlias().equals(this.getAlias()) == false)
            return false;
        if (other.getDisplayName() == null ^ this.getDisplayName() == null)
            return false;
        if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
            return false;
        if (other.getType() == null ^ this.getType() == null)
            return false;
        if (other.getType() != null && other.getType().equals(this.getType()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getContactArn() == null) ? 0 : getContactArn().hashCode());
        hashCode = prime * hashCode + ((getAlias() == null) ? 0 : getAlias().hashCode());
        hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
        hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
        return hashCode;
    }

    @Override
    public Contact clone() {
        try {
            return (Contact) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.ssmcontacts.model.transform.ContactMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
@class HGFindBannerPicModel;

@interface HGFindBannerModel : NSObject

@property (nonatomic,copy) NSString *name;

@property (nonatomic,strong) HGFindBannerPicModel *banner_pic;

@end


text:
/**
 * The cell renderer used for displaying hyper links inside a table.
 */
qx.Class.define("PACKAGE.LinkCellRenderer",
{
  extend : qx.ui.table.cellrenderer.Default,

  /*
  *****************************************************************************
     MEMBERS
  *****************************************************************************
  */

  members :
  {
    // overridden
    _getContentHtml : function(cellInfo) {
    	return "" + cellInfo.value + "";
      //return qx.html.String.escape(this._formatValue(cellInfo));
    },

	setBuildHistoryID : function(id){
		this.buildHistoryID = id;
	}

  }
});


text:
package org.drip.analytics.holset;

/*
 * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 */

/*
 *    GENERATED on Wed Jul 04 22:35:36 EDT 2012 ---- DO NOT DELETE
 */

/*!
 * Copyright (C) 2012 Lakshmi Krishnamurthy
 * Copyright (C) 2011 Lakshmi Krishnamurthy
 *
 * This file is part of CreditAnalytics, a free-software/open-source library for
 *		fixed income analysts and developers - http://www.credit-trader.org
 *
 * CreditAnalytics is a free, full featured, fixed income credit analytics library, developed with a special focus
 * 		towards the needs of the bonds and credit products community.
 *
 *  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.
 */

public class JMDHoliday implements org.drip.analytics.holset.LocationHoliday {
	public JMDHoliday()
	{
	}

	public java.lang.String getHolidayLoc()
	{
		return "JMD";
	}

	public org.drip.analytics.holiday.Locale getHolidaySet()
	{
		org.drip.analytics.holiday.Locale lh = new
			org.drip.analytics.holiday.Locale();

		lh.addStaticHoliday ("01-JAN-1998", "New Years Day");

		lh.addStaticHoliday ("25-FEB-1998", "Ash Wednesday");

		lh.addStaticHoliday ("10-APR-1998", "Good Friday");

		lh.addStaticHoliday ("13-APR-1998", "Easter Monday");

		lh.addStaticHoliday ("25-MAY-1998", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-1998", "Independence Day");

		lh.addStaticHoliday ("19-OCT-1998", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-1998", "Christmas Day");

		lh.addStaticHoliday ("01-JAN-1999", "New Years Day");

		lh.addStaticHoliday ("17-FEB-1999", "Ash Wednesday");

		lh.addStaticHoliday ("02-APR-1999", "Good Friday");

		lh.addStaticHoliday ("05-APR-1999", "Easter Monday");

		lh.addStaticHoliday ("24-MAY-1999", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-1999", "Independence Day");

		lh.addStaticHoliday ("18-OCT-1999", "Heroes Day");

		lh.addStaticHoliday ("08-MAR-2000", "Ash Wednesday");

		lh.addStaticHoliday ("21-APR-2000", "Good Friday");

		lh.addStaticHoliday ("24-APR-2000", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2000", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2000", "Emancipation Day");

		lh.addStaticHoliday ("16-OCT-2000", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2000", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2000", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2001", "New Years Day");

		lh.addStaticHoliday ("28-FEB-2001", "Ash Wednesday");

		lh.addStaticHoliday ("13-APR-2001", "Good Friday");

		lh.addStaticHoliday ("16-APR-2001", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2001", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2001", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2001", "Independence Day");

		lh.addStaticHoliday ("15-OCT-2001", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2001", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2001", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2002", "New Years Day");

		lh.addStaticHoliday ("13-FEB-2002", "Ash Wednesday");

		lh.addStaticHoliday ("29-MAR-2002", "Good Friday");

		lh.addStaticHoliday ("01-APR-2002", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2002", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2002", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2002", "Independence Day");

		lh.addStaticHoliday ("21-OCT-2002", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2002", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2002", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2003", "New Years Day");

		lh.addStaticHoliday ("05-MAR-2003", "Ash Wednesday");

		lh.addStaticHoliday ("18-APR-2003", "Good Friday");

		lh.addStaticHoliday ("21-APR-2003", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2003", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2003", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2003", "Independence Day");

		lh.addStaticHoliday ("20-OCT-2003", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2003", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2003", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2004", "New Years Day");

		lh.addStaticHoliday ("25-FEB-2004", "Ash Wednesday");

		lh.addStaticHoliday ("09-APR-2004", "Good Friday");

		lh.addStaticHoliday ("12-APR-2004", "Easter Monday");

		lh.addStaticHoliday ("24-MAY-2004", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2004", "Independence Day");

		lh.addStaticHoliday ("18-OCT-2004", "Heroes Day");

		lh.addStaticHoliday ("09-FEB-2005", "Ash Wednesday");

		lh.addStaticHoliday ("25-MAR-2005", "Good Friday");

		lh.addStaticHoliday ("28-MAR-2005", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2005", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2005", "Emancipation Day");

		lh.addStaticHoliday ("17-OCT-2005", "Heroes Day");

		lh.addStaticHoliday ("26-DEC-2005", "Christmas Day Observed");

		lh.addStaticHoliday ("27-DEC-2005", "Boxing Day Observed");

		lh.addStaticHoliday ("02-JAN-2006", "New Years Day Observed");

		lh.addStaticHoliday ("01-MAR-2006", "Ash Wednesday");

		lh.addStaticHoliday ("14-APR-2006", "Good Friday");

		lh.addStaticHoliday ("17-APR-2006", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2006", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2006", "Emancipation Day");

		lh.addStaticHoliday ("16-OCT-2006", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2006", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2006", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2007", "New Years Day");

		lh.addStaticHoliday ("21-FEB-2007", "Ash Wednesday");

		lh.addStaticHoliday ("06-APR-2007", "Good Friday");

		lh.addStaticHoliday ("09-APR-2007", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2007", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2007", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2007", "Independence Day");

		lh.addStaticHoliday ("15-OCT-2007", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2007", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2007", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2008", "New Years Day");

		lh.addStaticHoliday ("06-FEB-2008", "Ash Wednesday");

		lh.addStaticHoliday ("21-MAR-2008", "Good Friday");

		lh.addStaticHoliday ("24-MAR-2008", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2008", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2008", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2008", "Independence Day");

		lh.addStaticHoliday ("20-OCT-2008", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2008", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2008", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2009", "New Years Day");

		lh.addStaticHoliday ("25-FEB-2009", "Ash Wednesday");

		lh.addStaticHoliday ("10-APR-2009", "Good Friday");

		lh.addStaticHoliday ("13-APR-2009", "Easter Monday");

		lh.addStaticHoliday ("25-MAY-2009", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2009", "Independence Day");

		lh.addStaticHoliday ("19-OCT-2009", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2009", "Christmas Day");

		lh.addStaticHoliday ("01-JAN-2010", "New Years Day");

		lh.addStaticHoliday ("17-FEB-2010", "Ash Wednesday");

		lh.addStaticHoliday ("02-APR-2010", "Good Friday");

		lh.addStaticHoliday ("05-APR-2010", "Easter Monday");

		lh.addStaticHoliday ("24-MAY-2010", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2010", "Independence Day");

		lh.addStaticHoliday ("18-OCT-2010", "Heroes Day");

		lh.addStaticHoliday ("09-MAR-2011", "Ash Wednesday");

		lh.addStaticHoliday ("22-APR-2011", "Good Friday");

		lh.addStaticHoliday ("25-APR-2011", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2011", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2011", "Emancipation Day");

		lh.addStaticHoliday ("17-OCT-2011", "Heroes Day");

		lh.addStaticHoliday ("26-DEC-2011", "Christmas Day Observed");

		lh.addStaticHoliday ("27-DEC-2011", "Boxing Day Observed");

		lh.addStaticHoliday ("02-JAN-2012", "New Years Day Observed");

		lh.addStaticHoliday ("22-FEB-2012", "Ash Wednesday");

		lh.addStaticHoliday ("06-APR-2012", "Good Friday");

		lh.addStaticHoliday ("09-APR-2012", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2012", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2012", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2012", "Independence Day");

		lh.addStaticHoliday ("15-OCT-2012", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2012", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2012", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2013", "New Years Day");

		lh.addStaticHoliday ("13-FEB-2013", "Ash Wednesday");

		lh.addStaticHoliday ("29-MAR-2013", "Good Friday");

		lh.addStaticHoliday ("01-APR-2013", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2013", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2013", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2013", "Independence Day");

		lh.addStaticHoliday ("21-OCT-2013", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2013", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2013", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2014", "New Years Day");

		lh.addStaticHoliday ("05-MAR-2014", "Ash Wednesday");

		lh.addStaticHoliday ("18-APR-2014", "Good Friday");

		lh.addStaticHoliday ("21-APR-2014", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2014", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2014", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2014", "Independence Day");

		lh.addStaticHoliday ("20-OCT-2014", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2014", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2014", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2015", "New Years Day");

		lh.addStaticHoliday ("18-FEB-2015", "Ash Wednesday");

		lh.addStaticHoliday ("03-APR-2015", "Good Friday");

		lh.addStaticHoliday ("06-APR-2015", "Easter Monday");

		lh.addStaticHoliday ("25-MAY-2015", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2015", "Independence Day");

		lh.addStaticHoliday ("19-OCT-2015", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2015", "Christmas Day");

		lh.addStaticHoliday ("01-JAN-2016", "New Years Day");

		lh.addStaticHoliday ("10-FEB-2016", "Ash Wednesday");

		lh.addStaticHoliday ("25-MAR-2016", "Good Friday");

		lh.addStaticHoliday ("28-MAR-2016", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2016", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2016", "Emancipation Day");

		lh.addStaticHoliday ("17-OCT-2016", "Heroes Day");

		lh.addStaticHoliday ("26-DEC-2016", "Christmas Day Observed");

		lh.addStaticHoliday ("27-DEC-2016", "Boxing Day Observed");

		lh.addStaticHoliday ("02-JAN-2017", "New Years Day Observed");

		lh.addStaticHoliday ("01-MAR-2017", "Ash Wednesday");

		lh.addStaticHoliday ("14-APR-2017", "Good Friday");

		lh.addStaticHoliday ("17-APR-2017", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2017", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2017", "Emancipation Day");

		lh.addStaticHoliday ("16-OCT-2017", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2017", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2017", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2018", "New Years Day");

		lh.addStaticHoliday ("14-FEB-2018", "Ash Wednesday");

		lh.addStaticHoliday ("30-MAR-2018", "Good Friday");

		lh.addStaticHoliday ("02-APR-2018", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2018", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2018", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2018", "Independence Day");

		lh.addStaticHoliday ("15-OCT-2018", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2018", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2018", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2019", "New Years Day");

		lh.addStaticHoliday ("06-MAR-2019", "Ash Wednesday");

		lh.addStaticHoliday ("19-APR-2019", "Good Friday");

		lh.addStaticHoliday ("22-APR-2019", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2019", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2019", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2019", "Independence Day");

		lh.addStaticHoliday ("21-OCT-2019", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2019", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2019", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2020", "New Years Day");

		lh.addStaticHoliday ("26-FEB-2020", "Ash Wednesday");

		lh.addStaticHoliday ("10-APR-2020", "Good Friday");

		lh.addStaticHoliday ("13-APR-2020", "Easter Monday");

		lh.addStaticHoliday ("25-MAY-2020", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2020", "Independence Day");

		lh.addStaticHoliday ("19-OCT-2020", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2020", "Christmas Day");

		lh.addStaticHoliday ("01-JAN-2021", "New Years Day");

		lh.addStaticHoliday ("17-FEB-2021", "Ash Wednesday");

		lh.addStaticHoliday ("02-APR-2021", "Good Friday");

		lh.addStaticHoliday ("05-APR-2021", "Easter Monday");

		lh.addStaticHoliday ("24-MAY-2021", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2021", "Independence Day");

		lh.addStaticHoliday ("18-OCT-2021", "Heroes Day");

		lh.addStaticHoliday ("02-MAR-2022", "Ash Wednesday");

		lh.addStaticHoliday ("15-APR-2022", "Good Friday");

		lh.addStaticHoliday ("18-APR-2022", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2022", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2022", "Emancipation Day");

		lh.addStaticHoliday ("17-OCT-2022", "Heroes Day");

		lh.addStaticHoliday ("26-DEC-2022", "Christmas Day Observed");

		lh.addStaticHoliday ("27-DEC-2022", "Boxing Day Observed");

		lh.addStaticHoliday ("02-JAN-2023", "New Years Day Observed");

		lh.addStaticHoliday ("22-FEB-2023", "Ash Wednesday");

		lh.addStaticHoliday ("07-APR-2023", "Good Friday");

		lh.addStaticHoliday ("10-APR-2023", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2023", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2023", "Emancipation Day");

		lh.addStaticHoliday ("16-OCT-2023", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2023", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2023", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2024", "New Years Day");

		lh.addStaticHoliday ("14-FEB-2024", "Ash Wednesday");

		lh.addStaticHoliday ("29-MAR-2024", "Good Friday");

		lh.addStaticHoliday ("01-APR-2024", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2024", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2024", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2024", "Independence Day");

		lh.addStaticHoliday ("21-OCT-2024", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2024", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2024", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2025", "New Years Day");

		lh.addStaticHoliday ("05-MAR-2025", "Ash Wednesday");

		lh.addStaticHoliday ("18-APR-2025", "Good Friday");

		lh.addStaticHoliday ("21-APR-2025", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2025", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2025", "Emancipation Day");

		lh.addStaticHoliday ("06-AUG-2025", "Independence Day");

		lh.addStaticHoliday ("20-OCT-2025", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2025", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2025", "Boxing Day");

		lh.addStaticHoliday ("01-JAN-2026", "New Years Day");

		lh.addStaticHoliday ("18-FEB-2026", "Ash Wednesday");

		lh.addStaticHoliday ("03-APR-2026", "Good Friday");

		lh.addStaticHoliday ("06-APR-2026", "Easter Monday");

		lh.addStaticHoliday ("25-MAY-2026", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2026", "Independence Day");

		lh.addStaticHoliday ("19-OCT-2026", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2026", "Christmas Day");

		lh.addStaticHoliday ("01-JAN-2027", "New Years Day");

		lh.addStaticHoliday ("10-FEB-2027", "Ash Wednesday");

		lh.addStaticHoliday ("26-MAR-2027", "Good Friday");

		lh.addStaticHoliday ("29-MAR-2027", "Easter Monday");

		lh.addStaticHoliday ("24-MAY-2027", "Labour Day Observed");

		lh.addStaticHoliday ("06-AUG-2027", "Independence Day");

		lh.addStaticHoliday ("18-OCT-2027", "Heroes Day");

		lh.addStaticHoliday ("01-MAR-2028", "Ash Wednesday");

		lh.addStaticHoliday ("14-APR-2028", "Good Friday");

		lh.addStaticHoliday ("17-APR-2028", "Easter Monday");

		lh.addStaticHoliday ("23-MAY-2028", "Labour Day");

		lh.addStaticHoliday ("01-AUG-2028", "Emancipation Day");

		lh.addStaticHoliday ("16-OCT-2028", "Heroes Day");

		lh.addStaticHoliday ("25-DEC-2028", "Christmas Day");

		lh.addStaticHoliday ("26-DEC-2028", "Boxing Day");

		lh.addStandardWeekend();

		return lh;
	}
}


text:
class Doctype : public Base {
  public:
    Doctype(std::string const &, std::string const &, std::string const &);
    virtual ~Doctype();

    virtual std::string str() const;

  private:
    std::string _n1;
    std::string _n2;
    std::string _n3;
};

#endif // vim:ft=cpp et sw=2 sts=2:


text:
import IAlias from "./IAlias";

export default interface IConfig {
  templatePath: string;
  parameters?: { [key: string]: any };
  alias?: {
    [key: string]: IAlias
  }
};


text:
<ion-view view-title="Closest Inspection" hide-back-button="false">
  <ion-content>

Closest Inspection

  </ion-content>
</ion-view>


text:
<?php

namespace Magento\Backend\Controller\Adminhtml\System\Design;

class Save extends \Magento\Backend\Controller\Adminhtml\System\Design
{
    /**
     * Filtering posted data. Converting localized data if needed
     *
     * @param array $data
     * @return array|null
     */
    protected function _filterPostData($data)
    {
        $inputFilter = new \Zend_Filter_Input(
            ['date_from' => $this->dateFilter, 'date_to' => $this->dateFilter],
            [],
            $data
        );
        $data = $inputFilter->getUnescaped();
        return $data;
    }

    /**
     * @return \Magento\Backend\Model\View\Result\Redirect
     */
    public function execute()
    {
        $data = $this->getRequest()->getPostValue();
        /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultRedirectFactory->create();

        if ($data) {
            $data['design'] = $this->_filterPostData($data['design']);
            $id = (int)$this->getRequest()->getParam('id');

            $design = $this->_objectManager->create('Magento\Framework\App\DesignInterface');
            if ($id) {
                $design->load($id);
            }

            $design->setData($data['design']);
            if ($id) {
                $design->setId($id);
            }
            try {
                $design->save();
                $this->_eventManager->dispatch('theme_save_after');
                $this->messageManager->addSuccess(__('You saved the design change.'));
            } catch (\Exception $e) {
                $this->messageManager->addError($e->getMessage());
                $this->_objectManager->get('Magento\Backend\Model\Session')->setDesignData($data);
                return $resultRedirect->setPath('adminhtml/*/', ['id' => $design->getId()]);
            }
        }

        return $resultRedirect->setPath('adminhtml/*/');
    }
}


text:
@import AddressBook;

enum AddressState
{
    ADDRESS_NO_AUTORIZED = 0,
    ADDRESS_PERMISSION_DISABLED = 1,
    ADDRESS_SUCCESS = 2
};

@interface AddressBookHelper : NSObject

-(void)allContact:(void(^)(id response))callBack;

-(void)checkPermission:(void(^)(id response))callback;

@end

@interface AddressBookPermission : NSObject

@property enum AddressState ReturnType;

@end;


text:
package org.psjava.formula.geometry;

import org.psjava.ds.geometry.Point2D;
import org.psjava.ds.numbersystrem.MultipliableNumberSystem;

import java.util.Comparator;

public class PointByDistanceComparator {

    public static <T> Comparator<Point2D<T>> create(final Point2D<T> ref, final MultipliableNumberSystem<T> ns) {
        return new Comparator<Point2D<T>>() {
            @Override
            public int compare(Point2D<T> p1, Point2D<T> p2) {
                return ns.compare(calcDistanceSquare(p1), calcDistanceSquare(p2));
            }

            private T calcDistanceSquare(Point2D<T> p) {
                return DistanceSquareBetweenPoints.calc(ns, ref, p);
            }
        };
    }

    private PointByDistanceComparator() {
    }

}


text:
package com.windfindtech.video;

import com.google.common.collect.Lists;
import com.xuggle.mediatool.*;
import com.xuggle.xuggler.IError;

import java.awt.image.BufferedImage;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by Xin on 10/27/2014.
 */
public class LiveStream {

    private boolean autoRecover = false;

    private final String input;
    private final String output;
    private final List<MediaToolAdapter> tools;

    private IMediaReader reader;
    private IMediaWriter writer;
    private ExecutorService executor;

    public LiveStream(String input, String output) {
        this(input, output, null);
    }

    public LiveStream(String input, String output, MediaToolAdapter... tools) {
        this.input = input;
        this.output = output;
        if (tools == null) {
            this.tools = Lists.newArrayList();
        } else {
            this.tools = Lists.newArrayList(tools);
        }
    }

    public boolean isAutoRecover() {
        return autoRecover;
    }

    public void setAutoRecover(boolean autoRecover) {
        this.autoRecover = autoRecover;
    }

    public IMediaReader getReader() {
        return reader;
    }

    public IMediaWriter getWriter() {
        return writer;
    }

    public void start() {
        this.init();

        this.executor = Executors.newSingleThreadExecutor();
        this.executor.execute(new Runnable() {

            @Override
            public void run() {
                _run();
            }
        });
    }

    public void stop() {
        if (this.executor != null) {
            this.executor.shutdown();
        }

        if (this.reader != null) {
            this.reader.close();
        }

        if (this.writer != null) {
            this.writer.close();
        }
    }

    public void dispose() {
        this.stop();
    }

    private void init() {
        this.reader = ToolFactory.makeReader(this.input);
        this.reader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);

        this.writer = ToolFactory.makeWriter(this.output, this.reader);

        IMediaGenerator chain = this.reader;
        for (MediaToolAdapter tool : this.tools) {
            chain.addListener(tool);
            chain = tool;
        }

        chain.addListener(this.writer);
    }

    private void _run() {
        while (true) {
            IError error = this.reader.readPacket();
            if (error != null) {
                System.out.println("error: " + error.getDescription());
                break;
            }
        }
    }
}


text:
package com.pearmilk.legian.model;

import com.pearmilk.jsdom.*;

/**
 * Created with IntelliJ IDEA.
 * User: matteopelati
 * Date: 10/9/13
 * Time: 1:39 PM
 * To change this template use File | Settings | File Templates.
 */
public class RawCodeProviderModel extends AbstractModel implements CodeProvider {
    String expr;

    public RawCodeProviderModel(String expr) {
        this.expr = expr;
    }

    @Override
    public JsToken getCode() {
        return new JsRaw(expr);
    }
}


text:
typedef struct EnemyStat{
	char Nama[99];
    int HP;
    int STR;
    int DEF;
    int EXP;
    char ACTION[20][5]; // 10 set aksi untuk masing" musuh, 20 utk boss
} EnemyStat;

//DEKLARASI VARIABLE GLOBAL
int enemyCount;
EnemyStat enemy[EnemyMax];

void LoadEnemy(char namaFile[]); //Membaca database enemy dari file eksternal, dijalankan diawal program

EnemyStat GetEnemy(int id, int monsterLVL);

#endif


text:
To the designers who went freelance, and dove into programming with an emphasis on design and front end development.  This is for you.

This is a repository to support a series of blog posts at [Coffeencoke's Blog](http://coffeencoke.com/blog/2013/10/25/dear-web-design-freelancer/).

My goal, is to produce several tutorials and building blocks to improve your workflow.  Who am I?  I am a senior software engineer, who loves a beautiful user experience, and appreciates what you do.  I just want to give you some tools, that you may, or may not, have had exposure to yet, and will improve your enjoyment of work -- hopefully :)

## Strategy

I wish to provide you with three examples for a series of topics.  If you commit yourself to learning these topics, I guarantee that you will improve your process, your product, and hopefully, your enjoyment.

*Please realize that my day job emphasizes on very complex software development, but I have experience in design, UX / Front End development, and I will try to present these topics in a way that you can appreciate*

1. Introduction to Software Source Control - never lose a thing, hack away safely.
2. Develop Locally - keep production happy
3. Deploy With Ease - No more hacking around with production servers
4. Automate Your Deployments - Ship your work more efficiently
5. Control Your Quality - Develop in peace, demonstrate with flexibility, test before production, and be at peace.

These are my five topics thus far, if you have other topics that you wish to see, please let me know.

### Extras

Extras that I don't want to commit to right now are

* SASS and HAML
* Coffeescript
* Javascript Testing
* Object Oriented Javascript
* Designing with a Grid
* Compass
* Cloud Servers
* SSL Certificates

# Contributions

View the CONTRIBUTING.md file for details.

This is owned by Matt Simpson with the MIT license.  View LICENSE.txt for more details.


text:
<?php

namespace Sicoob\SiccadBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class PessoaType extends AbstractType
{
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
            ->add('nome')
            ->add('apelido')
            ->add('email')
            ->add('site')
            ->add('enviaEmail')
            ->add('createdAt')
            ->add('updatedAt')
        ;
    }

    public function getName()
    {
        return 'sicoob_siccadbundle_pessoatype';
    }
}


text:
require('../../modules/es7.reflect.has-own-metadata');
module.exports = require('../../modules/_core').Reflect.hasOwnMetadata;


text:
using System;

using ASC.Migration.Core.Models.Api;

namespace ASC.Migration.Core.Models
{
    public abstract class MigratingUser<TContacts, TCalendar, TFiles, TMail> : ImportableEntity
        where TContacts : MigratingContacts
        where TCalendar : MigratingCalendar
        where TFiles : MigratingFiles
        where TMail : MigratingMail
    {
        public string Key { get; set; }

        public abstract string Email { get; }
        public abstract string DisplayName { get; }
        public abstract string ModuleName { get; }

        public TContacts MigratingContacts { get; set; } = default;

        public TCalendar MigratingCalendar { get; set; } = default;

        public TFiles MigratingFiles { get; set; } = default;

        public TMail MigratingMail { get; set; } = default;

        public virtual MigratingApiUser ToApiInfo()
        {
            return new MigratingApiUser()
            {
                Key = Key,
                Email = Email,
                DisplayName = DisplayName,
                ModuleName = ModuleName,
                MigratingCalendar = MigratingCalendar.ToApiInfo(),
                MigratingContacts = MigratingContacts.ToApiInfo(),
                MigratingFiles = MigratingFiles.ToApiInfo(),
                MigratingMail = MigratingMail.ToApiInfo()
            };
        }

        protected MigratingUser(Action<string, Exception> log) : base(log) { }
    }
}


text:
<readable><title>403523132_73b9a1a4b3</title><content>
A dog is about to get a ball that is on orange carpet .
A dog on wood floor is staring at a yellow ball that is lying on orange carpet .
A little brown dog stares at a tennis ball on an orange carpet .
Puppy playing with a tennis ball on an orange rug .
The dog crouched on the orange rug and stared at the tennis ball .
</content></readable>


text:
START_ATF_NAMESPACE
    typedef void *HDWP;
END_ATF_NAMESPACE


text:
ACCEPTED

#### According to
GRIN Taxonomy for Plants

#### Published in
Philipp. Agric. Rev. 7:266. 1914

#### Original name
null

### Remarks
null


text:
exopy_pulses.pulses package
==========================

.. automodule:: exopy_pulses.pulses
    :members:
    :undoc-members:
    :show-inheritance:

Subpackages
-----------

.. toctree::

    configs <configs/index>
    contexts <contexts/index>
    sequences <sequences/index>
    shapes <shapes/index>
    utils <utils/index>
    workspace <workspace/index>

Submodules
----------

.. toctree::

   declarations
   dependencies_analysis
   filters
   infos
   item
   manifest
   plugin
   pulse
   pulse_view


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you 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.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  <bean id="repositorySessionFactoryFactory" class="org.apache.archiva.reports.consumers.MockitoFactory"
        name="repositorySessionFactory">
    <constructor-arg value="org.apache.archiva.metadata.repository.RepositorySessionFactory"/>
  </bean>
  <bean id="repositoryPathTranslatorFactory" class="org.apache.archiva.reports.consumers.MockitoFactory"
        name="repositoryPathTranslator#maven2">
    <constructor-arg value="org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator"/>
  </bean>
</beans>


text:
require 'spec_helper'

describe 'Requests' do

  class Controller

    def current_user
      'My User'
    end

    def params
      {
        :action => 'test',
        :controller => 'test_controller',
        :format => 'json',
        :id => 44,
        :field => 'value'
      }
    end
  end

  context "Controller Requests" do

    let(:controller){ Controller.new }
    let(:request){ ::Playbook::Request::ControllerRequest.new(controller)}

    it 'should grab the controller params but leave out the controller, action, and format' do
      request.params.should eql({:id => 44, :field => 'value'})
    end

    it 'should return the same controller back' do
      request.controller.object_id.should eql(controller.object_id)
    end

  end

end


text:
namespace SimpleMVC.App.Data.Models
{
    using System.Collections.Generic;

    public class User
    {
        private ICollection<Note> notes;

        public User()
        {
            this.notes = new HashSet<Note>();
        }

        public int Id { get; set; }

        public string Username { get; set; }

        public string Password { get; set; }

        public virtual ICollection<Note> Notes
        {
            get { return this.notes; }
            set { this.notes = value; }
        }
    }
}