text:
using namespace components;
using namespace utils;

#define CAMERA_V glm::vec3(0,1,0)
#define CAMERA_H glm::vec3(1,0,0)
#define CAMERA_N glm::vec3(0,0,-1)
;

namespace render
{
  Camera::Camera(Json::Value value, EntityPtr entity)
    : Component(CAMERA),
      mFieldOfView(value["fov"].asFloat()), mAspectRatio(value["aspect"].asFloat()),
      mNear(value["near"].asFloat()), mFar(value["far"].asFloat()),
      mVerticalAngle(0.0f), mHorizontalAngle(0.0f), mUpdated(false)
  {
    mEntity = entity;
    lookAt(jsonToVector(value, "lookAt"));
  }

  void Camera::rotate(float vertical, float horizontal)
  {
    mVerticalAngle += glm::radians(vertical);
    mHorizontalAngle += glm::radians(horizontal);
    mUpdated = true;
  }

  void Camera::lookAt(const glm::vec3 pos)
  {
    glm::vec3 dir = glm::normalize(pos - position());
    mVerticalAngle = glm::asin(-dir.y);
    mHorizontalAngle = -glm::atan(-dir.x, -dir.z);
    mUpdated = true;
  }

  bool Camera::isUpdated()
  {
    if(mUpdated)
    {
      mUpdated = false;
      return true;
    }
    return mUpdated;
  }

  const glm::vec3 Camera::position() const
  {
    if(mEntity)
    {
      auto transform = mEntity->getComponent<Transform>();
      if(transform)
      {
        return transform->position();
      }
    }
    return glm::vec3();
  }

  const glm::mat4 Camera::mwv() const
  {
    return mcv() * mwc();
  }

  const glm::mat4 Camera::mcv() const
  {
    return glm::perspective(glm::radians(mFieldOfView), mAspectRatio, mNear, mFar);
  }

  const glm::mat4 Camera::mwc() const
  {
    return glm::translate(orientation(), -position());
  }

  const glm::mat4 Camera::orientation() const
  {
    glm::mat4 orientation;
    orientation = glm::rotate(orientation, mVerticalAngle, CAMERA_H);
    orientation = glm::rotate(orientation, mHorizontalAngle, CAMERA_V);
    return orientation;
  }

  const glm::vec3 Camera::forward() const
  {
    return glm::vec3(glm::inverse(orientation()) * glm::vec4(CAMERA_N, 1.0));
  }

  const glm::vec3 Camera::up() const
  {
    return glm::vec3(glm::inverse(orientation()) * glm::vec4(CAMERA_V, 1.0));
  }

  const glm::vec3 Camera::left() const
  {
    return glm::vec3(glm::inverse(orientation()) * glm::vec4(CAMERA_H, 1.0));
  }

  void Camera::print(std::ostream& where) const
  {
    printField(where, "fov", mFieldOfView);
    printField(where, ", aspectRatio", mAspectRatio);
    printField(where, ", near", mNear);
    printField(where, ", far", mFar);
    printField(where, ", verticalAngle", glm::degrees(mVerticalAngle));
    printField(where, ", horizontalAngle", glm::degrees(mHorizontalAngle));
  }
}


text:
package org.apache.sysds.runtime.instructions.gpu.context;

import java.util.HashMap;

import org.apache.sysds.runtime.DMLRuntimeException;

import jcuda.driver.CUdevice;
import jcuda.driver.CUdevice_attribute;
import jcuda.driver.CUstream;

/**
 * Java Wrapper to specify CUDA execution configuration for launching custom kernels
 */
public class ExecutionConfig {
	public int gridDimX;
	public int gridDimY = 1;
	public int gridDimZ = 1;
	public int blockDimX;
	public int blockDimY = 1;
	public int blockDimZ = 1;
	public int sharedMemBytes = 0;
	public CUstream stream = null;

	private static HashMap<Integer, Integer> maxBlockDimForDevice = new HashMap<>();

	/**
	 * Convenience constructor for setting the number of blocks, number of threads and the
	 * shared memory size
	 *
	 * @param gridDimX       Number of blocks on the horizontal axis of the grid (for CUDA Kernel)
	 * @param blockDimX      Number of threads on the horizontal axis of a block (for CUDA Kernel)
	 * @param sharedMemBytes Amount of Shared memory (for CUDA Kernel)
	 */
	public ExecutionConfig(int gridDimX, int blockDimX, int sharedMemBytes) {
		this.gridDimX = gridDimX;
		this.blockDimX = blockDimX;
		this.sharedMemBytes = sharedMemBytes;
	}

	/**
	 * Convenience constructor for setting the number of blocks, number of threads and the
	 * shared memory size
	 *
	 * @param gridDimX       Number of blocks on the horizontal axis of the grid (for CUDA Kernel)
	 * @param blockDimX      Number of threads on the horizontal axis of a block (for CUDA Kernel)
	 */
	public ExecutionConfig(int gridDimX, int blockDimX) {
		this.gridDimX = gridDimX;
		this.blockDimX = blockDimX;
	}

	/**
	 * Convenience constructor for setting the number of blocks, number of threads and the
	 * shared memory size
	 *
	 * @param gridDimX       Number of blocks on the horizontal axis of the grid (for CUDA Kernel)
	 * @param gridDimY       Number of blocks on the vertical axis of the grid (for CUDA Kernel)
	 * @param blockDimX      Number of threads on the horizontal axis of a block (for CUDA Kernel)
	 * @param blockDimY      Number of threads on the vertical axis of a block (for CUDA Kernel)=
	 */
	public ExecutionConfig(int gridDimX, int gridDimY, int blockDimX, int blockDimY) {
		this.gridDimX = gridDimX;
		this.gridDimY = gridDimY;
		this.blockDimX = blockDimX;
		this.blockDimY = blockDimY;
	}

	/**
	 * Convenience constructor for setting the number of blocks, number of threads and the
	 * shared memory size
	 *
	 * @param gridDimX       Number of blocks on the horizontal axis of the grid (for CUDA Kernel)
	 * @param gridDimY       Number of blocks on the vertical axis of the grid (for CUDA Kernel)
	 * @param blockDimX      Number of threads on the horizontal axis of a block (for CUDA Kernel)
	 * @param blockDimY      Number of threads on the vertical axis of a block (for CUDA Kernel)
	 * @param sharedMemBytes Amount of Shared memory (for CUDA Kernel)
	 */
	public ExecutionConfig(int gridDimX, int gridDimY, int blockDimX, int blockDimY, int sharedMemBytes) {
		this.gridDimX = gridDimX;
		this.gridDimY = gridDimY;
		this.blockDimX = blockDimX;
		this.blockDimY = blockDimY;
		this.sharedMemBytes = sharedMemBytes;
	}

	/**
	 * Use this for simple vector operations and use following in the kernel
	 *
	 * int index = blockIdx.x * blockDim.x + threadIdx.x
	 *
	 *

	 * This tries to schedule as minimum grids as possible.
	 *
	 * @param numCells number of cells
	 * @return execution configuration
	 */
	public static ExecutionConfig getConfigForSimpleVectorOperations(int numCells) {
		if(numCells == 0)
			throw new DMLRuntimeException("Attempting to invoke a kernel with 0 threads");
		int deviceNumber = 0;
		int blockDimX = getMaxBlockDim(deviceNumber);
		int gridDimX = (int) Math.ceil((double) numCells / blockDimX);
		return new ExecutionConfig(gridDimX, blockDimX);
	}

	/**
	 * Use this for simple vector operations and use following in the kernel
	 *
	 * int index = blockIdx.x * blockDim.x + threadIdx.x
	 *
	 *

	 * @param rlen number of rows
	 * @param clen number of columns
	 * @return execution configuration
	 */
	public static ExecutionConfig getConfigForSimpleMatrixOperations(int rlen, int clen) {
		return getConfigForSimpleVectorOperations(rlen * clen);
	}

	/**
	 * Get the CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X of the given device
	 *
	 * @param deviceNumber device number of the given device
	 * @return The maximum block dimension, in x-direction
	 */
	private static int getMaxBlockDim(int deviceNumber) {
		//    	return 32;
		// TODO: Use JCudaDriver.cuOccupancyMaxPotentialBlockSize to chose the block size that maximizes occupancy
		Integer ret = maxBlockDimForDevice.get(deviceNumber);
		if (ret == null) {
			CUdevice device = new CUdevice();
			JCudaKernels.checkResult(jcuda.driver.JCudaDriver.cuDeviceGet(device, deviceNumber));
			int maxBlockDimX[] = { 0 };
			jcuda.driver.JCudaDriver
					.cuDeviceGetAttribute(maxBlockDimX, CUdevice_attribute.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, device);
			maxBlockDimForDevice.put(deviceNumber, maxBlockDimX[0]);
			return maxBlockDimX[0];
		}
		return ret;
	}

	@Override
	public String toString() {
		return "ExecutionConfig{" + "gridDimX=" + gridDimX + ", gridDimY=" + gridDimY + ", gridDimZ=" + gridDimZ
				+ ", blockDimX=" + blockDimX + ", blockDimY=" + blockDimY + ", blockDimZ=" + blockDimZ
				+ ", sharedMemBytes=" + sharedMemBytes + '}';
	}
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/mnd_unit">

    <View
        android:id="@+id/divider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_gravity="bottom"/>
</FrameLayout>


text:
/**
 * Representations.
 */
package iot498.api;


text:
namespace onnxruntime {
namespace contrib {
namespace cuda {

template <typename T>
class FusedConv : public onnxruntime::cuda::Conv<T> {
 public:
  using Base = onnxruntime::cuda::Conv<T>;
  FusedConv(const OpKernelInfo& info) : onnxruntime::cuda::Conv<T>(info) {
    std::string activation;
    if (info.GetAttr<std::string>("activation", &activation) == Status::OK() &&
        MapMode(activation) == Status::OK() &&
        cudnnCreateActivationDescriptor(&activation_desc_) == CUDNN_STATUS_SUCCESS) {
      status_ = cudnnSetActivationDescriptor(activation_desc_,
                                             activation_mode_,
                                             cudnnNanPropagation_t::CUDNN_NOT_PROPAGATE_NAN,
                                             std::numeric_limits<double>::max());
    }
  }

  ORT_DISALLOW_COPY_AND_ASSIGNMENT(FusedConv);

  ~FusedConv() {
    if (activation_desc_) {
      cudnnDestroyActivationDescriptor(activation_desc_);
      status_ = CUDNN_STATUS_NOT_INITIALIZED;
      activation_desc_ = nullptr;
    }
  }

