text:
// Generated source.
// Generator: org.chromium.sdk.internal.wip.tools.protocolgenerator.Generator
// Origin: http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/inspector/Inspector.json@108993

package org.chromium.sdk.internal.wip.protocol.input.page;

/**
 Information about the Frame hierarchy along with their cached resources.
 */
@org.chromium.sdk.internal.protocolparser.JsonType
public interface FrameResourceTreeValue {
  /**
   Frame information for this tree item.
   */
  org.chromium.sdk.internal.wip.protocol.input.page.FrameValue frame();

  /**
   Child frames.
   */
  @org.chromium.sdk.internal.protocolparser.JsonOptionalField
  java.util.List<org.chromium.sdk.internal.wip.protocol.input.page.FrameResourceTreeValue> childFrames();

  /**
   Information about frame resources.
   */
  java.util.List<Resources> resources();

  @org.chromium.sdk.internal.protocolparser.JsonType
  public interface Resources {
    /**
     Resource URL.
     */
    String url();

    /**
     Type of this resource.
     */
    org.chromium.sdk.internal.wip.protocol.input.page.ResourceTypeEnum type();

    /**
     Resource mimeType as determined by the browser.
     */
    String mimeType();

    /**
     True if the resource failed to load.
     */
    @org.chromium.sdk.internal.protocolparser.JsonOptionalField
    Boolean failed();

    /**
     True if the resource was canceled during loading.
     */
    @org.chromium.sdk.internal.protocolparser.JsonOptionalField
    Boolean canceled();

  }
}

redpajama_set_name: RedPajamaGithub


text:
al::FlexArray<ContextBase*> DeviceBase::sEmptyContextArray{0u};

DeviceBase::DeviceBase(DeviceType type) : Type{type}, mContexts{&sEmptyContextArray}
{
}

DeviceBase::~DeviceBase()
{
    auto *oldarray = mContexts.exchange(nullptr, std::memory_order_relaxed);
    if(oldarray != &sEmptyContextArray) delete oldarray;
}


text:
package net.sf.f8api;

public class ErrorCodes {
	/**
	 * An unknown error occured.
	 */
	public static final int FB_UNKNOWN_ERROR = 1;

	/**
	 * The service is not available at this time.
	 */
	public static final int FB_TEMP_UNAVAILABLE = 2;

	/**
	 * Returned by FB API when method is unknown.
	 */
	public static final int FB_UNKNOWN_METHOD = 3;

	/**
	 * The application has reached the maximum number of requests allowed. More
	 * requests are allowed once the time window has completed.
	 */
	public static final int FB_BUSY = 4;

	/**
	 * The request came from a remote address not allowed by this application.
	 */
	public static final int FB_IP_ADDR_DENIED = 5;

	/**
	 * One of the parameters specified was missing or invalid.
	 */
	public static final int FB_BAD_PARAMETER = 100;

	/**
	 * The api key submitted is not associated with any known application.
	 */
	public static final int FB_UNKNOWN_APIKEY = 101;

	/**
	 * The session key was improperly submitted or has reached its timeout.
	 * Direct the user to log in again to obtain another key.
	 */
	public static final int FB_SESSION_TIMEOUT = 102;

	/**
	 * The submitted call_id was not greater than the previous call_id for this
	 * session.
	 */
	public static final int FB_CALL_ID_EXPIRED = 103;

	/**
	 * Incorrect signature.
	 */
	public static final int FB_BAD_SIGNATURE = 104;

	/**
	 * Error while parsing FQL statement.
	 */
	public static final int FQL_PARSE_ERROR = 601;

	/**
	 * The field you requested does not exist.
	 */
	public static final int FQL_BAD_FIELD = 602;

	/**
	 * The table you requested does not exist.
	 */
	public static final int FQL_BAD_TABLE = 603;

	/**
	 * Your statement is not indexable.
	 */
	public static final int FQL_NO_INDEX = 604;

	/**
	 * The function you called does not exist.
	 */
	public static final int FQL_BAD_FUNCTION = 605;

	/**
	 * Wrong number of arguments passed into the function.
	 */
	public static final int FQL_WRONG_ARGUMENTS = 606;

}


text:
@interface UIView (WS)

@property (nonatomic) CGFloat f_left;
@property (nonatomic) CGFloat f_top;
@property (nonatomic) CGFloat f_right;
@property (nonatomic) CGFloat f_bottom;

@property (nonatomic) CGFloat f_width;
@property (nonatomic) CGFloat f_height;

@property (nonatomic) CGPoint f_origin;
@property (nonatomic) CGSize f_size;

@property (nonatomic) CGFloat f_centerX;
@property (nonatomic) CGFloat f_centerY;

@end


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

<!--

 This file is part of the Sylius package.

 (c) Paweł Jędrzejewski

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
    <services>
        <service id="sylius.behat.context.domain.notification" class="Sylius\Behat\Context\Domain\NotificationContext">
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.managing_orders" class="Sylius\Behat\Context\Domain\ManagingOrdersContext">
            <argument type="service" id="sylius.behat.shared_storage" />
            <argument type="service" id="__symfony__.sylius.repository.order"/>
            <argument type="service" id="__symfony__.sylius.repository.order_item"/>
            <argument type="service" id="__symfony__.sylius.repository.address"/>
            <argument type="service" id="__symfony__.sylius.repository.adjustment"/>
            <argument type="service" id="__symfony__.sylius.manager.order"/>
            <argument type="service" id="__symfony__.sylius.product_variant_resolver.default"/>
            <argument type="service" id="__symfony__.sylius.unpaid_orders_state_updater" />
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.managing_payments" class="Sylius\Behat\Context\Domain\ManagingPaymentsContext">
            <argument type="service" id="__symfony__.sylius.repository.payment"/>
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.managing_products" class="Sylius\Behat\Context\Domain\ManagingProductsContext">
            <argument type="service" id="sylius.behat.shared_storage" />
            <argument type="service" id="__symfony__.sylius.repository.product" />
            <argument type="service" id="__symfony__.sylius.repository.product_variant" />
            <argument type="service" id="__symfony__.sylius.repository.product_review" />
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.managing_promotions" class="Sylius\Behat\Context\Domain\ManagingPromotionsContext">
            <argument type="service" id="sylius.behat.shared_storage" />
            <argument type="service" id="__symfony__.sylius.repository.promotion" />
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.managing_promotion_coupons" class="Sylius\Behat\Context\Domain\ManagingPromotionCouponsContext">
            <argument type="service" id="sylius.behat.shared_storage" />
            <argument type="service" id="__symfony__.sylius.repository.promotion_coupon" />
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.security" class="Sylius\Behat\Context\Domain\SecurityContext">
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.managing_shipments" class="Sylius\Behat\Context\Domain\ManagingShipmentsContext">
            <argument type="service" id="__symfony__.sylius.repository.shipment"/>
            <tag name="fob.context_service" />
        </service>

        <service id="sylius.behat.context.domain.cart" class="Sylius\Behat\Context\Domain\CartContext">
            <argument type="service" id="__symfony__.sylius.manager.order" />
            <argument type="service" id="__symfony__.sylius.expired_carts_remover" />
            <tag name="fob.context_service" />
        </service>
    </services>
</container>


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title>pymatgen.io.atat module — pymatgen 2019.7.2 documentation</title>
    <link rel="stylesheet" href="_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />

Navigation

          index

          modules |

pymatgen 2019.7.2 documentation »

pymatgen.io.atat module¶

class Mcsqs(structure)[source]¶

Bases: object

Handle input/output for the crystal definition format
used by mcsqs and other ATAT codes.

Parameters

structure – input Structure

static structure_from_string(data)[source]¶

Parses a rndstr.in or lat.in file into pymatgen's
Structure format.

Parameters

data – contents of a rndstr.in or lat.in file

Returns

Structure object

to_string()[source]¶

Returns a structure in mcsqs rndstr.in format.
:return (str):

Navigation

          index

          modules |

pymatgen 2019.7.2 documentation »

        © Copyright 2011, Pymatgen Development Team.
      Created using Sphinx 2.0.1.

This page uses
Google Analytics to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.


text:
#pragma once

#include "FlockBase.h"

using namespace Ogre;

/**
	\author Bernardino Frola

	\brief Specialization of FlockBase class. Implement the player controlled flock behavior.

	This class provide the player controlled flock behavior.
 */
class FlockPlayer :
	public FlockBase
{
	// ************************************************************************
	// Types definitions
	// ************************************************************************
public:
	enum mBehaviourStates
	{
		STATE_SINGLESHOT,
		STATE_ATTACKING,
		STATE_DEFENCING,
		STATE_IDLE
	};

	// ************************************************************************
	// Constructors/Destructors
	// ************************************************************************

	FlockPlayer(const std::string& name,
		Vector3 startPosition );

	// ************************************************************************
	// Methods
	// ************************************************************************

	void onUpdateFlock(const float currentTime, const float elapsedTime);

	// Called when the player select an enemy flock
	void setSelectedEnemy( FlockBase* selectedFlock, float flockDistance );

	void showImpactCamera( bool show );

	void defence();
	void attack();
	void idle();

	void singleShotAttack( float attackChargeLevel );

	// ************************************************************************
	// GET/SET Methods
	// ************************************************************************
	void increaseTargetDistance(float incRatio);

	float getTargetDistance() { return mTargetDistance; }

	void setTargetDistance( float targetDistance ) { mTargetDistance = targetDistance; }

	void setAiming( bool aiming ) { mAiming = aiming; };

	/**
		Used by flock items for resume behavior.
	*/
	//bool isAttacking() { return mBehaviourState == STATE_ATTACKING; }

	// ************************************************************************
	// Fields
	// ************************************************************************
protected:
	float mTargetDistance;

	/**
		Attacking/idle/singleshot attack
	*/
	mBehaviourStates mBehaviourState;

	/**
		Ent time of the single shot attack.
	*/
	float mSingleShotEndTime;

	/**
		True if the player is charging the single-shot attack.
	*/
	bool mAiming;
};


text:
package org.jets3t.service.acl.gs;

import com.jamesmurty.utils.XMLBuilder;

import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;

import org.jets3t.service.acl.GroupGrantee;

/**
 * Represents an Group By Domain Grantee, that is a group identified by their domain address.
 *
 * @author Google Developers
 *
 */
public class GroupByDomainGrantee extends GroupGrantee {
    public GroupByDomainGrantee() {
      super();
    }

    /**
     * Constructs a group grantee object using the given domain address as an identifier.
     *
     * @param domain Domain address
     */
    public GroupByDomainGrantee(String domain) {
      super(domain);
    }

    @Override
    public XMLBuilder toXMLBuilder() throws TransformerException,
        ParserConfigurationException, FactoryConfigurationError
    {
        return (XMLBuilder.create("Scope")
            .attr("type", "GroupByDomain")
            .element("Domain").text(this.getIdentifier())
            );
    }

    @Override
    public String toString() {
        return "GroupByDomain [" + this.getIdentifier() + "]";
    }
}


text:
class EfficientAdapterScreen
  include Gametel

  list_item(:abertam, :text => 'Abertam')
end


text:
package aws

import (
	"fmt"
	"testing"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/service/sns"
	"github.com/hashicorp/terraform/helper/acctest"
	"github.com/hashicorp/terraform/helper/resource"
	"github.com/hashicorp/terraform/terraform"
)

func TestAccAWSSNSTopicSubscription_basic(t *testing.T) {
	ri := acctest.RandInt()

	resource.Test(t, resource.TestCase{
		PreCheck:     func() { testAccPreCheck(t) },
		Providers:    testAccProviders,
		CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy,
		Steps: []resource.TestStep{
			resource.TestStep{
				Config: testAccAWSSNSTopicSubscriptionConfig(ri),
				Check: resource.ComposeTestCheckFunc(
					testAccCheckAWSSNSTopicExists("aws_sns_topic.test_topic"),
					testAccCheckAWSSNSTopicSubscriptionExists("aws_sns_topic_subscription.test_subscription"),
				),
			},
		},
	})
}

func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
	conn := testAccProvider.Meta().(*AWSClient).snsconn

	for _, rs := range s.RootModule().Resources {
		if rs.Type != "aws_sns_topic" {
			continue
		}

		// Try to find key pair
		req := &sns.GetSubscriptionAttributesInput{
			SubscriptionArn: aws.String(rs.Primary.ID),
		}

		_, err := conn.GetSubscriptionAttributes(req)

		if err == nil {
			return fmt.Errorf("Subscription still exists, can't continue.")
		}

		// Verify the error is an API error, not something else
		_, ok := err.(awserr.Error)
		if !ok {
			return err
		}
	}

	return nil
}

func testAccCheckAWSSNSTopicSubscriptionExists(n string) resource.TestCheckFunc {
	return func(s *terraform.State) error {
		rs, ok := s.RootModule().Resources[n]
		if !ok {
			return fmt.Errorf("Not found: %s", n)
		}

		if rs.Primary.ID == "" {
			return fmt.Errorf("No SNS subscription with that ARN exists")
		}

		conn := testAccProvider.Meta().(*AWSClient).snsconn

		params := &sns.GetSubscriptionAttributesInput{
			SubscriptionArn: aws.String(rs.Primary.ID),
		}
		_, err := conn.GetSubscriptionAttributes(params)

		if err != nil {
			return err
		}

		return nil
	}
}

func testAccAWSSNSTopicSubscriptionConfig(i int) string {
	return fmt.Sprintf(`
resource "aws_sns_topic" "test_topic" {
    name = "terraform-test-topic"
}

resource "aws_sqs_queue" "test_queue" {
	name = "terraform-subscription-test-queue-%d"
}

resource "aws_sns_topic_subscription" "test_subscription" {
    topic_arn = "${aws_sns_topic.test_topic.arn}"
    protocol = "sqs"
    endpoint = "${aws_sqs_queue.test_queue.arn}"
}
`, i)
}


text:
Challenge1
==========

Big Data Hadoop challenge

Summery
=======

The goal is to cluster the abstracts of some articles from the New York Times newspaper.

PART 1: Data acquisition
========================

Part 1 of this homework consists on downloading data using an API. The NY Times API is available at http://developer.nytimes.com. It provides access to various articles, both historic and new. For this assignment we are interested in the Times NewswireAPI, which provides access to articles, blogs, and so on, as they are being produced. For each article we can obtain directly from the API its URL and its abstract, among other information. Your tasks for this section of the problem are the following:

1. Downloading the data (5 pts)

- Study the API, download 50,000 different articles from the Times Newswire API.

- For each of them save the URL and the abstract. Note that because articles are created continually, you may end up downloading some articles multiple times; you should make sure that you do not store each article more than once.

- For each article assign a unique docID. Note that this part is not completely trivial because often the API does not return the expected document, so you need to catch the exceptions thrown, put the right delays, and retry, for some steps.

PART 2: Preprocessing, tf-idf
=============================

Review: The map function takes four parameters which by default correspond to:

a. WritableComparable key - the byte-offset of the current line in the file

b. Writable value - the line from the file

c. OutputCollector - output - this has the .collect method to output a <key, value> pair

d. Reporter reporter - allows us to retrieve some information about the job (like the current filename)

 2. Preprocessing of the abstracts. (10 pts)

- Your map function should extract individual words from the input it is given, and output the word as the key, and the current filename as the value. Thus, the map function (or one of them) should output <"word", "filename"> pairs.

- Remove all punctuation and numbers, and keep only the words.

- Convert each word to lowercase, remove stopwords.