  Status ComputeInternal(OpKernelContext* context) const override {
    CUDNN_RETURN_IF_ERROR(status_);
    std::lock_guard<OrtMutex> lock(Base::s_.mutex);
    ORT_RETURN_IF_ERROR(Base::UpdateState(context, true));
    if (Base::s_.Y->Shape().Size() == 0) {
      return Status::OK();
    }
    bool has_z = nullptr != Base::s_.z_data;
    bool has_b = nullptr != Base::s_.b_data;
    typedef typename onnxruntime::cuda::ToCudaType<T>::MappedType CudaT;
    const auto alpha = onnxruntime::cuda::Consts<CudaT>::One;
    const auto beta = onnxruntime::cuda::Consts<CudaT>::Zero;
    IAllocatorUniquePtr<void> workspace = Base::GetWorkSpace();
    auto cudnn_status = cudnnConvolutionBiasActivationForward(Base::CudnnHandle(),
                                                              &alpha,
                                                              Base::s_.x_tensor,
                                                              Base::s_.x_data,
                                                              Base::s_.w_desc,
                                                              Base::s_.w_data,
                                                              Base::s_.conv_desc,
                                                              Base::s_.algo,
                                                              workspace.get(),
                                                              Base::s_.workspace_bytes,
                                                              has_z ? &alpha : &beta,
                                                              has_z ? Base::s_.z_tensor : Base::s_.y_tensor,
                                                              has_z ? Base::s_.z_data : Base::s_.y_data,
                                                              Base::s_.b_tensor,
                                                              has_b ? Base::s_.b_data : Base::s_.b_zero,
                                                              activation_desc_,
                                                              Base::s_.y_tensor,
                                                              Base::s_.y_data);
    if (CUDNN_STATUS_SUCCESS != cudnn_status) {
      CUDNN_RETURN_IF_ERROR(cudnnConvolutionForward(Base::CudnnHandle(),
                                                    &alpha,
                                                    Base::s_.x_tensor,
                                                    Base::s_.x_data,
                                                    Base::s_.w_desc,
                                                    Base::s_.w_data,
                                                    Base::s_.conv_desc,
                                                    Base::s_.algo,
                                                    workspace.get(),
                                                    Base::s_.workspace_bytes,
                                                    &beta,
                                                    Base::s_.y_tensor,
                                                    Base::s_.y_data));
      if (has_b) {
        CUDNN_RETURN_IF_ERROR(cudnnAddTensor(Base::CudnnHandle(), &alpha, Base::s_.b_tensor, Base::s_.b_data,
                                             &alpha, Base::s_.y_tensor, Base::s_.y_data));
      }
      if (has_z) {
        CUDNN_RETURN_IF_ERROR(cudnnAddTensor(Base::CudnnHandle(), &alpha, Base::s_.z_tensor, Base::s_.z_data,
                                             &alpha, Base::s_.y_tensor, Base::s_.y_data));
      }
      CUDNN_RETURN_IF_ERROR(cudnnActivationForward(Base::CudnnHandle(), activation_desc_, &alpha, Base::s_.y_tensor,
                                                   Base::s_.y_data, &beta, Base::s_.y_tensor, Base::s_.y_data));
    }
    if (Base::s_.post_slicing_required) {
      ORT_RETURN_IF_ERROR(onnxruntime::cuda::SliceOutUnwantedOutputSection(
          this->Stream(), Base::s_.y_data, Base::s_.y_dims_with_adjusted_pads, Base::s_.Y->MutableDataRaw(),
          Base::s_.y_dims.GetDims(), Base::s_.slice_starts, Base::s_.slice_ends, Base::s_.slice_axes, Base::s_.element_size));
    }
    return Status::OK();
  }

 private:
  Status MapMode(const std::string& activaton_mode) {
    if (activaton_mode == "Relu") {
      activation_mode_ = cudnnActivationMode_t::CUDNN_ACTIVATION_RELU;
    } else {
      return Status(common::StatusCategory::ONNXRUNTIME,
                    common::StatusCode::INVALID_ARGUMENT,
                    "unsupported conv activation mode");
    }
    return Status::OK();
  }
  cudnnStatus_t status_ = CUDNN_STATUS_NOT_INITIALIZED;
  cudnnActivationMode_t activation_mode_;
  cudnnActivationDescriptor_t activation_desc_ = nullptr;
};

ONNX_OPERATOR_TYPED_KERNEL_EX(
    FusedConv,
    kMSDomain,
    1,
    float,
    kCudaExecutionProvider,
    (*KernelDefBuilder::Create()).TypeConstraint("T", DataTypeImpl::GetTensorType<float>()),
    FusedConv<float>);

}  // namespace cuda
}  // namespace contrib
}  // namespace onnxruntime


text:
package org.magicnexus.classes.data.filter;

import org.magicnexus.interfaces.data.IFilterData;
import org.magicnexus.interfaces.game.IFilter;

public class ReferenceFilterData implements IFilterData
{

	private String reference = null;

	public ReferenceFilterData() {}

	public ReferenceFilterData(String string)
	{
		reference = string;
	}

	public String getReference()
	{
		return reference;
	}

	public void setReference(String reference)
	{
		this.reference = reference;
	}

	@Override
	public boolean equals(Object obj)
	{
		if(obj instanceof ReferenceFilterData)
		{
			ReferenceFilterData other = (ReferenceFilterData) obj;
			return getReference() != null
				&& getReference().equals(other.getReference());
		}
		return false;
	}

	@Override
	public String toString()
	{
		StringBuilder sb = new StringBuilder("{ReferenceFilterData");
		sb.append(" reference=").append(getReference());
		return sb.append("}").toString();
	}