- Extra credit (+2 pts): perform word stemming (see for example Porter's stemmer or the NLTK python package)

Hints:
======

* Since in this example we want to output <"word", "filename"> pairs, the types will both be Text.

* The word count program had an example of extracting individual words from a line

* To get the current filename, use the following code snippet:

    FileSplit fileSplit = (FileSplit)reporter.getInputSplit();

    String fileName = fileSplit.getPath().getName();

3. TF-IDF (5 pts)

- For each document compute its tf-idf vector as explained in *******

- Extra credit (+2 pts): Normalize with respect to document length

* Note that to accomplish this section of the homework you might need to perform a series of MR jobs and not just a single job

PART 3: Clustering
==================

Perform clustering using as features the vector space produced by tf-idf

4. Use a clustering algorithm of your choice (10 pts)

- Explain why did you chose that particular algorithm, what are pros and cons

- Explain design decisions with respect to the number of clusters (if applicable)

- Extra credit (+2 pts): use a quantitative approach to select the 'best' number of clusters (if applicable)

5. Perform a statistical analysis about the top 20 most discriminative terms per cluster (5 pts)

- Use tf-idf scores to find most discriminative terms per cluster

6. Present a visualization of clusters and term frequencies (5 pts)

- Use any graphic/visualization program of your choice

- Be creative and present useful graphs

7. Submit a presentation explaining/describing/showing clearly each of the previous 6 points. After submission, no further changes to your presentation will be allowed

Total: 40 points + 6 extra credit proportional to 23 pots of your final grade


text:
require "rails"
require "contentflow/version"

module Contentflow
  require "contentflow/engine"
end


text:
class DashboardGroupMilestone < GlobalMilestone
  extend ::Gitlab::Utils::Override

  attr_reader :group_name

  override :initialize
  def initialize(milestone)
    super(milestone.title, Array(milestone))

    @group_name = milestone.group.full_name
  end

  def self.build_collection(groups)
    MilestonesFinder.new(group_ids: groups.pluck(:id)).execute.map { |m| new(m) }
  end

  override :group_milestone?
  def group_milestone?
    @first_milestone.group_milestone?
  end

  override :milestoneish_ids
  def milestoneish_ids
    milestones.map(&:id)
  end

  def group
    @first_milestone.group
  end

  def iid
    @first_milestone.iid
  end
end


text:
from indico.util import json
from indico.web.http_api.metadata.serializer import Serializer

class JSONSerializer(Serializer):
    """Basically direct translation from the fossil."""

    _mime = 'application/json'

    def _execute(self, fossil):
        return json.dumps(fossil, pretty=self.pretty)

Serializer.register('json', JSONSerializer)


text:
package codeOrchestra.colt.as.compiler.fcsh.make.messages;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author Alexander Eliseyev
 */
@SuppressWarnings("serial")
public class CompilerMessage implements Serializable {

  private final static String MESSAGE_PATTERN = "^\\s*((?:\\w:)?[^:]+)\\((\\d+)\\):\\s+col:\\s+(\\d+):?\\s+(Error|Warning):\\s+(.+)\\s*$";

  // Match group numbers:

  // 1 - source path
  // 2 - line number
  // 3 - column number
  // 4 - message type
  // 5 - message contents

  private String sourcePath;
  private int lineNumber;
  private int columnNumber;
  private MessageType type;
  private String content;

  private CompilerMessage(Matcher messageMatcher) {
    String sourcePathRaw = messageMatcher.group(1);
    this.sourcePath = sourcePathRaw.contains("^") ? sourcePathRaw.substring(sourcePathRaw.indexOf("^") + 1, sourcePathRaw.length()).trim() : sourcePathRaw;
    this.lineNumber = Integer.parseInt(messageMatcher.group(2));
    this.columnNumber = Integer.parseInt(messageMatcher.group(3));
    this.type = MessageType.parse(messageMatcher.group(4));
    this.content = messageMatcher.group(5);
  }

  public static CompilerMessagesWrapper extract(String compilerOutput) {
    List<CompilerMessage> compilerMessages = new ArrayList<>();

    Pattern pattern = Pattern.compile(MESSAGE_PATTERN, Pattern.MULTILINE);
    Matcher matcher = pattern.matcher(compilerOutput);

    while (matcher.find()) {
      compilerMessages.add(new CompilerMessage(matcher));
    }

    return new CompilerMessagesWrapper(compilerMessages);
  }

  public MessageType getType() {
    return type;
  }

  public String getContent() {
    return content;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    CompilerMessage that = (CompilerMessage) o;

    if (columnNumber != that.columnNumber) return false;
    if (lineNumber != that.lineNumber) return false;
    if (content != null ? !content.equals(that.content) : that.content != null) return false;
    if (sourcePath != null ? !sourcePath.equals(that.sourcePath) : that.sourcePath != null) return false;
    return type == that.type;
  }

  @Override
  public int hashCode() {
    int result = sourcePath != null ? sourcePath.hashCode() : 0;
    result = 31 * result + lineNumber;
    result = 31 * result + columnNumber;
    result = 31 * result + (type != null ? type.hashCode() : 0);
    result = 31 * result + (content != null ? content.hashCode() : 0);
    return result;
  }

  @Override
  public String toString() {
    return "CompilerMessage{" +
      "sourcePath='" + sourcePath + '\'' +
      ", lineNumber=" + lineNumber +
      ", columnNumber=" + columnNumber +
      ", type=" + type +
      ", content='" + content + '\'' +
      '}';
  }

  public String getReportMessage() {
    return getContent() + " (line: " + lineNumber + ", source: " + sourcePath + ")";
  }
}


text:
namespace spii {

// Holds a point in the Nelder-Mead simplex.
// Equipped with a comparison operator for sorting.
struct SimplexPoint
{
	Eigen::VectorXd x;
	double value;

	bool operator<(const SimplexPoint& rhs) const
	{
		return this->value < rhs.value;
	}
};

// If required for debugging.
std::ostream& operator<<(std::ostream& out, const SimplexPoint& point)
{
	out << point.x.transpose() << " : " << point.value;
	return out;
}

}  // namespace spii

namespace std
{
	template<>
	void swap<spii::SimplexPoint>(spii::SimplexPoint& lhs, spii::SimplexPoint& rhs)
	{
		lhs.x.swap(rhs.x);
		swap(lhs.value, rhs.value);
	}
}

namespace spii {

void initialize_simplex(const Function& function,
                        const Eigen::VectorXd& x0,
                        std::vector<SimplexPoint>* simplex)
{
	size_t n = function.get_number_of_scalars();
	Eigen::VectorXd absx0 = x0;
	for (size_t i = 0; i < n; ++i) {
		absx0[i] = std::abs(x0[i]);
	}
	double scale = std::max(absx0.maxCoeff(), 1.0);
	const double nd = static_cast<double>(n);
	double alpha1 = scale / (nd * std::sqrt(2.0)) * (std::sqrt(nd+1)- 1 + nd);
	double alpha2 = scale / (nd * std::sqrt(2.0)) * (std::sqrt(nd+1) - 1);
	Eigen::VectorXd alpha2_vec(x0.size());
	alpha2_vec.setConstant(alpha2);

	simplex->at(0).x = x0;
	for (size_t i = 1; i < n + 1; ++i) {
		simplex->at(i).x  = x0 + alpha2_vec;
		simplex->at(i).x[i-1] = x0[i-1] + alpha1;
	}

	for (size_t i = 0; i < n + 1; ++i) {
		simplex->at(i).value = function.evaluate(simplex->at(i).x);
	}

	std::sort(simplex->begin(), simplex->end());
}

void NelderMeadSolver::solve(const Function& function,
                             SolverResults* results) const
{
	double global_start_time = wall_time();

	// Dimension of problem.
	size_t n = function.get_number_of_scalars();

	if (n == 0) {
		results->exit_condition = SolverResults::FUNCTION_TOLERANCE;
		return;
	}

	// The Nelder-Mead simplex.
	std::vector<SimplexPoint> simplex(n + 1);

	// Copy the user state to the current point.
	Eigen::VectorXd x;
	function.copy_user_to_global(&x);

	initialize_simplex(function, x, &simplex);

	SimplexPoint mean_point;
	SimplexPoint reflection_point;
	SimplexPoint expansion_point;
	mean_point.x.resize(n);
	reflection_point.x.resize(n);
	expansion_point.x.resize(n);

	double fmin  = std::numeric_limits<double>::quiet_NaN();
	double fmax  = std::numeric_limits<double>::quiet_NaN();
	double fval  = std::numeric_limits<double>::quiet_NaN();
	double area  = std::numeric_limits<double>::quiet_NaN();
	double area0 = std::numeric_limits<double>::quiet_NaN();
	double length  = std::numeric_limits<double>::quiet_NaN();
	double length0 = std::numeric_limits<double>::quiet_NaN();

	Eigen::MatrixXd area_mat(n, n);

	//
	// START MAIN ITERATION
	//
	results->startup_time   += wall_time() - global_start_time;
	results->exit_condition = SolverResults::INTERNAL_ERROR;
	int iter = 0;
	int n_shrink_in_a_row = 0;
	while (true) {

		//
		// In each iteration, the worst point in the simplex
		// is replaced with a new one.
		//
		double start_time = wall_time();

		mean_point.x.setZero();
		fval = 0;
		// Compute the mean of the best n points.
		for (size_t i = 0; i < n; ++i) {
			mean_point.x += simplex[i].x;
			fval         += simplex[i].value;
		}
		fval         /= double(n);
		mean_point.x /= double(n);
		fmin = simplex[0].value;
		fmax = simplex[n].value;

		const char* iteration_type = "n/a";

		// Compute the reflexion point and evaluate it.
		reflection_point.x = 2.0 * mean_point.x - simplex[n].x;
		reflection_point.value = function.evaluate(reflection_point.x);

		bool is_shrink = false;
		if (simplex[0].value <= reflection_point.value &&
			reflection_point.value < simplex[n - 1].value) {
			// Reflected point is neither better nor worst in the
			// new simplex.
			std::swap(reflection_point, simplex[n]);
			iteration_type = "Reflect 1";
		}
		else if (reflection_point.value < simplex[0].value) {
			// Reflected point is better than the current best; try
			// to go farther along this direction.

			// Compute expansion point.
			expansion_point.x = 3.0 * mean_point.x - 2.0 * simplex[n].x;
			expansion_point.value = function.evaluate(expansion_point.x);

			if (expansion_point.value < reflection_point.value) {
				std::swap(expansion_point, simplex[n]);
				iteration_type = "Expansion";
			}
			else {
				std::swap(reflection_point, simplex[n]);
				iteration_type = "Reflect 2";
			}
		}
		else {
			// Reflected point is still worse than x[n]; contract.
			bool success = false;

			if (simplex[n - 1].value <= reflection_point.value &&
			    reflection_point.value < simplex[n].value) {
				// Try to perform "outside" contraction.
				expansion_point.x = 1.5 * mean_point.x - 0.5 * simplex[n].x;
				expansion_point.value = function.evaluate(expansion_point.x);

				if (expansion_point.value <= reflection_point.value) {
					std::swap(expansion_point, simplex[n]);
					success = true;
					iteration_type = "Outside contraction";
				}
			}
			else {
				// Try to perform "inside" contraction.
				expansion_point.x = 0.5 * mean_point.x + 0.5 * simplex[n].x;
				expansion_point.value = function.evaluate(expansion_point.x);

				if (expansion_point.value < simplex[n].value) {
					std::swap(expansion_point, simplex[n]);
					success = true;
					iteration_type = "Inside contraction";
				}
			}

			if (! success) {
				// Neither outside nor inside contraction was acceptable;
				// shrink the simplex toward the best point.
				for (size_t i = 1; i < n + 1; ++i) {
					simplex[i].x = 0.5 * (simplex[0].x + simplex[i].x);
					simplex[i].value = function.evaluate(simplex[i].x);
					iteration_type = "Shrink";
					is_shrink = true;
				}
			}
		}

		std::sort(simplex.begin(), simplex.end());

		results->function_evaluation_time += wall_time() - start_time;

		//
		// Test stopping criteriea
		//
		start_time = wall_time();

		// Compute the area of the simplex.
		length = 0;
		for (size_t i = 0; i < n; ++i) {
			area_mat.col(i) = simplex[i].x - simplex[n].x;
			length = std::max(length, area_mat.col(i).norm());
		}
		area = std::abs(area_mat.determinant());
		if (iter == 0) {
			area0 = area;
			length0 = length;
		}

		if (area / area0 < this->area_tolerance) {
			results->exit_condition = SolverResults::GRADIENT_TOLERANCE;
			break;
		}

		if (area == 0) {
			results->exit_condition = SolverResults::GRADIENT_TOLERANCE;
			break;
		}

		if (length / length0 < this->length_tolerance) {
			results->exit_condition = SolverResults::GRADIENT_TOLERANCE;
			break;
		}

		if (is_shrink) {
			n_shrink_in_a_row++;
		}
		else {
			n_shrink_in_a_row = 0;
		}
		if (n_shrink_in_a_row > 50) {
			results->exit_condition = SolverResults::GRADIENT_TOLERANCE;
			break;
		}

		if (iter >= this->maximum_iterations) {
			results->exit_condition = SolverResults::NO_CONVERGENCE;
			break;
		}

		if (this->callback_function) {
			CallbackInformation information;
			information.objective_value = simplex[0].value;
			information.x = &simplex[0].x;

			if (!callback_function(information)) {
				results->exit_condition = SolverResults::USER_ABORT;
				break;
			}
		}
		results->stopping_criteria_time += wall_time() - start_time;

		//
		// Restarting
		//
		//if (area / area1 < 1e-10) {
		//	x = simplex[0].x;
		//	initialize_simplex(function, x, &simplex);
		//	area1 = area;
		//	if (this->log_function) {
		//		this->log_function("Restarted.");
		//	}
		//}

		//
		// Log the results of this iteration.
		//
		start_time = wall_time();

		int log_interval = 1;
		if (iter > 30) {
			log_interval = 10;
		}
		if (iter > 200) {
			log_interval = 100;
		}
		if (iter > 2000) {
			log_interval = 1000;
		}
		if (this->log_function && iter % log_interval == 0) {
			char str[1024];
				if (iter == 0) {
					this->log_function("Itr     min(f)     avg(f)     max(f)    area    length   type");
				}
				std::sprintf(str, "%6d %+.3e %+.3e %+.3e %.3e %.3e %s",
					iter, fmin, fval, fmax, area, length, iteration_type);
			this->log_function(str);
		}
		results->log_time += wall_time() - start_time;

		iter++;
	}

	// Return the best point as solution.
	function.copy_global_to_user(simplex[0].x);
	results->total_time += wall_time() - global_start_time;

	if (this->log_function) {
		char str[1024];
		std::sprintf(str, " end   %+.3e                       %.3e %.3e", fval, area, length);
		this->log_function(str);
	}
}

}  // namespace spii


text:
def deprecated(old):
   def new(phenny, input, old=old):
      self = phenny
      origin = type('Origin', (object,), {
         'sender': input.sender,
         'nick': input.nick
      })()
      match = input.match
      args = [input.bytes, input.sender, '@@']

      old(self, origin, match, args)
   new.__module__ = old.__module__
   new.__name__ = old.__name__
   return new

if __name__ == '__main__':
   print __doc__.strip()


text:
require 'rtoolchain/gnu/gcc/gcc'
require 'rtoolchain/gnu/gcc/gpp'

module RToolchain
  def RToolchain.gcc(options={},&block)
    @gcc ||= GNU::GCC.native

    return @gcc.compile(options,&block)
  end

  def RToolchain.gpp(options={},&block)
    @gpp ||= GNU::GPP.native

    return @gpp.compile(options,&block)
  end
end


text:
package org.apache.nutch.parse.zip;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Properties;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.apache.nutch.metadata.Metadata;
import org.apache.nutch.net.protocols.Response;
import org.apache.nutch.parse.Outlink;
import org.apache.nutch.parse.ParseData;
import org.apache.nutch.parse.ParseImpl;
import org.apache.nutch.parse.ParseResult;
import org.apache.nutch.parse.ParseStatus;
import org.apache.nutch.parse.Parser;
import org.apache.nutch.protocol.Content;
import org.apache.hadoop.conf.Configuration;

/**
 * ZipParser class based on MSPowerPointParser class by Stephan Strittmatter.
 * Nutch parse plugin for zip files - Content Type : application/zip
 *
 * @author Rohit Kulkarni & Ashish Vaidya
 */
public class ZipParser implements Parser {

  private static final Log LOG = LogFactory.getLog(ZipParser.class);
  private Configuration conf;

  /** Creates a new instance of ZipParser */
  public ZipParser() {
  }

  public ParseResult getParse(final Content content) {

    String resultText = null;
    String resultTitle = null;
    Outlink[] outlinks = null;
    List outLinksList = new ArrayList();
    Properties properties = null;

    try {
      final String contentLen = content.getMetadata().get(Response.CONTENT_LENGTH);
      final int len = Integer.parseInt(contentLen);
      if (LOG.isDebugEnabled()) { LOG.debug("ziplen: " + len); }
      final byte[] contentInBytes = content.getContent();
      final ByteArrayInputStream bainput = new ByteArrayInputStream(
          contentInBytes);
      final InputStream input = bainput;

      if (contentLen != null && contentInBytes.length != len) {
        return new ParseStatus(ParseStatus.FAILED,
            ParseStatus.FAILED_TRUNCATED, "Content truncated at "
                + contentInBytes.length
                + " bytes. Parser can't handle incomplete pdf file.")
            .getEmptyParseResult(content.getUrl(), getConf());
      }

      ZipTextExtractor extractor = new ZipTextExtractor(getConf());

      // extract text
      resultText = extractor.extractText(new ByteArrayInputStream(
          contentInBytes), content.getUrl(), outLinksList);

    } catch (Exception e) {
      return new ParseStatus(ParseStatus.FAILED,
          "Can't be handled as Zip document. " + e).getEmptyParseResult(content.getUrl(), getConf());
    }

    if (resultText == null) {
      resultText = "";
    }

    if (resultTitle == null) {
      resultTitle = "";
    }

    outlinks = (Outlink[]) outLinksList.toArray(new Outlink[0]);
    final ParseData parseData = new ParseData(ParseStatus.STATUS_SUCCESS,
                                              resultTitle, outlinks,
                                              content.getMetadata());

    if (LOG.isTraceEnabled()) { LOG.trace("Zip file parsed sucessfully !!"); }
    return ParseResult.createParseResult(content.getUrl(), new ParseImpl(resultText, parseData));
  }

  public void setConf(Configuration conf) {
    this.conf = conf;
  }

  public Configuration getConf() {
    return this.conf;
  }

}


text:
import {DOCUMENT} from '@angular/common';
import {Inject, Injectable, OnDestroy} from '@angular/core';
import {addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId} from './aria-reference';

/**
 * Interface used to register message elements and keep a count of how many registrations have
 * the same message and the reference to the message element used for the `aria-describedby`.
 */
export interface RegisteredMessage {
  /** The element containing the message. */
  messageElement: Element;

  /** The number of elements that reference this message element via `aria-describedby`. */
  referenceCount: number;
}

/** ID used for the body container where all messages are appended. */
export const MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';

/** ID prefix used for each created message element. */
export const CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';

/** Attribute given to each host element that is described by a message element. */
export const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';

/** Global incremental identifier for each registered message element. */
let nextId = 0;

/** Global map of all registered message elements that have been placed into the document. */
const messageRegistry = new Map<string|Element, RegisteredMessage>();

/** Container for all registered messages. */
let messagesContainer: HTMLElement | null = null;

/**
 * Utility that creates visually hidden elements with a message content. Useful for elements that
 * want to use aria-describedby to further describe themselves without adding additional visual
 * content.
 */
@Injectable({providedIn: 'root'})
export class AriaDescriber implements OnDestroy {
  private _document: Document;

  constructor(
    @Inject(DOCUMENT) _document: any) {
    this._document = _document;
  }

  /**
   * Adds to the host element an aria-describedby reference to a hidden element that contains
   * the message. If the same message has already been registered, then it will reuse the created
   * message element.
   */
  describe(hostElement: Element, message: string, role?: string): void;

  /**
   * Adds to the host element an aria-describedby reference to an already-existing message element.
   */
  describe(hostElement: Element, message: HTMLElement): void;

  describe(hostElement: Element, message: string|HTMLElement, role?: string): void {
    if (!this._canBeDescribed(hostElement, message)) {
      return;
    }

    const key = getKey(message, role);

    if (typeof message !== 'string') {
      // We need to ensure that the element has an ID.
      setMessageId(message);
      messageRegistry.set(key, {messageElement: message, referenceCount: 0});
    } else if (!messageRegistry.has(key)) {
      this._createMessageElement(message, role);
    }

    if (!this._isElementDescribedByMessage(hostElement, key)) {
      this._addMessageReference(hostElement, key);
    }
  }

  /** Removes the host element's aria-describedby reference to the message. */
  removeDescription(hostElement: Element, message: string, role?: string): void;

  /** Removes the host element's aria-describedby reference to the message element. */
  removeDescription(hostElement: Element, message: HTMLElement): void;

  removeDescription(hostElement: Element, message: string|HTMLElement, role?: string): void {
    if (!message || !this._isElementNode(hostElement)) {
      return;
    }

    const key = getKey(message, role);

    if (this._isElementDescribedByMessage(hostElement, key)) {
      this._removeMessageReference(hostElement, key);
    }

    // If the message is a string, it means that it's one that we created for the
    // consumer so we can remove it safely, otherwise we should leave it in place.
    if (typeof message === 'string') {
      const registeredMessage = messageRegistry.get(key);
      if (registeredMessage && registeredMessage.referenceCount === 0) {
        this._deleteMessageElement(key);
      }
    }

    if (messagesContainer && messagesContainer.childNodes.length === 0) {
      this._deleteMessagesContainer();
    }
  }

  /** Unregisters all created message elements and removes the message container. */
  ngOnDestroy() {
    const describedElements =
        this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}]`);

    for (let i = 0; i < describedElements.length; i++) {
      this._removeCdkDescribedByReferenceIds(describedElements[i]);
      describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);
    }

    if (messagesContainer) {
      this._deleteMessagesContainer();
    }

    messageRegistry.clear();
  }

  /**
   * Creates a new element in the visually hidden message container element with the message
   * as its content and adds it to the message registry.
   */
  private _createMessageElement(message: string, role?: string) {
    const messageElement = this._document.createElement('div');
    setMessageId(messageElement);
    messageElement.textContent = message;

    if (role) {
      messageElement.setAttribute('role', role);
    }

    this._createMessagesContainer();
    messagesContainer!.appendChild(messageElement);
    messageRegistry.set(getKey(message, role), {messageElement, referenceCount: 0});
  }

  /** Deletes the message element from the global messages container. */
  private _deleteMessageElement(key: string|Element) {
    const registeredMessage = messageRegistry.get(key);
    const messageElement = registeredMessage && registeredMessage.messageElement;
    if (messagesContainer && messageElement) {
      messagesContainer.removeChild(messageElement);
    }
    messageRegistry.delete(key);
  }

  /** Creates the global container for all aria-describedby messages. */
  private _createMessagesContainer() {
    if (!messagesContainer) {
      const preExistingContainer = this._document.getElementById(MESSAGES_CONTAINER_ID);

      // When going from the server to the client, we may end up in a situation where there's
      // already a container on the page, but we don't have a reference to it. Clear the
      // old container so we don't get duplicates. Doing this, instead of emptying the previous
      // container, should be slightly faster.
      if (preExistingContainer && preExistingContainer.parentNode) {
        preExistingContainer.parentNode.removeChild(preExistingContainer);
      }

      messagesContainer = this._document.createElement('div');
      messagesContainer.id = MESSAGES_CONTAINER_ID;
      // We add `visibility: hidden` in order to prevent text in this container from
      // being searchable by the browser's Ctrl + F functionality.
      // Screen-readers will still read the description for elements with aria-describedby even
      // when the description element is not visible.
      messagesContainer.style.visibility = 'hidden';
      // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that
      // the description element doesn't impact page layout.
      messagesContainer.classList.add('cdk-visually-hidden');

      this._document.body.appendChild(messagesContainer);
    }
  }

  /** Deletes the global messages container. */
  private _deleteMessagesContainer() {
    if (messagesContainer && messagesContainer.parentNode) {
      messagesContainer.parentNode.removeChild(messagesContainer);
      messagesContainer = null;
    }
  }

  /** Removes all cdk-describedby messages that are hosted through the element. */
  private _removeCdkDescribedByReferenceIds(element: Element) {
    // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX
    const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby')
        .filter(id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0);
    element.setAttribute('aria-describedby', originalReferenceIds.join(' '));
  }

  /**
   * Adds a message reference to the element using aria-describedby and increments the registered
   * message's reference count.
   */
  private _addMessageReference(element: Element, key: string|Element) {
    const registeredMessage = messageRegistry.get(key)!;

    // Add the aria-describedby reference and set the
    // describedby_host attribute to mark the element.
    addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);
    element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, '');
    registeredMessage.referenceCount++;
  }

  /**
   * Removes a message reference from the element using aria-describedby
   * and decrements the registered message's reference count.
   */
  private _removeMessageReference(element: Element, key: string|Element) {
    const registeredMessage = messageRegistry.get(key)!;
    registeredMessage.referenceCount--;

    removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);
    element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);
  }

  /** Returns true if the element has been described by the provided message ID. */
  private _isElementDescribedByMessage(element: Element, key: string|Element): boolean {
    const referenceIds = getAriaReferenceIds(element, 'aria-describedby');
    const registeredMessage = messageRegistry.get(key);
    const messageId = registeredMessage && registeredMessage.messageElement.id;

    return !!messageId && referenceIds.indexOf(messageId) != -1;
  }

  /** Determines whether a message can be described on a particular element. */
  private _canBeDescribed(element: Element, message: string|HTMLElement|void): boolean {
    if (!this._isElementNode(element)) {
      return false;
    }

    if (message && typeof message === 'object') {
      // We'd have to make some assumptions about the description element's text, if the consumer
      // passed in an element. Assume that if an element is passed in, the consumer has verified
      // that it can be used as a description.
      return true;
    }

    const trimmedMessage = message == null ? '' : `${message}`.trim();
    const ariaLabel = element.getAttribute('aria-label');

    // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the
    // element, because screen readers will end up reading out the same text twice in a row.
    return trimmedMessage ? (!ariaLabel || ariaLabel.trim() !== trimmedMessage) : false;
  }

  /** Checks whether a node is an Element node. */
  private _isElementNode(element: Node): element is Element {
    return element.nodeType === this._document.ELEMENT_NODE;
  }
}

/** Gets a key that can be used to look messages up in the registry. */
function getKey(message: string|Element, role?: string): string|Element {
  return typeof message === 'string' ? `${role || ''}/${message}` : message;
}

/** Assigns a unique ID to an element, if it doesn't have one already. */
function setMessageId(element: HTMLElement) {
  if (!element.id) {
    element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${nextId++}`;
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
	<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
	    android:id="@+id/scrollView1"
	    android:layout_width="match_parent"
	    android:layout_height="match_parent"
	    android:background="@drawable/chat_bg"
	    android:paddingBottom="@dimen/activity_vertical_margin"
	    android:paddingLeft="@dimen/activity_horizontal_margin"
	    android:paddingRight="@dimen/activity_horizontal_margin"
	    android:paddingTop="@dimen/activity_vertical_margin" >

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >
            <LinearLayout
		        android:id="@+id/linearLayout1"
		        android:layout_width="wrap_content"
		        android:layout_height="wrap_content"
		        android:layout_below="@+id/nutritionalZodiacSignSpinner"
		        android:layout_centerHorizontal="true"
		        android:layout_marginTop="24dp" >

                <ImageButton
		            android:id="@+id/nutritionalFormSaveBtn"
		            android:layout_width="wrap_content"
		            android:layout_height="wrap_content"
		            android:background="@null"
		            android:src="@drawable/button_save" />

		        <ImageButton
		            android:id="@+id/nutritionalFormBackBtn"
		            android:layout_width="wrap_content"
		            android:layout_height="wrap_content"
		            android:background="@null"
		            android:layout_marginLeft="5dp"
		            android:src="@drawable/button_back" />

		    </LinearLayout>

            <TextView
                android:id="@+id/nutritionalReligionLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/lbl_nutritional_religion" />

            <Spinner
                android:id="@+id/nutritionalReligionSpinner"
                style="@style/PinkSpinner"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalReligionLabel" />

            <TextView
                android:id="@+id/nutritionalLanguagesLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalReligionSpinner"
                android:text="@string/lbl_nutritional_languages" />

            <EditText
                android:id="@+id/nutritionalLanguagesText"
                style="@style/PinkEditText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalLanguagesLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_languages" />

            <TextView
                android:id="@+id/nutritionalOccupationLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalLanguagesText"
                android:text="@string/lbl_nutritional_occupation" />

            <EditText
                android:id="@+id/nutritionalFavoriteAlbumText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalFavoriteAlbumLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_album" />

            <TextView
                android:id="@+id/nutritionalFavoriteAlbumLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/nutritionalOccupationSpinner"
                android:text="@string/lbl_nutritional_album" />

            <EditText
                android:id="@+id/nutritionalFavoriteBookText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalFavoriteBookLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_book" />

            <TextView
                android:id="@+id/nutritionalFavoriteBookLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalFavoriteAlbumText"
                android:text="@string/lbl_nutritional_book" />

            <Spinner
                android:id="@+id/nutritionalOccupationSpinner"
                style="@style/PinkSpinner"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalOccupationLabel" />

            <TextView
                android:id="@+id/nutritionalFavoriteArtistLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalFavoriteBookText"
                android:text="@string/lbl_nutritional_artist" />

            <EditText
                android:id="@+id/nutritionalFavoriteArtistText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalFavoriteArtistLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_artist" />

            <TextView
                android:id="@+id/nutritionalFavoriteMovie"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalFavoriteArtistText"
                android:text="@string/lbl_nutritional_movie" />

            <EditText
                android:id="@+id/nutritionalFavoriteMovieText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalFavoriteMovie"
                android:ems="10"
                android:hint="@string/lbl_nutritional_movie" />

            <TextView
                android:id="@+id/nutritionalJokeLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalFavoriteMovieText"
                android:text="@string/lbl_nutritional_joke" />

            <EditText
                android:id="@+id/nutritionalJokeText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalJokeLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_joke"
                android:inputType="textMultiLine" />

            <TextView
                android:id="@+id/nutritionalDrinkLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalJokeText"
                android:text="@string/lbl_nutritional_drink" />

            <EditText
                android:id="@+id/nutritionalDrinkText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalDrinkLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_drink" >

            </EditText>

            <TextView
                android:id="@+id/nutritionalFavoriteCountryLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalDrinkText"
                android:text="@string/lbl_nutritional_country" />

            <EditText
                android:id="@+id/nutritionalFavoriteCountryText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalFavoriteCountryLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_country" />

            <TextView
                android:id="@+id/nutritionalQuoteLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalFavoriteCountryText"
                android:text="@string/lbl_nutritional_quote" />

            <EditText
                android:id="@+id/nutritionalQuoteText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalQuoteLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_quote" />

            <TextView
                android:id="@+id/nutritionalHobbyLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalQuoteText"
                android:text="@string/lbl_nutritional_hobby" />

            <EditText
                android:id="@+id/nutritionalHobbyText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalHobbyLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_hobby" />

            <TextView
                android:id="@+id/nutritionalFavoriteDateLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalHobbyText"
                android:text="@string/lbl_nutritional_date" />

            <EditText
                android:id="@+id/nutritionalFavoriteDateText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalFavoriteDateLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_date"
                android:inputType="textMultiLine" />

            <TextView
                android:id="@+id/nutritionalPoliticsLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalFavoriteDateText"
                android:text="@string/lbl_nutritional_politics" />

            <Spinner
                android:id="@+id/nutritionalPoliticsSpinner"
                style="@style/PinkSpinner"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalPoliticsLabel" />

            <TextView
                android:id="@+id/nutritionalSportsLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalPoliticsSpinner"
                android:text="@string/lbl_nutritional_sport" />

            <EditText
                android:id="@+id/nutritionalSportsText"
                style="@style/PinkEditText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalSportsLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_sport" />

            <TextView
                android:id="@+id/nutritionalFavoriteFoodLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalSportsText"
                android:text="@string/lbl_nutritional_food" />

            <EditText
                android:id="@+id/nutritionalFavoriteFoodText"
                style="@style/PinkEditText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalFavoriteFoodLabel"
                android:ems="10"
                android:hint="@string/lbl_nutritional_food" />

            <TextView
                android:id="@+id/nutritionalZodiazSignLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/nutritionalFavoriteFoodText"
                android:text="@string/lbl_nutritional_zodiac" />

            <Spinner
                android:id="@+id/nutritionalZodiacSignSpinner"
                style="@style/PinkSpinner"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_below="@+id/nutritionalZodiazSignLabel" />

        </RelativeLayout>
    </ScrollView>


text:
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2012-2019, Intel Corporation
// written by Roman Dementiev
//            Patrick Konsor
//

#pragma once

/*!     \file mmio.h
        \brief Interface to access memory mapped IO registers

*/

#include "types.h"

#ifdef _MSC_VER
#include "windows.h"
#include "winpmem\winpmem.h"
#include "Winmsrdriver\msrstruct.h"
#else
#include <unistd.h>
#endif

#include "mutex.h"
#include <memory>

namespace pcm {

#ifdef _MSC_VER

class MMIORangeInterface
{
public:
    virtual uint32 read32(uint64 offset) = 0;
    virtual uint64 read64(uint64 offset) = 0;
    virtual void write32(uint64 offset, uint32 val) = 0;
    virtual void write64(uint64 offset, uint64 val) = 0;
    virtual ~MMIORangeInterface() {}
};

class WinPmemMMIORange : public MMIORangeInterface
{
    static std::shared_ptr<WinPmem> pmem;
    static Mutex mutex;
    static bool writeSupported;
    uint64 startAddr;

    template <class T>
    void writeInternal(uint64 offset, T val)
    {
        if (!writeSupported)
        {
            std::cerr << "PCM Error: MMIORange writes are not supported by the driver\n";
            return;
        }
        if (readonly)
        {
            std::cerr << "PCM Error: attempting to write to a read-only MMIORange\n";
            return;
        }
        mutex.lock();
        pmem->write(startAddr + offset, val);
        mutex.unlock();
    }
    template <class T>
    void readInternal(uint64 offset, T & res)
    {
        mutex.lock();
        pmem->read(startAddr + offset, res);
        mutex.unlock();
    }
    const bool readonly;
public:
    WinPmemMMIORange(uint64 baseAddr_, uint64 size_, bool readonly_ = true);
    uint32 read32(uint64 offset)
    {
        uint32 result = 0;
        readInternal(offset, result);
        return result;
    }
    uint64 read64(uint64 offset)
    {
        uint64 result = 0;
        readInternal(offset, result);
        return result;
    }
    void write32(uint64 offset, uint32 val)
    {
        writeInternal(offset, val);
    }
    void write64(uint64 offset, uint64 val)
    {
        writeInternal(offset, val);
    }
};

class OwnMMIORange : public MMIORangeInterface
{
    HANDLE hDriver;
    char * mmapAddr;
public:
    OwnMMIORange(uint64 baseAddr_, uint64 size_, bool readonly_ = true);
    uint32 read32(uint64 offset);
    uint64 read64(uint64 offset);
    void write32(uint64 offset, uint32 val);
    void write64(uint64 offset, uint64 val);
    ~OwnMMIORange();
};

class MMIORange
{
    std::shared_ptr<MMIORangeInterface> impl;
public:
    MMIORange(uint64 baseAddr_, uint64 size_, bool readonly_ = true);
    uint32 read32(uint64 offset)
    {
        return impl->read32(offset);
    }
    uint64 read64(uint64 offset)
    {
        return impl->read64(offset);
    }
    void write32(uint64 offset, uint32 val)
    {
        impl->write32(offset, val);
    }
    void write64(uint64 offset, uint64 val)
    {
        impl->write64(offset, val);
    }
};

#elif defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)

class MMIORange
{
#ifndef __APPLE__
    int32 fd;
#endif
    char * mmapAddr;
    const uint64 size;
#ifndef __APPLE__
    const bool readonly;
#endif
public:
    MMIORange(uint64 baseAddr_, uint64 size_, bool readonly_ = true);
    uint32 read32(uint64 offset);
    uint64 read64(uint64 offset);
    void write32(uint64 offset, uint32 val);
    void write64(uint64 offset, uint64 val);
    ~MMIORange();
};
#endif

} // namespace pcm


text:
package br.com.lemao.environment.model.bicycle;

import br.com.lemao.environment.model.biker.Biker;

public class Bicycle {

	private Long id;
	private Long serialNumber;
	private String modelName;
	private Biker owner;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(Long serialNumber) {
		this.serialNumber = serialNumber;
	}

	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	public Biker getOwner() {
		return owner;
	}

	public void setOwner(Biker owner) {
		this.owner = owner;
	}

}


text:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using StackExchange.DataExplorer.Tests;
using StackExchange.DataExplorer.Helpers;
using StackExchange.DataExplorer;

namespace CloudOverflowWeb.Tests.Models
{
    [TestClass]
    public class TestPivots : BaseTest
    {
        [TestMethod]
        public void TestBasicMerging()
        {
            var results1 = new QueryResults();
            var results2 = new QueryResults();

            results1.ResultSets = new List<ResultSet>() { new ResultSet() };
            results2.ResultSets = new List<ResultSet>() { new ResultSet() };

            results1.ResultSets[0].Columns = new List<ResultColumnInfo>
            {
                new ResultColumnInfo{ Name = "col1", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "col2", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "Pivot", Type = ResultColumnType.Default }
            };

            results2.ResultSets[0].Columns = new List<ResultColumnInfo>
            {
                new ResultColumnInfo{ Name = "col1", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "col2", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "Pivot", Type = ResultColumnType.Default }
            };

            results1.ResultSets[0].Rows = new List<List<object>>
            {
                new List<object>{1,1,1},
                new List<object>{2,2,2},
                new List<object>{3,3,3},
            };

            results2.ResultSets[0].Rows = new List<List<object>>
            {
                new List<object>{2,2,99}
            };

            QueryRunner.MergePivot(Current.DB.Sites.First(), results1, results2);

            Assert.IsNull(results1.ResultSets[0].Rows[0][3]);
            Assert.AreEqual(99, results1.ResultSets[0].Rows[1][3]);
            Assert.IsNull(results1.ResultSets[0].Rows[2][3]);
        }

        [TestMethod]
        public void TestGapsInFirstResultSet()
        {
            var results1 = new QueryResults();
            var results2 = new QueryResults();

            results1.ResultSets = new List<ResultSet>() { new ResultSet() };
            results2.ResultSets = new List<ResultSet>() { new ResultSet() };

            results1.ResultSets[0].Columns = new List<ResultColumnInfo>
            {
                new ResultColumnInfo{ Name = "col1", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "col2", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "Pivot", Type = ResultColumnType.Default }
            };

            results2.ResultSets[0].Columns = new List<ResultColumnInfo>
            {
                new ResultColumnInfo{ Name = "col1", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "col2", Type = ResultColumnType.Default },
                new ResultColumnInfo{ Name = "Pivot", Type = ResultColumnType.Default }
            };

            results1.ResultSets[0].Rows = new List<List<object>>
            {
                new List<object>{1,1,1},
                new List<object>{2,2,2},
                new List<object>{3,3,3},
            };

            results2.ResultSets[0].Rows = new List<List<object>>
            {
                new List<object>{2,2,99},
                new List<object>{4,4,666}
            };

            QueryRunner.MergePivot(Current.DB.Sites.First(), results1, results2);

            Assert.IsNull(results1.ResultSets[0].Rows[0][3]);
            Assert.AreEqual(99, results1.ResultSets[0].Rows[1][3]);
            Assert.IsNull(results1.ResultSets[0].Rows[2][3]);

            Assert.IsNull(results1.ResultSets[0].Rows[3][2]);
            Assert.AreEqual(666, results1.ResultSets[0].Rows[3][3]);
        }
    }
}


text:
#ifndef HASH_H_
#define HASH_H_

#define HTSIZE	175447
#define KEY_LEN 128
#define VAL_LEN 128

typedef struct Entry {
	char key[KEY_LEN];
	char val[VAL_LEN];
	struct Entry *next;
} Entry;

typedef struct HashTable {
	Entry **tbl;
	unsigned int size;
} HashTable;

/*
 * External API
 */
HashTable* initialize(int table_size);
unsigned int H(HashTable *ht, const char *key);
Entry* Find(HashTable *ht, const char *key);
void Insert(HashTable *ht, const char *key, const char *val);

#endif


text:
module.exports = function(services, logger) {
	var me = this;
	var eventAssertionService = services.eventAssertionService;

	me.validate = function(object, callback) {
		var errors = [];

		me.done = function() {
			var bVal = { valid: !(errors.length), errors: errors };
			callback(bVal);
		};

		me.validateObject(object, errors, me.done);
	};

	/**
	 * Default messages to include with validation errors.
	**/
	me.messages = {
		name: "Name value is incorrect",
		description: "Description value is incorrect",
		record:	"There is a record-level error"
	};

	me.validateObject = function(object, errors, done) {
		var id = object._id;
		var value = object.name;
		me.nameExists(id, value, errors, function (err, found) {
			var property = 'name';
			if (value !== undefined) {
				if (found) {
					me.error(property, value, errors, "Event Assertion " + property + " already exists.");
					logger.debug("nameExists " + value);
				}
			}

			me.eventAssertionExists(object, errors, function (err, found) {
				var property = 'record';
				if (found) {
					me.error(property, value, errors, "EventAssertion already exists.");
					logger.debug("eventAssertionExists " + JSON.stringify(object));
				}

				done();
			});
		});
	};

	/**
	 ** nameExists verifies the uniqueness of the name in the object.
	 ** Makes an async call to the data service to retrieve a matching object.
	 ** If found, submits an error to the errors collection.
	 ** Returns in the callback any system error and a boolean indicating whether
	 **   or not the name was found.
	**/
	me.nameExists = function (id, value, errors, callback) {
		if (value !== undefined) {
			eventAssertionService.findWhere({name: value}, function(err, docs) {
				if (err) {
					me.error('name', value, errors, 'Error reading Event Assertion name ' + err);
					logger.error({error : "Error getting Event Assertion " + err});
					callback(err, false);
				} else if (0 !== docs.length) {
					if (id && id.toString() === docs[0]._id.toString()) {
						logger.debug("Event Assertion found for nameExists matching current _id" + JSON.stringify(docs));
						callback(err, false);
					} else {
						logger.debug("Event Assertion found for nameExists" + JSON.stringify(docs));
						callback(err, true);
					}
				} else {
					logger.debug("Event Assertion name not found " + value);
					callback(err, false);
				}
			});
		} else {
			callback(null, false);
		}
	};

	/**
	 * eventAssertionExists verifies the uniqueness of the entire object.
	 * Makes an async call to the data service to retrieve a matching object
	 * matching against all object attributes.
	 * If found, submits an error to the errors collection.
	 * Returns in the callback any system error and a boolean indicating whether
	 * or not the event assertion was found.
	**/
	me.eventAssertionExists = function(object, errors, callback) {
		eventAssertionService.findWhere(object, function(err, locs){
			if (err) {
				me.error('record', object, errors, 'Error reading Event Assertion ' + err);
				logger.error({ error : "Error getting Event Assertion by object " + err });
				callback(err, false);
			} else if (0 !== locs.length) {
				logger.debug("Event Assertion found for Event Assertion exists" + JSON.stringify(locs));
				callback(err, true);
			} else {
				logger.debug("Event Assertion not found " + JSON.stringify(object));
				callback(err, false);
			}
		});
	};

	me.error = function(property, actual, errors, msg) {
		var lookup = {
			property : property
		};

		var message = msg || me.messages[property] || "no default message";

		message = message.replace(/%\{([a-z]+)\}/ig, function(_, match) {
			var msg = lookup[match.toLowerCase()] || "";
			return msg;
		});

		errors.push({
			property : property,
			actual : actual,
			message : message
		});
	};

};


text:
using EIDSS.Reports.BaseControls.Filters;

namespace EIDSS.Reports.Parameterized.Human.AJ.Keepers
{
    partial class SummaryReportKeeper
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any m_Resources being used.
        /// </summary>
        /// <param name="disposing">true if managed m_Resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SummaryReportKeeper));
            this.HumDiagnosisFilter = new EIDSS.Reports.BaseControls.Filters.HumDiagnosisMultiFilter();
            this.VetDiagnosisFilter = new EIDSS.Reports.BaseControls.Filters.VetDiagnosisMultiFilter();
            ((System.ComponentModel.ISupportInitialize)(this.dtStart.Properties.CalendarTimeProperties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtStart.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtEnd.Properties.CalendarTimeProperties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtEnd.Properties)).BeginInit();
            this.pnlSettings.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.ceUseArchiveData.Properties)).BeginInit();
            this.SuspendLayout();
            //
            // dtStart
            //
            resources.ApplyResources(this.dtStart, "dtStart");
            //
            // dtEnd
            //
            resources.ApplyResources(this.dtEnd, "dtEnd");
            //
            // pnlSettings
            //
            this.pnlSettings.Controls.Add(this.VetDiagnosisFilter);
            this.pnlSettings.Controls.Add(this.HumDiagnosisFilter);
            this.pnlSettings.Controls.SetChildIndex(this.GenerateReportButton, 0);
            this.pnlSettings.Controls.SetChildIndex(this.lblStart, 0);
            this.pnlSettings.Controls.SetChildIndex(this.lblEnd, 0);
            this.pnlSettings.Controls.SetChildIndex(this.dtStart, 0);
            this.pnlSettings.Controls.SetChildIndex(this.dtEnd, 0);
            this.pnlSettings.Controls.SetChildIndex(this.ceUseArchiveData, 0);
            this.pnlSettings.Controls.SetChildIndex(this.HumDiagnosisFilter, 0);
            this.pnlSettings.Controls.SetChildIndex(this.VetDiagnosisFilter, 0);
            //
            // ceUseArchiveData
            //
            resources.ApplyResources(this.ceUseArchiveData, "ceUseArchiveData");
            this.ceUseArchiveData.Properties.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("ceUseArchiveData.Properties.Appearance.Font")));
            this.ceUseArchiveData.Properties.Appearance.Options.UseFont = true;
            this.ceUseArchiveData.Properties.AppearanceDisabled.Font = ((System.Drawing.Font)(resources.GetObject("ceUseArchiveData.Properties.AppearanceDisabled.Font")));
            this.ceUseArchiveData.Properties.AppearanceDisabled.Options.UseFont = true;
            this.ceUseArchiveData.Properties.AppearanceFocused.Font = ((System.Drawing.Font)(resources.GetObject("ceUseArchiveData.Properties.AppearanceFocused.Font")));
            this.ceUseArchiveData.Properties.AppearanceFocused.Options.UseFont = true;
            this.ceUseArchiveData.Properties.AppearanceReadOnly.Font = ((System.Drawing.Font)(resources.GetObject("ceUseArchiveData.Properties.AppearanceReadOnly.Font")));
            this.ceUseArchiveData.Properties.AppearanceReadOnly.Options.UseFont = true;
            //
            // GenerateReportButton
            //
            resources.ApplyResources(this.GenerateReportButton, "GenerateReportButton");
            bv.common.Resources.BvResourceManagerChanger.GetResourceManager(typeof(SummaryReportKeeper), out resources);
            // Form Is Localizable: True
            //
            // HumDiagnosisFilter
            //
            this.HumDiagnosisFilter.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("HumDiagnosisFilter.Appearance.Font")));
            this.HumDiagnosisFilter.Appearance.Options.UseFont = true;
            this.HumDiagnosisFilter.AutoValidate = System.Windows.Forms.AutoValidate.Disable;
            resources.ApplyResources(this.HumDiagnosisFilter, "HumDiagnosisFilter");
            this.HumDiagnosisFilter.Name = "HumDiagnosisFilter";
            this.HumDiagnosisFilter.ValueChanged += new System.EventHandler<EIDSS.Reports.BaseControls.Filters.MultiFilterEventArgs>(this.DiagnosisFilter_ValueChanged);
            //
            // VetDiagnosisFilter
            //
            this.VetDiagnosisFilter.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("VetDiagnosisFilter.Appearance.Font")));
            this.VetDiagnosisFilter.Appearance.Options.UseFont = true;
            this.VetDiagnosisFilter.AutoValidate = System.Windows.Forms.AutoValidate.Disable;
            resources.ApplyResources(this.VetDiagnosisFilter, "VetDiagnosisFilter");
            this.VetDiagnosisFilter.Name = "VetDiagnosisFilter";
            this.VetDiagnosisFilter.ValueChanged += new System.EventHandler<EIDSS.Reports.BaseControls.Filters.MultiFilterEventArgs>(this.DiagnosisFilter_ValueChanged);
            //
            // SummaryReportKeeper
            //
            resources.ApplyResources(this, "$this");
            this.Name = "SummaryReportKeeper";
            ((System.ComponentModel.ISupportInitialize)(this.dtStart.Properties.CalendarTimeProperties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtStart.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtEnd.Properties.CalendarTimeProperties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtEnd.Properties)).EndInit();
            this.pnlSettings.ResumeLayout(false);
            this.pnlSettings.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.ceUseArchiveData.Properties)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private HumDiagnosisMultiFilter HumDiagnosisFilter;
        private VetDiagnosisMultiFilter VetDiagnosisFilter;
    }
}


text:
<?php

namespace Tests;

use App\User;

trait CreatesUsers
{
    protected function login(array $attributes = []): User
    {
        $user = $this->createUser($attributes);

        $this->be($user);

        return $user;
    }

    protected function loginAs(User $user)
    {
        $this->be($user);
    }

    protected function loginAsModerator(array $attributes = []): User
    {
        return $this->login(array_merge($attributes, ['type' => User::MODERATOR]));
    }

    protected function loginAsAdmin(array $attributes = []): User
    {
        return $this->login(array_merge($attributes, ['type' => User::ADMIN]));
    }

    protected function createUser(array $attributes = []): User
    {
        return factory(User::class)->create(array_merge([
            'name' => 'John Doe',
            'username' => 'johndoe',
            'email' => 'john@example.com',
            'password' => bcrypt('password'),
            'github_username' => 'johndoe',
        ], $attributes));
    }
}


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"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>App Engine Python SDK: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

App Engine Python SDK
    v1.6.9 rev.445

The Python runtime is available as an experimental Preview feature.

google

appengine

api

capabilities

CapabilitySet

google.appengine.api.capabilities.CapabilitySet Member List

This is the complete list of members for google.appengine.api.capabilities.CapabilitySet, including all inherited members.

__init__	google.appengine.api.capabilities.CapabilitySet