	@Override
	public IFilter toFilter()
	{
		// TODO Auto-generated method stub
		return null;
	}

}


text:
<?php

use Automattic\Jetpack\Redirect;

if ( ! class_exists( 'Jetpack_SSO_Notices' ) ) :

/**
 * A collection of helper functions used in the SSO module.
 *
 * @since 4.4.0
 */
class Jetpack_SSO_Notices {
	/**
	 * Error message displayed on the login form when two step is required and
	 * the user's account on WordPress.com does not have two step enabled.
	 *
	 * @since 2.7
	 * @param string $message
	 * @return string
	 **/
	public static function error_msg_enable_two_step( $message ) {
		$error = sprintf(
			wp_kses(
				__(
					'Two-Step Authentication is required to access this site. Please visit your Security Settings to configure Two-step Authentication for your account.',
					'jetpack'
				),
				array(  'a' => array( 'href' => array() ) )
			),
			Redirect::get_url( 'calypso-me-security-two-step' ),
			Redirect::get_url( 'wpcom-support-security-two-step-authentication' )
		);

		$message .= sprintf( '
%s
', $error );

		return $message;
	}

	/**
	 * Error message displayed when the user tries to SSO, but match by email
	 * is off and they already have an account with their email address on
	 * this site.
	 *
	 * @param string $message
	 * @return string
	 */
	public static function error_msg_email_already_exists( $message ) {
		$error = sprintf(
			wp_kses(
				__(
					'You already have an account on this site. Please sign in with your username and password and then connect to WordPress.com.',
					'jetpack'
				),
				array(  'a' => array( 'href' => array() ) )
			),
			esc_url_raw( add_query_arg( 'jetpack-sso-show-default-form', '1', wp_login_url() ) )
		);

		$message .= sprintf( '
%s
', $error );

		return $message;
	}

	/**
	 * Error message that is displayed when the current site is in an identity crisis and SSO can not be used.
	 *
	 * @since 4.3.2
	 *
	 * @param $message
	 *
	 * @return string
	 */
	public static function error_msg_identity_crisis( $message ) {
		$error = esc_html__( 'Logging in with WordPress.com is not currently available because this site is experiencing connection problems.', 'jetpack' );
		$message .= sprintf( '
%s
', $error );
		return $message;
	}

	/**
	 * Error message that is displayed when we are not able to verify the SSO nonce due to an XML error or
	 * failed validation. In either case, we prompt the user to try again or log in with username and password.
	 *
	 * @since 4.3.2
	 *
	 * @param $message
	 *
	 * @return string
	 */
	public static function error_invalid_response_data( $message ) {
		$error = esc_html__(
			'There was an error logging you in via WordPress.com, please try again or try logging in with your username and password.',
			'jetpack'
		);
		$message .= sprintf( '
%s
', $error );
		return $message;
	}

	/**
	 * Error message that is displayed when we were not able to automatically create an account for a user
	 * after a user has logged in via SSO. By default, this message is triggered after trying to create an account 5 times.
	 *
	 * @since 4.3.2
	 *
	 * @param $message
	 *
	 * @return string
	 */
	public static function error_unable_to_create_user( $message ) {
		$error = esc_html__(
			'There was an error creating a user for you. Please contact the administrator of your site.',
			'jetpack'
		);
		$message .= sprintf( '
%s
', $error );
		return $message;
	}

	/**
	 * When the default login form is hidden, this method is called on the 'authenticate' filter with a priority of 30.
	 * This method disables the ability to submit the default login form.
	 *
	 * @param $user
	 *
	 * @return WP_Error
	 */
	public static function disable_default_login_form( $user ) {
		if ( is_wp_error( $user ) ) {
			return $user;
		}

		/**
		 * Since we're returning an error that will be shown as a red notice, let's remove the
		 * informational "blue" notice.
		 */
		remove_filter( 'login_message', array( 'Jetpack_SSO_Notices', 'msg_login_by_jetpack' ) );
		return new WP_Error( 'jetpack_sso_required', self::get_sso_required_message() );
	}

	/**
	 * Message displayed when the site admin has disabled the default WordPress
	 * login form in Settings > General > Secure Sign On
	 *
	 * @since 2.7
	 * @param string $message
	 *
	 * @return string
	 **/
	public static function msg_login_by_jetpack( $message ) {
		$message .= sprintf( '
%s
', self::get_sso_required_message() );
		return $message;
	}

	public static function get_sso_required_message() {
		$msg = esc_html__(
			'A WordPress.com account is required to access this site. Click the button below to sign in or create a free WordPress.com account.',
			'jetpack'
		);

		/**
		 * Filter the message displayed when the default WordPress login form is disabled.
		 *
		 * @module sso
		 *
		 * @since 2.8.0
		 *
		 * @param string $msg Disclaimer when default WordPress login form is disabled.
		 */
		return apply_filters( 'jetpack_sso_disclaimer_message', $msg );
	}

	/**
	 * Message displayed when the user can not be found after approving the SSO process on WordPress.com
	 *
	 * @param string $message
	 * @return string
	 */
	public static function cant_find_user( $message ) {
		$error = esc_html__(
			"We couldn't find your account. If you already have an account, make sure you have connected to WordPress.com.",
			'jetpack'
		);
		$message .= sprintf( '
%s
', $error );

		return $message;
	}

	/**
	 * Error message that is displayed when the current site is in an identity crisis and SSO can not be used.
	 *
	 * @since 4.4.0
	 *
	 * @param $message
	 *
	 * @return string
	 */
	public static function sso_not_allowed_in_staging( $message ) {
		$error = esc_html__(
			'Logging in with WordPress.com is disabled for sites that are in staging mode.',
			'jetpack'
		);
		$message .= sprintf( '
%s
', $error );
		return $message;
	}
}

endif;


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>groupId</groupId>
    <artifactId>JGenerilo</artifactId>
    <version>0.1a-SNAPSHOT</version>

    <properties>
        <jdk.version>1.6</jdk.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongo-java-driver</artifactId>
            <version>2.12.1</version>
        </dependency>

        <dependency>
            <groupId>org.jongo</groupId>
            <artifactId>jongo</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.2.3</version>
        </dependency>

        <dependency>
            <groupId>de.undercouch</groupId>
            <artifactId>bson4jackson</artifactId>
            <version>2.3.1</version>
        </dependency>

        <dependency>
            <groupId>com.caucho</groupId>
            <artifactId>hessian</artifactId>
            <version>4.0.38</version>
        </dependency>

        <dependency>
            <groupId>com.trolltech</groupId>
            <artifactId>qt</artifactId>
            <version>4.6.3</version>
        </dependency>

        <dependency>
            <groupId>org.functionaljava</groupId>
            <artifactId>functionaljava</artifactId>
            <version>3.0</version>
        </dependency>

        <dependency>
            <groupId>net.sf.jopt-simple</groupId>
            <artifactId>jopt-simple</artifactId>
            <version>3.2</version>
        </dependency>

        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <version>2.0.5</version>
        </dependency>

        <dependency>
            <groupId>net.sourceforge.argparse4j</groupId>
            <artifactId>argparse4j</artifactId>
            <version>0.4.3</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>

    </dependencies>

    <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>

            <!--<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.7</version>
                <configuration>
                    <verbose>false</verbose>
                    <addSvnKeyWords>true</addSvnKeyWords>
                </configuration>
                <executions>
                    <execution>
                        <id>first</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <licenseName>gpl_v3</licenseName>
                            <roots>
                                <root>src/main/java</root>
                                <root>src/test</root>
                            </roots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>-->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>pl.edu.pwr.iiar.zak.thermalKit.util.JGenerilo</mainClass>
                            <classpathPrefix>dependency-jars/</classpathPrefix>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeGroupIds>org.mongo</includeGroupIds>
                            <includeGroupIds>org.jongo</includeGroupIds>
                            <outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>pl.edu.pwr.iiar.zak.thermalKit.util.JGenerilo</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <descriptors>
                        <descriptor>src/main/assembly/descriptor.xml</descriptor>
                    </descriptors>
                </configuration>
            </plugin>

        </plugins>

    </build>

</project>


text:
noweats
=======

What are people eating (on Twitter)?

Confguration
------------
The noweats configuration lives in `~/.noweats` and consists of a
`twitter.conf` file containing API keys and a `filters.conf` file containing
pruning filters for tweets. See `conf/filters.conf` for an example.

Installation
------------
It is recommended to use noweats in a virtualenv. To install it, run

    $ mkvirtualenv noweats
    $ workon noweats
    $ python setup.py install

This should install everything you need into the `noweats` virtualenv.

Usage
-----
To collect data from Twitter, create your `twitter.conf` file and then run a
command like

    $ collect_nyc DATA_DIR

where `DATA_DIR` is the location where you would like to save Twitter stream
data.

To process files into their top food and interesting foods, run

    $ process_fil DATA_FILE [DATA_FILE...]

where `DATA_FILE` are paths to files output by the `collect_nyc` script.

Note that due to known issues in the Python `bz2` library, all files must be
compressed using the `compress_data` script.

All of the libraries supporting the scrips are also usable by importing them.
See the code under the `noweats` package for more information.


text:
#include "../common/_Utils.h"
#include "stdafx.h"
#include "resource.h"
#include "webrtceverywhere_i.h"
#include "dllmain.h"

CwebrtceverywhereModule _AtlModule;

// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
#if 1
	switch (dwReason) {
	case DLL_PROCESS_ATTACH:
	{
		_Utils::Initialize();
		break;
	}
	case DLL_PROCESS_DETACH:
	{
		_Utils::DeInitialize(); //!\ This is required
		break;
	}
	case DLL_THREAD_ATTACH:
	{
		break;
	}
	case DLL_THREAD_DETACH:
	{
		break;
	}
	}
#endif
	hInstance;
	return _AtlModule.DllMain(dwReason, lpReserved);
}


text:
package com.rubentxu.juegos.core.modelo;

import com.badlogic.gdx.graphics.g2d.ParticleEffect;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.Fixture;
import com.badlogic.gdx.utils.Disposable;
import com.rubentxu.juegos.core.modelo.base.Box2DPhysicsObject;
import com.rubentxu.juegos.core.modelo.base.State;

import java.util.HashSet;

public class Hero extends Box2DPhysicsObject implements Disposable {

     public enum StateHero implements State {
        IDLE, WALKING, JUMPING, DYING, FALL, SWIMMING, PROPULSION,WIN ;

         protected float stateTimeMin;

         StateHero(){
             this.stateTimeMin = 0.1f;
         }

         StateHero(float stateTimeMin){
             this.stateTimeMin = stateTimeMin;
         }

         StateHero(BaseState state){
             this.stateTimeMin =state.getStateTimeMin();
         }

         @Override
         public float getStateTimeMin(){
             return this.stateTimeMin;
         }
    }

    public enum StatePos {ONGROUND, INWATER, ONAIR}

    // States
    private StatePos statePos = StatePos.ONGROUND;
    boolean facingLeft = true;

    public final static float MAX_VELOCITY = 4f;
    public final static float JUMP_FORCE = 14.5f;
    private HashSet<Fixture> grounContacts;
    private Fixture heroPhysicsFixture;
    private Fixture heroSensorFixture;
    private ParticleEffect particleEffectDust;
    private ParticleEffect particleEffectContact;

    public Hero(String name, Body body) {
        super(name, GRUPO.HERO,body);
        setGrounContacts(new HashSet<Fixture>());
        setState(StateHero.IDLE);
    }

    public void velocityLimit() {
        Vector2 vel = this.getBodyA().getLinearVelocity();

        if (Math.abs(vel.x) > this.MAX_VELOCITY) {
            vel.x = Math.signum(vel.x) * this.MAX_VELOCITY;
            this.setVelocity(new Vector2(vel.x, vel.y));
        } else if (Math.abs(vel.y) > this.MAX_VELOCITY * 2) {
            vel.y = Math.signum(vel.y) * this.MAX_VELOCITY * 2;
            this.setVelocity(new Vector2(vel.x, vel.y));
        }
    }

    public boolean isFacingLeft() {
        return facingLeft;
    }

    public void setFacingLeft(boolean facingLeft) {
        this.facingLeft = facingLeft;
    }

    public Vector2 getVelocity() {
        return super.getBodyA().getLinearVelocity();
    }

    public void setVelocity(Vector2 velocity) {
        super.getBodyA().setLinearVelocity(velocity);
    }

    public Fixture getHeroPhysicsFixture() {
        return heroPhysicsFixture;
    }

    public Fixture getHeroSensorFixture() {
        return heroSensorFixture;
    }

    public void setHeroPhysicsFixture(Fixture heroPhysicsFixture) {
        this.heroPhysicsFixture = heroPhysicsFixture;
    }

    public void setHeroSensorFixture(Fixture heroSensorFixture) {
        this.heroSensorFixture = heroSensorFixture;
    }

    public HashSet<Fixture> getGrounContacts() {
        return grounContacts;
    }

    public void setGrounContacts(HashSet<Fixture> grounContacts) {
        this.grounContacts = grounContacts;
    }

    public StatePos getStatePos() {
        return statePos;
    }

    public void setStatePos(StatePos statePos) {
        this.statePos = statePos;
    }

    public ParticleEffect getParticleEffectDust() {
        return particleEffectDust;
    }

    public void setParticleEffectDust(ParticleEffect particleEffectDust) {
        this.particleEffectDust = particleEffectDust;
    }

    public ParticleEffect getParticleEffectContact() {
        return particleEffectContact;
    }

    public void setParticleEffectContact(ParticleEffect particleEffectContact) {
        this.particleEffectContact = particleEffectContact;
    }

    @Override
    public String toString() {
        return
                "StatePos=" + statePos +
                        "\nstate=" + getState() +
                        "\nfacingLeft=" + facingLeft +
                        "\nGravityScale=" + getBodyA().getGravityScale() +
                        "\nInertia=" + getBodyA().getInertia() +
                        "\nMasa=" + getBodyA().getMass() +
                        "\nPeso=" + getBodyA().getMass() * 9.8f +
                        "\nisFixedRotation=" + getBodyA().isFixedRotation() +
                        "\nLinearDamping=" + getBodyA().getLinearDamping() +
                        "\nLinearVelocity=" + getBodyA().getLinearVelocity().toString() +
                        "\nPosition=" + getBodyA().getPosition().toString() +
                        "\nSizeGroundContact=" + grounContacts.size() +
                        "\nWidth=" + getWidthBodyA() +
                        "\nHeight=" + getHeightBodyA() +
                        "\nTimeState=" + getStateTime();
    }

    @Override
    public void dispose() {
        super.dispose();
        grounContacts = null;
        heroPhysicsFixture = null;
        heroSensorFixture = null;
    }

}


text:
<?php

return [
    'orchestra/asset' => [
        'src/AssetServiceProvider',
        'src/Asset',
        'src/DependencyResolver',
        'src/Dispatcher',
        'src/Factory',
    ],
    'orchestra/auth' => [
        'src/Auth/AuthManager',
        'src/Auth/Guard',
        'src/Authorization/Permission',
        'src/Authorization/Authorization',
        'src/Authorization/Factory',
        'src/Authorization/Fluent',
        'src/Authorization/Policy',
    ],
    'orchestra/contracts' => [
        'src/Support/DataContainer',
        'src/Authorization/Authorizable',
        'src/Memory/Handler',
        'src/Memory/Provider',
        'src/Config/PackageRepository',
        'src/Extension/Dispatcher',
        'src/Extension/Factory',
        'src/Extension/RouteGenerator',
        'src/Extension/StatusChecker',
        'src/Foundation/DeferrableServiceContainer',
        'src/Foundation/Foundation',
        'src/Html/Factory',
        'src/Html/Builder',
        'src/Html/Grid',
        'src/Html/Form/Factory',
        'src/Html/Form/Builder',
        'src/Html/Form/Grid',
        'src/Html/Form/Control',
        'src/Html/Form/Presenter',
        'src/Html/Table/Factory',
        'src/Html/Table/Builder',
        'src/Html/Table/Grid',
        'src/Http/RouteManager',
        'src/Messages/MessageBag',
        'src/Notification/Message',
        'src/Notification/Notification',
        'src/Notification/Receipt',
        'src/Notification/Recipient',
        'src/Theme/Theme',
        'src/Theme/Finder',
    ],
    'orchestra/debug' => [
        'src/DebugServiceProvider',
        'src/Traits/MonologTrait',
        'src/Traits/TimerProfileTrait',
        'src/Listener',
        'src/Profiler',
    ],
    'orchestra/extension' => [
        'src/Traits/Dispatchable',
        'src/Traits/DomainAware',
        'src/Traits/Operation',
        'src/Config/Repository',
        'src/Dispatcher',
        'src/Factory',
        'src/Plugin',
        'src/ProviderRepository',
        'src/RouteGenerator',
        'src/StatusChecker',
        'src/Bootstrap/LoadExtension',
    ],
    'orchestra/facile' => [
        'src/FacileServiceProvider',
        'src/Facile',
        'src/Factory',
        'src/Transformable',
        'src/Template/Template',
        'src/Template/Simple',
    ],
    'orchestra/foundation' => [
        'src/Providers/SupportServiceProvider',
        'src/Support/Providers/Traits/RouteProviderTrait',
        'src/Support/Providers/ModuleServiceProvider',
        'src/Support/Providers/ExtensionServiceProvider',
        'src/Support/Providers/ExtensionRouteServiceProvider',
        'src/Support/Providers/RouteServiceProvider',
        'src/Support/MenuHandler',
        'src/Listeners/UserAccess',
        'src/Application',
        'src/Foundation',
        'src/Meta',
        'src/Bootstrap/LoadExpresso',
        'src/Bootstrap/LoadFoundation',
        'src/Bootstrap/LoadUserMetaData',
        'src/Bootstrap/NotifyIfSafeMode',
        'src/Bootstrap/UserAccessPolicy',
        'src/Http/Middleware/Can',
        'src/Http/Middleware/Authenticate',
        'src/Http/Middleware/CanBeInstalled',
        'src/Http/Middleware/CanManage',
        'src/Http/Middleware/CanRegisterUser',
        'src/Http/Middleware/LoginAs',
        'src/Http/Middleware/RedirectIfAuthenticated',
        'src/Http/Middleware/RedirectIfInstalled',
        'src/Http/Middleware/UseBackendTheme',
        'src/Http/Middleware/RequireCsrfToken',
        'src/Http/Middleware/VerifyCsrfToken',
    ],
    'orchestra/html' => [
        'src/HtmlBuilder',
        'src/FormBuilder',
        'src/Builder',
        'src/Factory',
        'src/Grid',
        'src/Form/Control',
        'src/Form/Factory',
        'src/Form/Field',
        'src/Form/Fieldset',
        'src/Form/FormBuilder',
        'src/Form/Grid',
        'src/Table/Column',
        'src/Table/Factory',
        'src/Table/Grid',
        'src/Table/TableBuilder',
    ],
    'orchestra/kernel' => [
        'src/Config/LoaderInterface',
        'src/Config/FileLoader',
        'src/Config/Traits/Cascading',
        'src/Config/Traits/Loader',
        'src/Config/Repository',
        'src/Config/Bootstrap/LoadConfiguration',
        'src/Database/CacheDecorator',
        'src/Http/Traits/PassThrough',
        'src/Http/FormRequest',
        'src/Http/RouteManager',
        'src/Routing/Router',
        'src/Routing/Controller',
        'src/Routing/Traits/ControllerResponse',
    ],
    'orchestra/memory' => [
        'src/MemoryManager',
        'src/Provider',
        'src/Memorizable',
        'src/Handler',
        'src/Handlers/Cache',
        'src/Handlers/Eloquent',
        'src/Handlers/Fluent',
        'src/Handlers/Runtime',
    ],
    'orchestra/model' => [
        'src/Observer/Role',
        'src/Memory/UserMetaProvider',
        'src/Memory/UserMetaRepository',
    ],
    'orchestra/messages' => [
        'src/MessagesServiceProvider',
        'src/MessageBag',
    ],
    'orchestra/notifier' => [
        'src/NotifierServiceProvider',
        'src/Notifiable',
        'src/Receipt',
    ],
    'orchestra/support' => [
        'src/Providers/Traits/AliasesProvider',
        'src/Providers/Traits/EventProvider',
        'src/Providers/Traits/FilterProvider',
        'src/Providers/Traits/MiddlewareProvider',
        'src/Providers/Traits/PackageProvider',
        'src/Providers/ServiceProvider',
        'src/Providers/CommandServiceProvider',
        'src/Providers/EventServiceProvider',
        'src/Providers/MiddlewareServiceProvider',
        'src/Providers/FilterServiceProvider',
        'src/Support/Contracts/CsvableInterface',
        'src/Support/Traits/DataContainer',
        'src/Support/Traits/Descendible',
        'src/Support/Traits/QueryFilter',
        'src/Support/Traits/Validation',
        'src/Support/Collection',
        'src/Support/Expression',
        'src/Support/Keyword',
        'src/Support/Manager',
        'src/Support/Nesty',
        'src/Support/Str',
        'src/Support/Validator',
        'src/Facades/ACL',
        'src/Facades/Asset',
        'src/Facades/Config',
        'src/Facades/Decorator',
        'src/Facades/Facile',
        'src/Facades/Form',
        'src/Facades/Foundation',
        'src/Facades/HTML',
        'src/Facades/Mail',
        'src/Facades/Memory',
        'src/Facades/Messages',
        'src/Facades/Meta',
        'src/Facades/Profiler',
        'src/Facades/Publisher',
        'src/Facades/Resources',
        'src/Facades/Table',
        'src/Facades/Theme',
        'src/Facades/Widget',
    ],
    'orchestra/translation' => [
        'src/TranslationServiceProvider',
        'src/FileLoader',
    ],
    'orchestra/view' => [
        'src/ViewServiceProvider',
        'src/DecoratorServiceProvider',
        'src/Decorator',
        'src/FileViewFinder',
        'src/Theme/Theme',
        'src/Theme/Finder',
        'src/Theme/Manifest',
        'src/Theme/ThemeManager',
        'src/Bootstrap/LoadCurrentTheme',
    ],
    'orchestra/widget' => [
        'src/WidgetManager',
        'src/Fluent/Menu',
        'src/Handler',
        'src/Handlers/Menu',
        'src/Handlers/Pane',
        'src/Handlers/Placeholder',
    ],
];


text:
- Custom Speech-to-text support on Godot engine for Android, similar to [Godot-SpeechToText](https://github.com/literaldumb/Godot-SpeechToText), but without the Google's default pop-up UI and beeps.
- Godot version 2.0 stable.
- Copyright [TeamKrishna](http://teamkrishna.in)
- Demonstrates usage of runOnUiThread()
- Works perfectly on lollipop. Leaves a small beep trace after listening is done on kitkat (#TODO)

##How to use
- Drop the customspeech folder inside godot/modules

- Move the customspeech/GodotCustomSpeech.java to godot/platform/android/java/src/org/godotengine/godot

- Import the speechtest example project in Godot for a test run [ Not a great UI. Just functionality demonstration ]

**Note:** The speechtotext/android.jar is taken from  *android-sdk-linux/platforms/android-22*. You may choose to use any other api version.

###Compile
1. #> scons platform=android
2. cd godot/platform/android/java
3. #> ./gradlew build
4. The resulting apk will be available at godot/platform/android/java/build/outputs/apk

###Configure
Add the following in the engine.cfg file:

> [android]

> modules="org/godotengine/godot/GodotCustomSpeech"

**Use them in the script:**

> var singleton = Globals.get_singleton("GodotCustomSpeech")

> singleton.doListen() # opens up the mic ui
> singleton.getWords() # gets the strings of words

###Build the game apk
From the settings of the godot engine UI:

> Export->Target->Android

Custom Package (Debug/Release):
> Point to the newly built apk

> Permission check: RecordAudio,Modify Audio Settings

####License
MIT

Similar plugings:
- [GodotVibrate](https://github.com/literaldumb/GodotVibrate)
- [Godot-SpeechToText](https://github.com/literaldumb/Godot-SpeechToText)
- [Godot-TextToSpeech](https://github.com/literaldumb/Godot-TextToSpeech)


text:
var searchData=
[
  ['helloservlet',['HelloServlet',['../classcom_1_1example_1_1servlets_1_1_hello_servlet.html',1,'com::example::servlets']]],
  ['helloservlet',['HelloServlet',['../classcom_1_1example_1_1servlets_1_1_hello_servlet.html#acde0125d36d0d4cbbe7ed5d5ccc93c54',1,'com::example::servlets::HelloServlet']]],
  ['helloservlet_2ejava',['HelloServlet.java',['../_hello_servlet_8java.html',1,'']]]
];


text:
export const FETCH_USER_AGENT = 'fetch_user_agent';
// action creator
export const fetchUserAgent = () => async (dispatch, getState, userAgent) => {
	// once response is received from http req
	const res = userAgent;
	dispatch({
		type: FETCH_USER_AGENT,
		payload: res
	});
};

// stored data of scrolled items
export const FETCH_SCROLLED_ITEM = 'fetch_scrolled_item';
// action creator
export const fetchScrolledItem = (item) => async (dispatch) => {
	// once response is received from http req
	const res = item;

	dispatch({
		type: FETCH_SCROLLED_ITEM,
		payload: res
	});
};

// stored data of active items
export const FETCH_ACTIVE_ITEM = 'fetch_active_item';
// action creator
export const fetchActiveItem = (item) => async (dispatch) => {
	// once response is received from http req
	const res = item;

	dispatch({
		type: FETCH_ACTIVE_ITEM,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_CLICKED_ITEMS = 'fetch_clicked_items';
const clickedItems = {};
// action creator
export const fetchClickedItems = (page, item) => async (dispatch) => {
	// once response is received from http req
	if (!clickedItems[page]) clickedItems[page] = [];
	clickedItems[page].push(item);

	const res = clickedItems;

	dispatch({
		type: FETCH_CLICKED_ITEMS,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_ACTIVE_HERO_ICON = 'fetch_active_hero_icon';
// action creator
export const fetchActiveHeroIcon = (activeHeroIcon) => async (dispatch) => {
	const res = activeHeroIcon || 'none';

	dispatch({
		type: FETCH_ACTIVE_HERO_ICON,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_SCROLLED_HERO_ICON = 'fetch_scrolled_hero_icon';
// action creator
export const fetchScrolledHeroIcon = (scrolledHeroIcon) => async (dispatch) => {
	const res = scrolledHeroIcon;

	dispatch({
		type: FETCH_SCROLLED_HERO_ICON,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_DEVICE_TYPE = 'fetch_device_type';
// action creator
export const fetchDeviceType = (deviceType) => async (dispatch) => {
	const res = deviceType;

	dispatch({
		type: FETCH_DEVICE_TYPE,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_HERO_TEXT_ANIMATION = 'fetch_hero_text_animation';
// action creator
export const fetchHeroTextAnimation = (allowed) => async (dispatch) => {
	const res = allowed || false;

	dispatch({
		type: FETCH_HERO_TEXT_ANIMATION,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_BACKGROUND_POS = 'fetch_background_pos';
// action creator
export const fetchBackgroundPos = (pos) => async (dispatch) => {
	const res = pos;

	dispatch({
		type: FETCH_BACKGROUND_POS,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_CHAR_LOADER = 'fetch_char_loader';
// action creator
export const fetchCharLoader = (charArr) => async (dispatch) => {
	const res = charArr;

	dispatch({
		type: FETCH_CHAR_LOADER,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_CURRENT_CHARS = 'fetch_current_chars';

// action creator
export const fetchCurrentChars = (charArr) => async (dispatch) => {
	const res = charArr;

	dispatch({
		type: FETCH_CURRENT_CHARS,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_SITE_ANIMATING = 'fetch_site_animating';

// action creator
export const fetchSiteAnimating = (animating) => async (dispatch) => {
	const res = animating;

	dispatch({
		type: FETCH_SITE_ANIMATING,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_CURRENT_FOOTER_CHARS = 'fetch_current_footer_chars';

// action creator
export const fetchCurrentFooterChars = (charArr) => async (dispatch) => {
	const res = charArr || '';

	dispatch({
		type: FETCH_CURRENT_FOOTER_CHARS,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_BROWSER = 'fetch_browser';

// action creator
export const fetchBrowser = (browser) => async (dispatch) => {
	const res = browser;

	dispatch({
		type: FETCH_BROWSER,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_CONTENT = 'fetch_content';

// action creator
export const fetchContent = (content) => async (dispatch) => {
	const res = content;

	dispatch({
		type: FETCH_CONTENT,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_UPDATE_URL = 'fetch_update_url';

// action creator
export const fetchUpdateUrl = (href) => async (dispatch) => {
	const res = href;

	dispatch({
		type: FETCH_UPDATE_URL,
		payload: res
	});
};

// stored data of clicked items
export const FETCH_ASYNC_VIDEO_COMPONENT = 'fetch_async_video_component';

// action creator
export const fetchAsyncVideoComponent = (component) => async (dispatch) => {
	const res = component;

	dispatch({
		type: FETCH_ASYNC_VIDEO_COMPONENT,
		payload: res
	});
};

// REACT 360 ACTIONS
export const FETCH_HERO_HOVER = 'fetch_hero_hover';

export const fetchHeroHover = (data) => async (dispatch) => {
    const res = data;

    dispatch({
      type: FETCH_HERO_HOVER,
      payload: res
    });
};

export const FETCH_HERO_TEXT = 'fetch_hero_text';

export const fetchHeroText = (data) => async (dispatch) => {
    const res = data;
    dispatch({
      type: FETCH_HERO_TEXT,
      payload: res
    });
};

export const FETCH_HERO_KEYPRESS = 'fetch_hero_keypress';

export const fetchHeroKeyPress = (data) => async (dispatch) => {
    const res = data;
    dispatch({
      type: FETCH_HERO_KEYPRESS,
      payload: res
    });
};

export const FETCH_VR_INSTRUCTIONS = 'fetch_vr_instructions';

export const fetchVrInstructions = (data) => async (dispatch) => {
    const res = data;
    dispatch({
      type: FETCH_VR_INSTRUCTIONS,
      payload: res
    });
};

export const FETCH_VR_DISPLAYS = 'fetch_vr_displays';

export const fetchVrDisplays = (data) => async (dispatch) => {
    const res = data;
    dispatch({
      type: FETCH_VR_DISPLAYS,
      payload: res
    });
};

export const FETCH_WEB_MODE = 'fetch_web_mode';

export const fetchWebMode = (data) => async (dispatch) => {
    const res = data;
    dispatch({
      type: FETCH_WEB_MODE,
      payload: res
    });
};


text:
define(["sugar-web/graphics/palette",
        "mustache"], function (palette, mustache) {

    'use strict';

    var menupalette = {};

    menupalette.MenuPalette = function (invoker, primaryText, menuData) {
        palette.Palette.call(this, invoker, primaryText);

        this.selectItemEvent = document.createEvent("CustomEvent");
        this.selectItemEvent.initCustomEvent('selectItem', true, true, {
            'item': undefined
        });

        var template = '{{#.}}' +
            '
' +
            '  <button {{ #icon }}class="icon"{{ /icon }} {{ #id }}id="{{ id }}"{{ /id }}>' +
            '    {{ #icon }}{{ /icon }}' +
            '    {{ label }}' +
            '  </button>' +
            '
' +
            '{{/.}}';

        var menuElem = document.createElement('ul');
        menuElem.className = "menu";
        menuElem.innerHTML = mustache.render(template, menuData);
        this.setContent([menuElem]);

        // Pop-down the palette when a item in the menu is clicked.

        this.buttons = menuElem.querySelectorAll('button');

        var that = this;

        function popDownOnButtonClick(event) {
            that.selectItemEvent.detail.target = event.target;
            that.getPalette().dispatchEvent(that.selectItemEvent);
            that.popDown();
        }

        for (var i = 0; i < this.buttons.length; i++) {
            this.buttons[i].addEventListener('click', popDownOnButtonClick);
        }
    };

    var addEventListener = function (type, listener, useCapture) {
        return this.getPalette().addEventListener(type, listener, useCapture);
    };

    menupalette.MenuPalette.prototype =
        Object.create(palette.Palette.prototype, {
            addEventListener: {
                value: addEventListener,
                enumerable: true,
                configurable: true,
                writable: true
            }
        });

    return menupalette;
});


text:
<?xml version="1.0"?>
#if ($servlet_version == "2.4")
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
#elseif ($servlet_version == "2.5")
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
#elseif ($servlet_version == "3.0")
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
#else
<!DOCTYPE web-app PUBLIC
  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
#end
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>
    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup> 1 </load-on-startup>
    </servlet>

    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

</web-app>


text:
<?php

namespace Oro\Bundle\CurrencyBundle\Migrations\Schema;

use Doctrine\DBAL\Schema\Schema;

use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

use Oro\Bundle\MigrationBundle\Migration\Installation;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

use Oro\Bundle\CurrencyBundle\Migrations\Schema\v1_0\CurrencyConfigOrganizationMigration;

class OroConfigBundleInstaller implements Installation, ContainerAwareInterface
{
    use ContainerAwareTrait;

    /**
     * {@inheritdoc}
     */
    public function getMigrationVersion()
    {
        return 'v1_0';
    }

    /**
     * {@inheritdoc}
     */
    public function up(Schema $schema, QueryBag $queries)
    {
        if ($this->container->hasParameter('installed') && $this->container->getParameter('installed')) {
            CurrencyConfigOrganizationMigration::migrateOrganizationCurrencyConfig($queries);
        }
    }
}


text:
define(["./map.js",
        "./customer.js"], function (map, customer) {

    function OnStartup (bezl) {
        // Initialize any variables used in the logic
        bezl.vars.currentAddress = "";
        bezl.vars.markers = [];
        bezl.vars.customers = [];
        bezl.vars.selectedCustomer = { "CustNum": 0 };
        bezl.vars.loading = {
            customerList: true
        }

        bezl.vars.mapFile = map;
        bezl.vars.customerFile = customer;

        // Initiate the call to refresh the customer list
        bezl.vars.customerFile.runQuery(bezl, 'CustList');

        // Info Pin add customer event handler
        $("#bezlpanel").on("addCust_Pin", function(event) {
            console.log('in');
            console.log(event);
        });

        // Google Maps requires async so pull it in.
        require.config({
            paths: {
                'async': '/node_modules/requirejs-plugins/src/async'
            }
        });

        require(['async!https://maps.googleapis.com/maps/api/js?key=' + bezl.vars.config.GoogleAPIKey], function() {
            // Google Maps API and all its dependencies will be loaded here.
            bezl.vars.client = google.maps;
            bezl.vars.geocoder = new google.maps.Geocoder();
            bezl.vars.directionsService = new google.maps.DirectionsService;
            bezl.vars.directionsDisplay = new google.maps.DirectionsRenderer();

            if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(function (position) {
                // First create the map
                //console.log($(bezl.container.nativeElement).find("div#map"));
                bezl.vars.map = new google.maps.Map(document.getElementById('map'), {
                        center: {lat: position.coords.latitude, lng: position.coords.longitude},
                        scrollwheel: false,
                        zoom: 10
                    });
                bezl.vars.directionsDisplay.setMap(bezl.vars.map);
                bezl.vars.directionsDisplay.setPanel(document.getElementById('directions'));

                // Create an infowindow
                bezl.vars.infoWindow = new google.maps.InfoWindow;

                // Drop a marker for home
                var marker = new google.maps.Marker({
                    position: {lat: position.coords.latitude, lng: position.coords.longitude},
                    map: bezl.vars.map,
                    label: 'A',
                    title: 'You are here',
                    data: '',
                    lat: position.coords.latitude,
                    lng: position.coords.longitude
                });

                // Store the currently detected address
                bezl.vars.geocoder.geocode({'location': marker.position}, function(results, status) {
                    if (status === 'OK') {
                        bezl.vars.currentAddress = results[0].formatted_address;
                    } else {
                        bezl.notificationService.showError('Geocoder failed due to: ' + status);
                    }
                });

                marker.addListener('click', function() {
                        bezl.vars.infoWindow.setContent(bezl.vars.mapFile.getInfoWindowContent({Name:'Current Location',
                                                                                Address:bezl.vars.currentAddress,
                                                                                Contacts:''}));
                        bezl.vars.infoWindow.open(bezl.vars.map, marker);

                        // After the info window is open, add a DOM listener for the add button
                        var addBtn = document.getElementById('addBtn');
                        google.maps.event.addDomListener(addBtn, "click", function() {
                            // Get the custNum from the button data
                            var custNum = $('#addBtn').attr('data-id');
                            // Find customer from custNum
                            var customer = bezl.vars.customers.find(c => c.custNum == custNum);
                            // Add Customer to trip
                            bezl.vars.customerFile.add(bezl, customer);
                        });
                });

                bezl.vars.markers[0] = (marker);

                });
            } else {
                bezl.notificationService.showError('MESSAGE: ' + "Geolocation is not supported by this browser.");
            }
        });
    }

  return {
    onStartup: OnStartup
  }
});


text:
function fs = suggestrate(sig,tRange)
fs = max(511/diff(tRange),40/sig.Period);


text:
<TITLE>Review for You've Got Mail (1998)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

You've Got Mail (1998)

reviewed by
James Sanford

 In the world of writer-director Nora Ephron, everyone is witty, well-read,
well-educated about movies, and a hopeless romantic ... everyone who matters
anyhow. Characters who don't meet those qualifications are almost certain to
end up on the sidelines.
 So it is with "You've Got Mail," in which Meg Ryan and Tom Hanks play
E-mail correspondents who share an intimate, anonymous relationship on-line,
punctuated by references to "Pride and Prejudice" (from her) and "The
Godfather" (from him). In cyberspace, they're Shopgirl and NY152; in
business, they're Kathleen Kelly and Joe Fox, rival bookstore owners who
begin feuding when Joe builds one of his Fox Books megastores steps away
from Kathleen's childrens' literature emporium The Shop Around The Corner, a
New York staple for 42 years.
 Neither Joe nor Kathleen knows who they're writing to, since they met in a
chatroom and have been intentionally vague about their identities. Thus,
they have no clue they're spilling their deepest secrets to someone they
regard as an enemy.
 If you thought Hanks and Ryan were endearing in their previous teamings in
"Sleepless In Seattle" and "Joe Versus the Volcano," you ain't seen nothing
yet. "Mail" allows them to work up a bit of friction and to hurl a few
zingers at each other, yet neither star has ever seemed more appealing. Even
when he's being snide, Hanks manages to retain his cuddliness, and though
Ephron pushes the "cute" button a bit vigorously with too many shots of
Ryan's shadowboxing -- she looks about as tough as the Robber Kitten --  no
director makes Ryan look lovelier than Ephron.
 The dialogue is predictably punchy, with the best lines charitably divided
amongst all the movie's major players, including Parker Posey as Joe's
girlfriend, a power-mad publisher who notes when an associate dies, it
"makes one less person I'm not speaking to," and Greg Kinnear as Kathleen's
beau, a columnist whose language can be best described as over the top.
"You're a lone reed, standing tall, waving boldly in the corrupt sands of
commerce," he gushes as Kathleen organizes her crusade against Fox.
 Although one of the biggest laughs from the audience came when they saw how
easily and quickly Kathleen and Joe accessed America On-Line, "Mail" also
features a wonderfully weird joke about Joe's relatives, a welcome
appearance by Steve Zahn as one of Kathleen's slightly daft employees, and a
terrific set-piece involving Kathleen's embarassment in a check-out line;
it's easily the sharpest scene of this type since Debra Winger's similar
run-in with a haughty clerk in "Terms of Endearment." So smooth and engaging
is "Mail" that even when its plot stalls it doesn't seem like time is being
wasted. If everyone on the Internet were this much fun to spend time with as
these characters, no one would ever log off.
James Sanford

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
import { defineMatrix } from '../_utils/defineMatrix'
import { Providers } from '../_utils/providers'
import { getProviderFromFlavor, ProviderFlavors } from '../_utils/relationMode/ProviderFlavor'

const providerFlavors = [
  Providers.POSTGRESQL,
  Providers.COCKROACHDB,
  Providers.SQLSERVER,
  Providers.SQLITE,
  Providers.MYSQL, // SetDefault is silently interpreted as NoAction by InnoDB on MySQL 8+
] as const

const defaultUserId = 3

const providersMatrix = providerFlavors.map((providerFlavor) => ({
  provider: getProviderFromFlavor(providerFlavor),
  providerFlavor,
  defaultUserId,
}))

export default defineMatrix(() => [providersMatrix])


text:
set -euo pipefail

if [ "${PROMISES}" = "bluebird" ]; then
  npm install bluebird
fi


text:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- Translated using Transifex web application. For support, or if you would like to to help out, please visit your language team! -->
<!-- French language-Team URL: http://www.transifex.com/projects/p/xbmc-addons/language/fr/ -->
<!-- Report language file syntax bugs at: alanwww1@xbmc.org -->

<strings>
    <!-- Help -->
    <string id="32001">Gauche + Droite = Changer d'album/de photo</string>
    <string id="32002">Haut + Bas = Changer de source</string>
    <string id="32003">Sélection = Enter dans l'album</string>
    <string id="32004">Retour = Retour à l'album/quitter l'addon</string>
    <string id="32005">Info = Affiche la description</string>
    <string id="32006">Contexte = Télécharger l'album</string>
    <string id="32007">Play = Démarrer le diaporama</string>
    <string id="32008">0 = Changer le ratio de l'image</string>

    <!-- Settings -->
    <string id="32100">Ne plus afficher cette aide à l'avenir</string>
    <string id="32101">Utiliser un fond d'écran noir (cacher l'image)</string>
    <string id="32110">Ratio de l'image par défaut</string>
    <string id="32111">Étiré</string>
    <string id="32112">Original</string>
    <string id="32120">Afficher les flèches</string>
    <string id="32130">Diaporama aléatoire</string>
    <string id="32140">Chemin de téléchargement de l'album</string>

    <!-- Settings categories -->
    <string id="32200">Aide</string>
    <string id="32201">Paramètres</string>
    <string id="32202">Sources</string>

    <!-- Script strings -->
    <string id="32300">Choisir le chemin de téléchargement par défaut</string>
    <string id="32301">Récupération des données...</string>
    <string id="32302">Élément %d/%d</string>
    <string id="32303">Élément courant : %s %d%%</string>
    <string id="32304">Télécharge vers : %s</string>

    <!-- Scrapers -->
    <string id="32400">The Big Picture - Boston.com</string>
    <string id="32401">In Focus - L'Atlantique</string>
    <string id="32402">Baie de Sacramento - Le cadre</string>
    <string id="32403">Photo Journal - Journal de Wall Street</string>
    <string id="32404">TotallyCoolPix.com</string>
    <string id="32405">LightBox - Des éditeurs de TIME</string>
    <string id="32406">Lens Blog - Le New York Times</string>
</strings>


text:
namespace Cofoundry.Domain.Internal;

public class GetUpdateGeneralSiteSettingsCommandQueryHandler
    : IQueryHandler<GetPatchableCommandQuery<UpdateGeneralSiteSettingsCommand>, UpdateGeneralSiteSettingsCommand>
    , IIgnorePermissionCheckHandler
{
    private readonly IQueryExecutor _queryExecutor;

    public GetUpdateGeneralSiteSettingsCommandQueryHandler(
        IQueryExecutor queryExecutor
        )
    {
        _queryExecutor = queryExecutor;
    }

    public async Task<UpdateGeneralSiteSettingsCommand> ExecuteAsync(GetPatchableCommandQuery<UpdateGeneralSiteSettingsCommand> query, IExecutionContext executionContext)
    {
        var settings = await _queryExecutor.ExecuteAsync(new GetSettingsQuery<GeneralSiteSettings>(), executionContext);

        return new UpdateGeneralSiteSettingsCommand()
        {
            AllowAutomaticUpdates = settings.AllowAutomaticUpdates,
            ApplicationName = settings.ApplicationName
        };
    }
}


text:
<!DOCTYPE html>

		<title>Third digit</title>
		<link href="styles/js-console.css" rel="stylesheet" />

		<input type="text" id="tb-number" />
		Check if 3rd digit right to left is 7


text:
[Official repository][repo].

[repo]: https://index.docker.io/u/thoughtpolice/logstash/

# Quick Start

To start a server:

```
$ docker pull thoughtpolice/logstash
...
```

TODO FIXME


text:
//**********************************************************************
//
//  Template: View Stand
//
//**********************************************************************

function isBetween( start, end, time ) {
	if( start > end ) {
		return (start >= time && time >= end );
	} else {
		return (start <= time && time <= end );
	}
}

Template.viewstand.rendered = function() {
/*
	var data = google.visualization.arrayToDataTable([
		['Jahr', 'Rotwild', 'Rehwild', 'Schwarzwild'],
		['2010',  1,1,0],
		['2011',  0,1,0],
		['2012',  2,1,1],
		['2013',  2,3,0]
	]);

	var options = {
		title: 'Erlegtes Wild im 200m Umkreis',
		hAxis: {title: 'Jahr', titleTextStyle: {color: 'black'}}
	};

	var chart = new google.visualization.ColumnChart(document.getElementById('statistic'));
	chart.draw(data, options);
	*/
}

Template.viewstand.canEdit = function () {
	var area = Areas.findOne({_id:Meteor.user().profile.currentSelectedArea });
	if( area ) {
		return area.viewer[ Meteor.userId() ] < 2;
	}
	return false;
}

Template.viewstand.allocation = function() {

	var sid = Session.get('standdata')._id;

	var aday = 24*60*60*1000;
	var now = new Date();
	var yesterday = new Date(now.getTime() - aday);
	yesterday.setHours(0);
	yesterday.setMinutes(0);
	yesterday.setSeconds(0);
	yesterday.setMilliseconds(0);

	var tomorrow = new Date(now.getTime() + aday);
	var reservations = [
		{_id:'3xb4iJxdNR3Z9mmxu',stand:'hPFzPyzYTqJq2L2y5',user:{id:'3xb4iJxdNR3Z9mmxu',name:'Steffen',surname:'Jäckel'},from:now, to: tomorrow }
	];

	var wds  = ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'];

	var hour = 60*60*1000;
	var days = [];
	var timecode = yesterday.getTime();
	var state = Session.get('allocationstate');

	if( Session.get('editallocation') ) {
		var selected = Session.get('editallocation')._id;
	} else if( Session.get('allocationinfo') ) {
		var selected = Session.get('allocationinfo')._id;
	}

	for( var d=0;d < 5;d++) {
		var hours = [];
		var classes = ['free','notaviable','reserved'];

		if( d==0) {
			var str = 'Gestern'
		} else if ( d == 1 ) {
			var str = 'Heute'
		} else if ( d == 2 ) {
			var str = 'Morgen'
		} else {
			var str = wds[cur.getDay()];
		}

		for( var i=0;i < 24;i++ ) {

			var cl = '';
			Allocations.find({ stand:sid, to :{ $gt:yesterday }}).forEach( function (obj ) {
				if( isBetween( obj.from,obj.to, timecode ) ) {
					if( obj.user.id == Meteor.userId() ) {
						cl = 'reserved';
					} else {
						cl = 'notaviable';
					}

					if( selected == obj._id ) {
						cl += ' current';
					}

					if( timecode < now.getTime() ) {
						cl += " disabled";
					}

					hours.push({ 'class':cl, data: obj._id });
					return false;
				}
			})

			if( cl == '' ) {
				cl = 'free';
				if( timecode < now.getTime() ) {
					cl += " disabled";
				} else {
					cl += " available"
				}

				if( state ) {
					if( state.start ) {
						if( state.start.getTime() == timecode ) {
							cl += " start";
						}

						if( state.end ) {
							if( isBetween( state.start.getTime() , state.end.getTime(), timecode ) ) {
								cl += " between";
							}

							if( state.end.getTime() == timecode ) {
								cl += " end";
							}
						}
					}
				}
				hours.push({ 'class':cl, data: timecode });
			}
			timecode +=hour ;
		}
		var cur = new Date( timecode );

		days.push( {day:str,date: cur,hours:hours } );
	}
	return days;
}

Template.viewstand.allocationinfo = function() {
	return Session.get('allocationinfo')
}

Template.viewstand.allocationstate = function() {
	return Session.get('allocationstate')
}

Template.viewstand.editallocation = function() {
	return Session.get('editallocation')
}

Template.viewstand.standname = function () {
	return Session.get('standdata').name;
}

Template.viewstand.standdesc = function () {
	return Session.get('standdata').desc;
}

Template.viewstand.standtype = function ( i ) {
	return Session.get('standdata').type;
}

Template.viewstand.conditionInfo = function () {
	return renderConditionInfo( Session.get('standdata').condition )
}

Template.viewstand.events({
	'click .modal-close': function( e ) {
		modals.pop()
	},
	'click #move-stand': function( e ) {
		Session.set('editmode',{ editstandposition:true } );
	},
	'click #delete-stand': function( e ) {
		if( confirm('Wirklich löschen?') ) {
			Meteor.call('deleteStand',Session.get('standdata')._id, function ( e ) {
				modals.pop();
			})
		}
	},
	'click .notaviable' : function ( e ) {
		var alloc = Allocations.findOne({_id:$(e.currentTarget).attr('data')});
		Session.set('allocationinfo',alloc);
		Session.set('editallocation',null);
		Session.set('allocationstate',null )
	},
	'click #abort-allocationinfo':function( e ) {
		Session.set('allocationinfo',null);
	},
	'click .reserved' : function ( e ) {
		var alloc = Allocations.findOne({_id:$(e.currentTarget).attr('data')});
		Session.set('editallocation',alloc);
		Session.set('allocationinfo',null);
		Session.set('allocationstate',null )
	},
	'click #abort-editallocation': function( e ) {
		Session.set('editallocation',null);
	},
	'click #remove-editallocation': function( e ) {
		Meteor.call('removeAllocation', Session.get('editallocation')._id, function(e){
			if(e) {
				console.log(e);
			}
			Session.set('editallocation',null);
		})
		$(e.currentTarget).disable();
	},
	'click .available' : function ( e ) {
		Session.set('editallocation',null);
		Session.set('allocationinfo',null);
		var state = Session.get('allocationstate');
		if( state && state.inselection ) {
			state['inselection'] = false;
			Session.set('allocationstate',state )
		} else {
			state = {};
			state['start'] = new Date( parseInt( $(e.currentTarget).attr('data')) );
			state['end'] = new Date( parseInt( $(e.currentTarget).attr('data')) );
			state['inselection'] = true;
			Session.set('allocationstate',state )
		}
	},
	'mouseenter .available' : function( e ) {
		var state = Session.get('allocationstate');
		if( state && state.inselection === true ) {
			state.end = new Date( parseInt( $(e.currentTarget).attr('data')) );
			Session.set('allocationstate',state )
		}
	},
	'click #abort-allocation': function( e ) {
		Session.set('allocationstate',null);
	},
	'click #commit-allocation': function( e ) {
		var sid = Session.get('standdata')._id;
		var aid = Session.get('standdata').area;
		var from = Session.get('allocationstate').start;
		var to =  Session.get('allocationstate').end;
		Meteor.call('insertAllocation',sid,aid,from,to, function( e ) {
			if( e ) {
				console.log(e);
			}
			Session.set('allocationstate',null);
		})
		$('#abort-allocation').disable();
		$('#commit-allocation').disable();
	},
	'click #edit-stand': function( e ) {
		modals.push('editstand')
	},
	'click #set-condition-bad': function( e ) {
		var sid = Session.get('standdata')._id;
		Meteor.call('updateCondition',sid, 1, function(e) {
			var stand = Stands.findOne({_id:sid});
			if( stand ) {
				setObj('standdata','condition',stand.condition );
			}
		});
	},
	'click #set-condition-ok': function( e ) {
		var sid = Session.get('standdata')._id;
		Meteor.call('updateCondition', sid, 2,function(e) {
			var stand = Stands.findOne({_id:sid});
			if( stand ) {
				setObj('standdata','condition',stand.condition );
			}
		});
	},
	'click #set-condition-new': function( e ) {
		var sid = Session.get('standdata')._id;
		Meteor.call('updateCondition', sid, 3, function(e) {
			var stand = Stands.findOne({_id:sid});
			if( stand ) {
				setObj('standdata','condition',stand.condition );
			}
		});
	}
})

Template.viewstand.created = function( ) {
	this.comments = Meteor.subscribe("comments",Session.get('standdata')._id)
}

Template.viewstand.destroyed = function( ) {
	this.comments.stop();
}


text:
<?php
namespace anlutro\Form\Tests;

use PHPUnit_Framework_TestCase;
use Mockery as m;

class BuilderTest extends TestCase
{
	/** @test */
	public function decodesJson()
	{
		$builder = $this->makeFormBuilder();
		$request = new \Symfony\Component\HttpFoundation\Request([], [], [], [], [], [], '{"foo":"bar"}');
		$request->headers->set('content-type', 'application/json');
		$builder->setRequest($request);
		$this->assertEquals(['foo' => 'bar'], $builder->getRequestData());
	}
}


text:
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
      Toggle navigation

    </button>

 Playback

 Home

         Cameras

 Add camera

Edit Existing

          <?php
            $cameras = dbFetchAll("SELECT * FROM Monitors");
            foreach($cameras as $index => $camera) {
              $monitorClass = "monitor-unknown";
              if(!zmcStatus($camera)) {
                $monitorClass = "monitor-down";
              }
              elseif(!zmaStatus($camera)) {
                $monitorClass = "monitor-warning";
              }
              else {
                $monitorClass = "monitor-ok";
              }

              echo "
 " . $camera['Name'];
              switch($monitorClass) {
                case "monitor-down":
                  echo " ";
                  break;
                case "monitor-warning":
                  echo " ";
                  break;
                case "monitor-ok":
                  echo " ";
                  break;
              }
              echo "
";
            }
          ?>

         Zones

 Add zone

Edit Existing

          <?php
            foreach($cameras as $camera) {
          ?>

<a href="?skin=classic&view=zones&mid=<?=$camera['Id']?>" class="init-colorbox"> <?=$camera['Name']?>

          <?php
            }
          ?>

 Presets

 Events

 Users

 Log

 Settings

      <?php
        $diskUsage = getDiskPercent();
        $diskColour = "teal";
        if($diskUsage >= 90) {
          $diskColour = "red";
        }
      ?>

      <li class="colour <?=$diskColour?>"> <?=$diskUsage?>%

         Updates

 Checking for skin updates...

 Checking for ZoneMinder updates...

      <?php
        $running = daemonCheck();
        $status = $running?$SLANG['Running']:$SLANG['Stopped'];

        if($status === "Running") {
          $colour = "green";
          $icon = "fa-check-circle";
        }
        elseif($status === "Stopped") {
          $colour = "red";
          $icon = "fa-times-circle";
        }
        else {
          $colour = "yellow";
          $icon = "fa-exclamation-circle";
        }
      ?>

      <li class="colour <?=$colour?>"><span class="fa <?=$icon?>"> ZM <?=lcfirst($status)?>

         <?php if(isset($_SESSION['user'])) { echo ucfirst($_SESSION['user']['Username']); } ?>

 Change Password

 Log Out


text:
#include <Interface/Modules/Forward/BuildBEMatrixDialog.h>
#include <Core/Algorithms/Legacy/Forward/BuildBEMatrixAlgo.h>

using namespace SCIRun::Gui;
using namespace SCIRun::Dataflow::Networks;
using namespace SCIRun::Core::Algorithms;
using namespace SCIRun::Core::Algorithms::Forward;

namespace TableColumns
{
  const int MinColumn = 0;

  const int FieldName = 0;
  const int FieldType = 1;
  const int BoundaryCondition = 2;
  const int InsideConductivity = 3;
  const int OutsideConductivity = 4;

  const int MaxColumn = OutsideConductivity + 1;
}

BuildBEMatrixDialog::BuildBEMatrixDialog(const std::string& name, ModuleStateHandle state,
  QWidget* parent /* = 0 */)
  : ModuleDialogGeneric(state, parent)
{
  setupUi(this);
  setWindowTitle(QString::fromStdString(name));
  fixSize();
  WidgetStyleMixin::tableHeaderStyle(this->tableWidget);
  tableWidget->resizeColumnsToContents();

  connect(tableWidget, SIGNAL(cellChanged(int,int)), this, SLOT(pushTable(int,int)));
}

void BuildBEMatrixDialog::updateFromPortChange(int numPorts, const std::string&, DynamicPortChange)
{
  auto oldRowCount = tableWidget->rowCount();
  tableWidget->setRowCount(numPorts - 1);
  tableWidget->blockSignals(true);
  for (int i = oldRowCount; i < tableWidget->rowCount(); ++i)
  {
    using namespace TableColumns;
    tableWidget->setItem(i, FieldName, new QTableWidgetItem("field" + QString::number(i)));
    tableWidget->setItem(i, FieldType, new QTableWidgetItem("[populated on execute]"));
    tableWidget->setCellWidget(i, BoundaryCondition, makeComboBoxItem(i));
    tableWidget->setCellWidget(i, InsideConductivity, makeDoubleEntryItem(i, InsideConductivity));
    tableWidget->setCellWidget(i, OutsideConductivity, makeDoubleEntryItem(i, OutsideConductivity));

    // type is readonly
    auto type = tableWidget->item(i, FieldType);
    type->setFlags(type->flags() & ~Qt::ItemIsEditable);
    pushTableRow(i);
  }
  pull();
  tableWidget->resizeColumnsToContents();
  tableWidget->blockSignals(false);
}

QComboBox* BuildBEMatrixDialog::makeComboBoxItem(int i) const
{
  QStringList bcList;
  bcList << "Measurement (Neumann)" << "Source (Dirichlet)";
  QComboBox* bcBox = new QComboBox();
  bcBox->addItems(bcList);
  bcBox->setCurrentIndex(i == 0 ? 1 : 0);
  connect(bcBox, SIGNAL(currentIndexChanged(int)), this, SLOT(pushBoundaryConditions()));
  return bcBox;
}

QDoubleSpinBox* BuildBEMatrixDialog::makeDoubleEntryItem(int row, int col) const
{
  auto spin = new QDoubleSpinBox();
  spin->setValue((row + col + 1) % 2);
  const char* slot = col == TableColumns::InsideConductivity ? SLOT(pushInsides()) : SLOT(pushOutsides());
  connect(spin, SIGNAL(valueChanged(double)), this, slot);
  return spin;
}

void BuildBEMatrixDialog::pushTable(int row, int col)
{
  using namespace TableColumns;
  if (FieldName == col)
    pushNames();
  else if (BoundaryCondition == col)
    pushBoundaryConditions();
  else if (InsideConductivity == col)
    pushInsides();
  else if (OutsideConductivity == col)
    pushOutsides();
}

void BuildBEMatrixDialog::pushTableRow(int row)
{
  using namespace TableColumns;
  for (int col = MinColumn; col < MaxColumn; ++col)
    pushTable(row, col);
}

void BuildBEMatrixDialog::pushNames()
{
  using namespace TableColumns;
  if (!pulling_)
  {
    VariableList names;
    for (int i = 0; i < tableWidget->rowCount(); ++i)
    {
      auto item = tableWidget->item(i, FieldName);
      names.push_back(makeVariable("", item->text().toStdString()));
    }
    state_->setValue(Parameters::FieldNameList, names);
  }
}

void BuildBEMatrixDialog::pushBoundaryConditions()
{
  using namespace TableColumns;
  if (!pulling_)
  {
    VariableList names;
    for (int i = 0; i < tableWidget->rowCount(); ++i)
    {
      auto box = qobject_cast<QComboBox*>(tableWidget->cellWidget(i, BoundaryCondition));
      names.push_back(makeVariable("", box->currentText().toStdString()));
    }
    state_->setValue(Parameters::BoundaryConditionList, names);
  }
}

void BuildBEMatrixDialog::pushInsides()
{
  using namespace TableColumns;
  if (!pulling_)
  {
    auto names = makeHomogeneousVariableList([this](size_t i)
    {
      return qobject_cast<QDoubleSpinBox*>(tableWidget->cellWidget(i, InsideConductivity))->value();
    }, tableWidget->rowCount());

    state_->setValue(Parameters::InsideConductivityList, names);
  }
}

void BuildBEMatrixDialog::pushOutsides()
{
  using namespace TableColumns;
  if (!pulling_)
  {
    VariableList names;
    for (int i = 0; i < tableWidget->rowCount(); ++i)
    {
      auto box = qobject_cast<QDoubleSpinBox*>(tableWidget->cellWidget(i, OutsideConductivity));
      names.push_back(makeVariable("", box->value()));
    }
    state_->setValue(Parameters::OutsideConductivityList, names);
  }
}

void BuildBEMatrixDialog::pullSpecial()
{
  pullNames();
  pullFieldTypes();
  pullBoundaryConditions();
  pullInsides();
  pullOutsides();
}

void BuildBEMatrixDialog::pullNames()
{
  using namespace TableColumns;
  Pulling p(this);
  auto nameList = state_->getValue(Parameters::FieldNameList).toVector();
  const int rows = std::min(static_cast<int>(nameList.size()), tableWidget->rowCount());
  for (int row = 0; row < rows; ++row)
  {
    auto item = tableWidget->item(row, FieldName);
    item->setText(QString::fromStdString(nameList[row].toString()));
  }
}

void BuildBEMatrixDialog::pullFieldTypes()
{
  using namespace TableColumns;
  Pulling p(this);
  auto typeList = transient_value_cast<FieldTypeListType>(state_->getTransientValue(Parameters::FieldTypeList));
  const int rows = std::min(static_cast<int>(typeList.size()), tableWidget->rowCount());
  for (int row = 0; row < rows; ++row)
  {
    auto item = tableWidget->item(row, FieldType);
    item->setText(QString::fromStdString(typeList[row]));
  }
}

void BuildBEMatrixDialog::pullBoundaryConditions()
{
  using namespace TableColumns;
  Pulling p(this);
  auto bdyList = state_->getValue(Parameters::BoundaryConditionList).toVector();
  const int rows = std::min(static_cast<int>(bdyList.size()), tableWidget->rowCount());
  for (int row = 0; row < rows; ++row)
  {
    auto box = qobject_cast<QComboBox*>(tableWidget->cellWidget(row, BoundaryCondition));
    auto str = QString::fromStdString(bdyList[row].toString());
    box->setCurrentIndex(box->findText(str));
  }
}

void BuildBEMatrixDialog::pullInsides()
{
  using namespace TableColumns;
  Pulling p(this);
  auto condList = state_->getValue(Parameters::InsideConductivityList).toVector();
  const int rows = std::min(static_cast<int>(condList.size()), tableWidget->rowCount());
  for (int row = 0; row < rows; ++row)
  {
    auto box = qobject_cast<QDoubleSpinBox*>(tableWidget->cellWidget(row, InsideConductivity));
    box->setValue(condList[row].toDouble());
  }
}

void BuildBEMatrixDialog::pullOutsides()
{
  using namespace TableColumns;
  Pulling p(this);
  auto condList = state_->getValue(Parameters::OutsideConductivityList).toVector();
  const int rows = std::min(static_cast<int>(condList.size()), tableWidget->rowCount());
  for (int row = 0; row < rows; ++row)
  {
    auto box = qobject_cast<QDoubleSpinBox*>(tableWidget->cellWidget(row, OutsideConductivity));
    box->setValue(condList[row].toDouble());
  }
}


text:
class CreditsMailer < ActionMailer::Base
  include ERB::Util

  def request_refund_from(backer)
    @backer = backer
    @user = backer.user
    mail(:from => "#{I18n.t('site.name')} <#{I18n.t('site.email.system')}>", :to => I18n.t('site.email.payments'), :subject => I18n.t('credits_mailer.request_refund_from.subject', :name => @user.name))
  end
end


text:
to test that many people work together

1.创建一个repository

2.git clone https://github.com/TakagiAkito/GitTutorial.git

3.git branch develop
  git branch mashiro

  创建了两个本地分支
  git branch --list查看本地分支情况
  git checkout develop 切换到develop分支下
  git push origin develop将分支push到github了

  git branch
* develop
  mashiro
  master
*标识所在当前分支情况

切换用户,模拟多人操作。。。。。。
已经在develop这个分支(人员下了)
git add .

git commit -m 'add'

git push origin develop

参考文章:
http://www.jianshu.com/p/87e34894a9f9?utm_campaign=maleskine&utm_content=note&utm_medium=writer_share&utm_source=weibo

http://jingyan.baidu.com/article/bea41d437e4fbab4c51be6cf.html

http://blog.csdn.net/guang11cheng/article/details/37757201

试试


text:
package com.github.ljtfreitas.restify.http.client.netty;

import java.io.InputStream;
import java.util.concurrent.CompletableFuture;

import com.github.ljtfreitas.restify.http.client.HttpClientException;
import com.github.ljtfreitas.restify.http.client.message.Header;
import com.github.ljtfreitas.restify.http.client.message.Headers;
import com.github.ljtfreitas.restify.http.client.message.request.HttpRequestMessage;
import com.github.ljtfreitas.restify.http.client.message.response.StatusCode;
import com.github.ljtfreitas.restify.http.client.response.HttpClientResponse;

import io.netty.buffer.ByteBufInputStream;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.FullHttpResponse;

class NettyRequestExecuteHandler extends SimpleChannelInboundHandler<FullHttpResponse> {

	private final CompletableFuture<HttpClientResponse> future;
	private final HttpRequestMessage source;

	public NettyRequestExecuteHandler(CompletableFuture<HttpClientResponse> future, NettyHttpClientRequest source) {
		this.future = future;
		this.source = source;
	}

	@Override
	protected void channelRead0(ChannelHandlerContext context, FullHttpResponse nettyResponse) throws Exception {
		NettyHttpClientResponse nettyHttpClientResponse = convert(context, nettyResponse);

		future.complete(nettyHttpClientResponse);
	}

	private NettyHttpClientResponse convert(ChannelHandlerContext context, FullHttpResponse nettyResponse) {
		nettyResponse.retain();

		StatusCode statusCode = StatusCode.of(nettyResponse.status().code());

		Headers headers = headersOf(nettyResponse);

		InputStream body = new ByteBufInputStream(nettyResponse.content());

		NettyHttpClientResponse nettyHttpClientResponse = new NettyHttpClientResponse(statusCode, headers, body, source,
				context, nettyResponse);

		return nettyHttpClientResponse;
	}

	private Headers headersOf(FullHttpResponse nettyResponse) {
		return nettyResponse.headers().entries().stream()
			.map(header -> new Header(header.getKey(), header.getValue()))
				.reduce(new Headers(), (a, b) -> a.add(b), (a, b) -> b);
	}

	@Override
	public void exceptionCaught(ChannelHandlerContext context, Throwable cause) throws Exception {
		future.completeExceptionally(handle(cause));
	}

	private Throwable handle(Throwable cause) {
		return new HttpClientException("I/O error on HTTP request: [" + source.method() + " " + source.uri() + "]", cause);
	}
}


text:
package com.google.gerrit.extensions.common;

import java.sql.Timestamp;

public abstract class GroupAuditEventInfo {
  public enum Type {
    ADD_USER,
    REMOVE_USER,
    ADD_GROUP,
    REMOVE_GROUP
  }

  public Type type;
  public AccountInfo user;
  public Timestamp date;

  public static UserMemberAuditEventInfo createAddUserEvent(
      AccountInfo user, Timestamp date, AccountInfo member) {
    return new UserMemberAuditEventInfo(Type.ADD_USER, user, date, member);
  }

  public static UserMemberAuditEventInfo createRemoveUserEvent(
      AccountInfo user, Timestamp date, AccountInfo member) {
    return new UserMemberAuditEventInfo(Type.REMOVE_USER, user, date, member);
  }

  public static GroupMemberAuditEventInfo createAddGroupEvent(
      AccountInfo user, Timestamp date, GroupInfo member) {
    return new GroupMemberAuditEventInfo(Type.ADD_GROUP, user, date, member);
  }

  public static GroupMemberAuditEventInfo createRemoveGroupEvent(
      AccountInfo user, Timestamp date, GroupInfo member) {
    return new GroupMemberAuditEventInfo(Type.REMOVE_GROUP, user, date, member);
  }

  protected GroupAuditEventInfo(Type type, AccountInfo user, Timestamp date) {
    this.type = type;
    this.user = user;
    this.date = date;
  }

  public static class UserMemberAuditEventInfo extends GroupAuditEventInfo {
    public AccountInfo member;

    public UserMemberAuditEventInfo(
        Type type, AccountInfo user, Timestamp date, AccountInfo member) {
      super(type, user, date);
      this.member = member;
    }
  }

  public static class GroupMemberAuditEventInfo extends GroupAuditEventInfo {
    public GroupInfo member;

    public GroupMemberAuditEventInfo(
        Type type, AccountInfo user, Timestamp date, GroupInfo member) {
      super(type, user, date);
      this.member = member;
    }
  }
}


text:
import { Host } from 'ifrau/host.js';

window.ifrauhost = Host;


text:
namespace rocksdb {
namespace compression_cache {

void* const SentinelValue = nullptr;
// Cache ZSTD uncompression contexts for reads
// if needed we can add ZSTD compression context caching
// which is currently is not done since BlockBasedTableBuilder
// simply creates one compression context per new SST file.
struct ZSTDCachedData {
  // We choose to cache the below structure instead of a ptr
  // because we want to avoid a) native types leak b) make
  // cache use transparent for the user
  ZSTDUncompressCachedData uncomp_cached_data_;
  std::atomic<void*> zstd_uncomp_sentinel_;

  char
      padding[(CACHE_LINE_SIZE -
               (sizeof(ZSTDUncompressCachedData) + sizeof(std::atomic<void*>)) %
                   CACHE_LINE_SIZE)];  // unused padding field

  ZSTDCachedData() : zstd_uncomp_sentinel_(&uncomp_cached_data_) {}
  ZSTDCachedData(const ZSTDCachedData&) = delete;
  ZSTDCachedData& operator=(const ZSTDCachedData&) = delete;

  ZSTDUncompressCachedData GetUncompressData(int64_t idx) {
    ZSTDUncompressCachedData result;
    void* expected = &uncomp_cached_data_;
    if (zstd_uncomp_sentinel_.compare_exchange_strong(expected,
                                                      SentinelValue)) {
      uncomp_cached_data_.CreateIfNeeded();
      result.InitFromCache(uncomp_cached_data_, idx);
    } else {
      // Creates one time use data
      result.CreateIfNeeded();
    }
    return result;
  }
  // Return the entry back into circulation
  // This is executed only when we successfully obtained
  // in the first place
  void ReturnUncompressData() {
    if (zstd_uncomp_sentinel_.exchange(&uncomp_cached_data_) != SentinelValue) {
      // Means we are returning while not having it acquired.
      assert(false);
    }
  }
};
static_assert(sizeof(ZSTDCachedData) % CACHE_LINE_SIZE == 0,
              "Expected CACHE_LINE_SIZE alignment");
}  // namespace compression_cache

using namespace compression_cache;

class CompressionContextCache::Rep {
 public:
  Rep() {}
  ZSTDUncompressCachedData GetZSTDUncompressData() {
    auto p = per_core_uncompr_.AccessElementAndIndex();
    int64_t idx = static_cast<int64_t>(p.second);
    return p.first->GetUncompressData(idx);
  }
  void ReturnZSTDUncompressData(int64_t idx) {
    assert(idx >= 0);
    auto* cn = per_core_uncompr_.AccessAtCore(static_cast<size_t>(idx));
    cn->ReturnUncompressData();
  }

 private:
  CoreLocalArray<ZSTDCachedData> per_core_uncompr_;
};

CompressionContextCache::CompressionContextCache() : rep_(new Rep()) {}

CompressionContextCache* CompressionContextCache::Instance() {
  static CompressionContextCache instance;
  return &instance;
}

void CompressionContextCache::InitSingleton() { Instance(); }

ZSTDUncompressCachedData
CompressionContextCache::GetCachedZSTDUncompressData() {
  return rep_->GetZSTDUncompressData();
}

void CompressionContextCache::ReturnCachedZSTDUncompressData(int64_t idx) {
  rep_->ReturnZSTDUncompressData(idx);
}

CompressionContextCache::~CompressionContextCache() { delete rep_; }

}  // namespace rocksdb


text:
def nextDay(year, month, day):
    """Simple version: assume every month has 30 days"""
    if day < daysInMonth(year, month):
        return year, month, day + 1
    else:
        if month == 12:
            return year + 1, 1, 1
        else:
            return year, month + 1, 1

def dateIsAfter(year1, month1, day1, year2, month2, day2):
    """Returns True if year1-month1-day1 is after year2-month2-day2.  Otherwise, returns False."""
    if year1 > year2:
        return True
    if year1 == year2:
        if month1 > month2:
            return True
        if month1 == month2:
            return day1 > day2
    return False

def daysBetweenDates(year1, month1, day1, year2, month2, day2):
    """Returns the number of days between year1/month1/day1
       and year2/month2/day2. Assumes inputs are valid dates
       in Gregorian calendar."""
    # program defensively! Add an assertion if the input is not valid!
    assert dateIsAfter(year2, month2, day2, year1, month1, day1)
    days = 0
    while dateIsAfter(year2, month2, day2, year1, month1, day1):
        days += 1
        (year1, month1, day1) = nextDay(year1, month1, day1)
    return days

'''
returns number of days in the month
30 for testing
'''
def daysInMonth(year, month):
    if isLeapYear(year) and (month == 2):
        return 29
    # create tuple with all correct days in months except during leap year
    monthTuple = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
    # returns corresponding days in month. takes into account index starts at 0
    return monthTuple[month - 1]

def isLeapYear(year):
    if (year % 4 == 0):
        if (year % 100 != 0):
            return True
        elif (year % 400 == 0):
            return True
    else:
        return False

def test():
    test_cases = [((2012,1,1,2012,2,28), 58),
                  ((2012,1,1,2012,3,1), 60),
                  ((2011,6,30,2012,6,30), 366),
                  ((2011,1,1,2012,8,8), 585 ),
                  ((1900,1,1,1999,12,31), 36523)]

    for (args, answer) in test_cases:
        result = daysBetweenDates(*args)
        if result != answer:
            print "Test with data:", args, "failed"
        else:
            print "Test case passed!"

test()