admin_message	google.appengine.api.capabilities.CapabilitySet

is_enabled	google.appengine.api.capabilities.CapabilitySet

will_remain_enabled_for	google.appengine.api.capabilities.CapabilitySet

<address class="footer">
    Maintained by tzmartin
</address>


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed><tipo>Rua</tipo><logradouro>Inhumas</logradouro><bairro>Senador</bairro><cidade>Araguaína</cidade><uf>TO</uf><cep>77813640</cep></feed>


text:
const Resource = require('./resource');
const pluralize = require('pluralize');

class RestResource extends Resource {
  constructor(name) {
    super();
    this.name = name;
    // add post route
    this.addRoute({
      path: `/${this.name}`,
      alias: 'create',
      method: 'post',
    });
    // add default routes
    [
      {
        method: 'get',
        alias: 'read',
      },
      {
        method: 'put',
        alias: 'update',
      },
      {
        method: 'delete',
        alias: 'delete',
      },
    ].forEach(({ method, alias }) => {
      const newRoute = {
        method,
        alias,
        path: `/${this.name}/:${pluralize(this.name, 1)}`,
      };
      this.addRoute(newRoute);
    });
  }
}

module.exports = RestResource;


text:
package fr.adrienbrault.idea.symfony2plugin.templating;

import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.jetbrains.php.lang.psi.elements.MethodReference;
import fr.adrienbrault.idea.symfony2plugin.Symfony2ProjectComponent;
import fr.adrienbrault.idea.symfony2plugin.config.SymfonyPhpReferenceContributor;
import fr.adrienbrault.idea.symfony2plugin.templating.inspection.TemplateCreateByNameLocalQuickFix;
import fr.adrienbrault.idea.symfony2plugin.templating.util.TwigUtil;
import fr.adrienbrault.idea.symfony2plugin.util.ParameterBag;
import fr.adrienbrault.idea.symfony2plugin.util.PhpElementsUtil;
import fr.adrienbrault.idea.symfony2plugin.util.PsiElementUtils;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * @author Daniel Espendiller <daniel@espendiller.net>
 */
public class PhpTemplateMissingInspection extends LocalInspectionTool {
    @NotNull
    @Override
    public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
        if(!Symfony2ProjectComponent.isEnabled(holder.getProject())) {
            return super.buildVisitor(holder, isOnTheFly);
        }

        return new PsiElementVisitor() {
            @Override
            public void visitElement(PsiElement element) {
                invoke(holder, element);
                super.visitElement(element);
            }
        };
    }

    private void invoke(@NotNull ProblemsHolder holder, @NotNull PsiElement psiElement) {
        String templateNameIfMissing = getTemplateNameIfMissing(psiElement);
        if(templateNameIfMissing == null) {
            return;
        }

        holder.registerProblem(
            psiElement,
            "Twig: Missing Template",
            ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
            new TemplateCreateByNameLocalQuickFix(templateNameIfMissing)
        );
    }

    @Nullable
    private String getTemplateNameIfMissing(@NotNull PsiElement psiElement) {
        MethodReference methodReference = PsiElementUtils.getMethodReferenceWithFirstStringParameter(psiElement);
        if (methodReference == null || !PhpElementsUtil.isMethodReferenceInstanceOf(methodReference, SymfonyPhpReferenceContributor.TEMPLATE_SIGNATURES)) {
            return null;
        }

        ParameterBag parameterBag = PsiElementUtils.getCurrentParameterIndex(psiElement.getParent());
        if(parameterBag == null || parameterBag.getIndex() != 0) {
            return null;
        }

        String templateName = PhpElementsUtil.getFirstArgumentStringValue(methodReference);
        if(templateName == null || StringUtils.isBlank(templateName)) {
            return null;
        }

        if(TwigUtil.getTemplateFiles(psiElement.getProject(), templateName).size() > 0) {
            return null;
        }

        return templateName;
    }
}


text:
from sqlalchemy import Column
from sqlalchemy import MetaData
from sqlalchemy import Table
from sqlalchemy import Text

def upgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine

    # Add a new column metrics to save metrics info for compute nodes
    compute_nodes = Table('compute_nodes', meta, autoload=True)
    shadow_compute_nodes = Table('shadow_compute_nodes', meta, autoload=True)

    metrics = Column('metrics', Text, nullable=True)
    shadow_metrics = Column('metrics', Text, nullable=True)
    compute_nodes.create_column(metrics)
    shadow_compute_nodes.create_column(shadow_metrics)


text:
package org.glob3.mobile.generated;
public class DoubleTapRotationEffect extends EffectWithDuration
{
  private final Vector3D _axis ;
  private final Angle _angle ;
  private final double _distance;
  private double _lastAlpha;

  public DoubleTapRotationEffect(TimeInterval duration, Vector3D axis, Angle angle, double distance)
  {
     this(duration, axis, angle, distance, false);
  }
  public DoubleTapRotationEffect(TimeInterval duration, Vector3D axis, Angle angle, double distance, boolean linearTiming)
  {
     super(duration, linearTiming);
     _axis = new Vector3D(axis);
     _angle = new Angle(angle);
     _distance = distance;
  }

  public final void start(G3MRenderContext rc, TimeInterval when)
  {
    super.start(rc, when);
    _lastAlpha = 0;
  }

  public final void doStep(G3MRenderContext rc, TimeInterval when)
  {
    final double alpha = getAlpha(when);
    Camera camera = rc.getNextCamera();
    final double step = alpha - _lastAlpha;
    camera.rotateWithAxis(_axis, _angle.times(step));
    camera.moveForward(_distance * step);
    _lastAlpha = alpha;
  }

  public final void stop(G3MRenderContext rc, TimeInterval when)
  {
    Camera camera = rc.getNextCamera();
    final double step = 1.0 - _lastAlpha;
    camera.rotateWithAxis(_axis, _angle.times(step));
    camera.moveForward(_distance * step);
  }

  public final void cancel(TimeInterval when)
  {
  }

}