text:
/**
 * This class is generated by jOOQ
 */
package com.skcraft.plume.common.service.sql.model.data.tables.records;

import com.skcraft.plume.common.service.sql.model.data.tables.Claim;

import java.sql.Timestamp;

import javax.annotation.Generated;

import org.jooq.Field;
import org.jooq.Record4;
import org.jooq.Record7;
import org.jooq.Row7;
import org.jooq.impl.UpdatableRecordImpl;

/**
 * This class is generated by jOOQ.
 */
@Generated(
	value = {
		"http://www.jooq.org",
		"jOOQ version:3.6.2"
	},
	comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ClaimRecord extends UpdatableRecordImpl<ClaimRecord> implements Record7<String, String, Integer, Integer, Integer, String, Timestamp> {

	private static final long serialVersionUID = -1067338032;

	/**
	 * Setter for data.claim.server.
	 */
	public void setServer(String value) {
		setValue(0, value);
	}

	/**
	 * Getter for data.claim.server.
	 */
	public String getServer() {
		return (String) getValue(0);
	}

	/**
	 * Setter for data.claim.world.
	 */
	public void setWorld(String value) {
		setValue(1, value);
	}

	/**
	 * Getter for data.claim.world.
	 */
	public String getWorld() {
		return (String) getValue(1);
	}

	/**
	 * Setter for data.claim.x.
	 */
	public void setX(Integer value) {
		setValue(2, value);
	}

	/**
	 * Getter for data.claim.x.
	 */
	public Integer getX() {
		return (Integer) getValue(2);
	}

	/**
	 * Setter for data.claim.z.
	 */
	public void setZ(Integer value) {
		setValue(3, value);
	}

	/**
	 * Getter for data.claim.z.
	 */
	public Integer getZ() {
		return (Integer) getValue(3);
	}

	/**
	 * Setter for data.claim.owner_id.
	 */
	public void setOwnerId(Integer value) {
		setValue(4, value);
	}

	/**
	 * Getter for data.claim.owner_id.
	 */
	public Integer getOwnerId() {
		return (Integer) getValue(4);
	}

	/**
	 * Setter for data.claim.party_name.
	 */
	public void setPartyName(String value) {
		setValue(5, value);
	}

	/**
	 * Getter for data.claim.party_name.
	 */
	public String getPartyName() {
		return (String) getValue(5);
	}

	/**
	 * Setter for data.claim.issue_time.
	 */
	public void setIssueTime(Timestamp value) {
		setValue(6, value);
	}

	/**
	 * Getter for data.claim.issue_time.
	 */
	public Timestamp getIssueTime() {
		return (Timestamp) getValue(6);
	}

	// -------------------------------------------------------------------------
	// Primary key information
	// -------------------------------------------------------------------------

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Record4<String, String, Integer, Integer> key() {
		return (Record4) super.key();
	}

	// -------------------------------------------------------------------------
	// Record7 type implementation
	// -------------------------------------------------------------------------

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Row7<String, String, Integer, Integer, Integer, String, Timestamp> fieldsRow() {
		return (Row7) super.fieldsRow();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Row7<String, String, Integer, Integer, Integer, String, Timestamp> valuesRow() {
		return (Row7) super.valuesRow();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Field<String> field1() {
		return Claim.CLAIM.SERVER;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Field<String> field2() {
		return Claim.CLAIM.WORLD;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Field<Integer> field3() {
		return Claim.CLAIM.X;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Field<Integer> field4() {
		return Claim.CLAIM.Z;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Field<Integer> field5() {
		return Claim.CLAIM.OWNER_ID;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Field<String> field6() {
		return Claim.CLAIM.PARTY_NAME;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Field<Timestamp> field7() {
		return Claim.CLAIM.ISSUE_TIME;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String value1() {
		return getServer();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String value2() {
		return getWorld();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Integer value3() {
		return getX();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Integer value4() {
		return getZ();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Integer value5() {
		return getOwnerId();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String value6() {
		return getPartyName();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Timestamp value7() {
		return getIssueTime();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord value1(String value) {
		setServer(value);
		return this;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord value2(String value) {
		setWorld(value);
		return this;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord value3(Integer value) {
		setX(value);
		return this;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord value4(Integer value) {
		setZ(value);
		return this;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord value5(Integer value) {
		setOwnerId(value);
		return this;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord value6(String value) {
		setPartyName(value);
		return this;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord value7(Timestamp value) {
		setIssueTime(value);
		return this;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ClaimRecord values(String value1, String value2, Integer value3, Integer value4, Integer value5, String value6, Timestamp value7) {
		value1(value1);
		value2(value2);
		value3(value3);
		value4(value4);
		value5(value5);
		value6(value6);
		value7(value7);
		return this;
	}

	// -------------------------------------------------------------------------
	// Constructors
	// -------------------------------------------------------------------------

	/**
	 * Create a detached ClaimRecord
	 */
	public ClaimRecord() {
		super(Claim.CLAIM);
	}

	/**
	 * Create a detached, initialised ClaimRecord
	 */
	public ClaimRecord(String server, String world, Integer x, Integer z, Integer ownerId, String partyName, Timestamp issueTime) {
		super(Claim.CLAIM);

		setValue(0, server);
		setValue(1, world);
		setValue(2, x);
		setValue(3, z);
		setValue(4, ownerId);
		setValue(5, partyName);
		setValue(6, issueTime);
	}
}


text:
import mongoose from 'mongoose';

let TokenSchema = new mongoose.Schema({
	token: {type: String, require: true},
	idUser: {type: String, require: true},
	idRole: {type: String, require: true},
	idBranch: {type: String, require: true},
	created: {type: Date, require: true},
	expiration: {type: Date, require: true},
	dateDelete: {type: Date}
});

export default mongoose.model('Token', TokenSchema)

redpajama_set_name: RedPajamaGithub


text:
class BowerVendor::Fetch < BowerVendor::Base
  def execute
    return if vendors.empty?

    script = executable
    puts "excutable: #{script}"

    Dir.chdir(work_dir) do
      fork do
        exec "#{script} install"
      end
      Process.wait
    end
  end

  def executable
    f = "#{local_node_bin}/bower"
    File.exists?(f) ? f : 'bower'
  end
end


text:
SELECT
  t.geo_id,
  t.full_name,
  t.mtfcc_feature_class_code,
  t.railway_geom
FROM `bigquery-public-data.geo_us_boundaries.railways` AS t


text: brew bundle dump --force


text: from lib import f<caret>


text:
package com.amazonaws.services.redshift.model.transform;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.amazonaws.AmazonClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.internal.ListWithAutoConstructFlag;
import com.amazonaws.services.redshift.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.StringUtils;

/**
 * Describe Event Subscriptions Request Marshaller
 */
public class DescribeEventSubscriptionsRequestMarshaller implements Marshaller<Request<DescribeEventSubscriptionsRequest>, DescribeEventSubscriptionsRequest> {

    public Request<DescribeEventSubscriptionsRequest> marshall(DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) {

        if (describeEventSubscriptionsRequest == null) {
            throw new AmazonClientException("Invalid argument passed to marshall(...)");
        }

        Request<DescribeEventSubscriptionsRequest> request = new DefaultRequest<DescribeEventSubscriptionsRequest>(describeEventSubscriptionsRequest, "AmazonRedshift");
        request.addParameter("Action", "DescribeEventSubscriptions");
        request.addParameter("Version", "2012-12-01");

        if (describeEventSubscriptionsRequest.getSubscriptionName() != null) {
            request.addParameter("SubscriptionName", StringUtils.fromString(describeEventSubscriptionsRequest.getSubscriptionName()));
        }
        if (describeEventSubscriptionsRequest.getMaxRecords() != null) {
            request.addParameter("MaxRecords", StringUtils.fromInteger(describeEventSubscriptionsRequest.getMaxRecords()));
        }
        if (describeEventSubscriptionsRequest.getMarker() != null) {
            request.addParameter("Marker", StringUtils.fromString(describeEventSubscriptionsRequest.getMarker()));
        }

        return request;
    }
}


text:
import sys
from setuptools import setup, find_packages

NAME = "swagger_client"
VERSION = "1.0.0"

# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["urllib3 >= 1.10", "six >= 1.9", "certifi", "python-dateutil"]

setup(
    name=NAME,
    version=VERSION,
    description="Call Control API",
    author_email="info@kedlin.com",
    url="http://callcontrol.com/documentation",
    keywords=["Swagger", "Call Control API"],
    install_requires=REQUIRES,
    packages=find_packages(),
    include_package_data=True,
    long_description="""\
    API for blocking phone calls with Call Control. Data is from crowdsourced community blacklist from 12+ million users and government agencies (FTC, FCC, IRS) Try with api_key 'demo', hit explore above, and then try phone numbers 18008472911,13157244022,17275567300,18008276655,12061231234.
    """
)


text:
IBodyIndexFrameArrivedEventArgs::get\_FrameReference Method
===========================================================

Gets the frame reference.

Syntax
======

<colgroup>
<col width="100%" />
</colgroup>

C++

public:
HRESULT get_FrameReference(
         IBodyIndexFrameReference **bodyIndexFrameReference
)

#### Parameters

*bodyIndexFrameReference*
Type: IBodyIndexFrameReference
[out] The frame reference.

#### Return value

Type: HRESULT
Returns S\_OK if successful; otherwise, returns a failure code.

Requirements
============

**Header:** kinect.h
**Library:** kinect20.lib


text:
package org.sms.tetris3d.render;

import com.trippleit.android.tetris3d.shapes.Coords;
import javax.microedition.khronos.opengles.GL10;
import org.sms.tetris3d.players.*;
import org.sms.tetris3d.GameStatus;
import android.opengl.GLU;
/**
 * Created by hsh on 2016. 11. 17..
 */

public class NextBlockRenderer extends com.trippleit.android.tetris3d.render.AbstractOpenGlRenderer {
    protected float cx,cy,cz,cr=-0.05f,rad=0;

    /**
     * 다음 모양을 가져와 렌더링을 합니다
     * @param gl
     * @param firstDraw
     */
    @Override
    public void onDrawFrame(GL10 gl, boolean firstDraw) {
        if(!GameStatus.isEnd()&&!GameStatus.isStarting()) {
            final DeviceUser du = (DeviceUser)GameStatus.getPlayers().get(0);

            GLU.gluLookAt(gl, 0, -15, 3, 0, 0, 1, 0, 0, 1);
            //new Coords(GameStatus.getGridSize(), GameStatus.getGameHeight()).draw(gl);
            if (GameStatus.getPlayers().get(0).getNextObject() == null) {
                final int objNum = du.randInt(0, 5);
                du.setNextObject(du.chooseObject(objNum));
            }
final int zSz = du.getNextObject().getZsize();
            gl.glTranslatef(2.5f, -7, 5-zSz/2);
            gl.glPushMatrix();
            gl.glRotatef(rad, 0.0f, 0.0f, 1);
            rad = (rad + 2) % 360;
            printCurrentObject(gl,du);
            gl.glPopMatrix();
        }
    }

    /**
     * 다음 블럭을 모양을 렌더링합니다
     * @param gl
     * @param who
     */
    private void printCurrentObject(GL10 gl,User who){
        gl.glPushMatrix();

        gl.glTranslatef(-(float) GameStatus.getPlayers().get(0).getNextObject().getXsize()/2,
                -(float)GameStatus.getPlayers().get(0).getNextObject().getYsize()/2,0);//GameStatus.getCurrentObjectX(), GameStatus.getCurrentObjectY(), GameStatus.getCurrentObjectZ());

        GameStatus.getPlayers().get(0).getNextObject().draw(gl);

        gl.glPopMatrix();
    }
}


text:
extern crate noise;

use noise::{utils::*, BasicMulti, Perlin, Worley};

mod utils;

fn main() {
    let basicmulti = BasicMulti::<Perlin>::default();

    utils::write_example_to_file(
        &PlaneMapBuilder::<_, 2>::new(basicmulti).build(),
        "basicmulti_perlin.png",
    );

    let basicmulti = BasicMulti::<Worley>::default();

    utils::write_example_to_file(
        &PlaneMapBuilder::<_, 2>::new(basicmulti).build(),
        "basicmulti_worley.png",
    );

    let basicmulti = BasicMulti::<BasicMulti<Perlin>>::default();

    utils::write_example_to_file(
        &PlaneMapBuilder::<_, 2>::new(basicmulti).build(),
        "basicmulti_basicmulti_perlin.png",
    );
}


text:
'''
This script will build a TF-binding matrix from human dnase clusters, enabling you to analyze
any type of gene expression data
'''

__author__='Sara JG Gosline'
__email__='sgosline@mit.edu'

import os
from optparse import OptionParser

if __name__=='__main__':
    parser=OptionParser()
    opts,args=parser.parse_args()

    #garnet requires a configuration file that has all the data
    garnet_out='mcf7_output'
    garnet_conf='mcf7_garnet.cfg' #provided config file
    gcmd='python ../../scripts/garnet.py --outdir=%s %s'%(garnet_out,garnet_conf) #command

    ##now ready to run commands

    print gcmd
    os.system(gcmd)


text:
set -x
set -o pipefail

REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
cd "${REPO_ROOT}" || exit 1
# PULL_NUMBER and PULL_BASE_REF are Prow job environment variables
PR_NUMBER="${PULL_NUMBER:-}"
[[ -z $PR_NUMBER ]] && echo "PR_NUMBER is required" && exit 1
PR_BRANCH="${PULL_BASE_REF:-master}"
CONFIG_ANSIBLE="${CONFIG_ANSIBLE:-"true"}"
RESOURCE_TYPE="${RESOURCE_TYPE:-"gce-project"}"
ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}"
mkdir -p "${ARTIFACTS}/logs"

cleanup() {
  # stop boskos heartbeat
  [[ -z ${HEART_BEAT_PID:-} ]] || kill -9 "${HEART_BEAT_PID}"
}
trap cleanup EXIT

python3 -m pip install requests ansible

# If BOSKOS_HOST is set then acquire a resource of type ${RESOURCE_TYPE} from Boskos.
if [ -n "${BOSKOS_HOST:-}" ]; then
  # Check out the account from Boskos and store the produced environment
  # variables in a temporary file.
  account_env_var_file="$(mktemp)"
  python3 tests/scripts/boskos.py --get --resource-type="${RESOURCE_TYPE}" 1>"${account_env_var_file}"
  checkout_account_status="${?}"

  # If the checkout process was a success then load the account's
  # environment variables into this process.
  # shellcheck disable=SC1090
  [ "${checkout_account_status}" = "0" ] && . "${account_env_var_file}"

  # Always remove the account environment variable file. It contains
  # sensitive information.
  rm -f "${account_env_var_file}"

  if [ ! "${checkout_account_status}" = "0" ]; then
    echo "Failed to get account from boskos, type: ${RESOURCE_TYPE}" 1>&2
    exit "${checkout_account_status}"
  fi

  # run the heart beat process to tell boskos that we are still
  # using the checked out account periodically
  python3 -u tests/scripts/boskos.py --heartbeat >> "${ARTIFACTS}/logs/boskos.log" 2>&1 &
  HEART_BEAT_PID=$!
fi

case "${RESOURCE_TYPE}" in
"gce-project")
    . tests/scripts/create-gce-vm.sh
    ;;
*)
    echo "Unsupported resource type: ${RESOURCE_TYPE}"
    exit 1
    ;;
esac

# Config ansible. If Ansible is installed from pip or from source,
# we need to create the config file manually.
if [[ "$CONFIG_ANSIBLE" == "true" ]]; then
  mkdir -p /etc/ansible
  cat <<EOF > /etc/ansible/ansible.cfg
[defaults]
private_key_file = ~/.ssh/google_compute_engine
host_key_checking = False
timeout = 30
stdout_callback = debug
EOF
fi

# Run ansible playbook on the CI host, e.g. a VM in GCP
# USERNAME and PUBLIC_IP are global env variables set after creating the CI host.
ansible-playbook -v \
  --user ${USERNAME} \
  --private-key ~/.ssh/google_compute_engine \
  --inventory ${PUBLIC_IP}, \
  --ssh-common-args "-o StrictHostKeyChecking=no" \
  tests/playbooks/test-occm-e2e.yaml \
  -e github_pr=${PR_NUMBER} \
  -e github_pr_branch=${PR_BRANCH}
exit_code=$?

# Fetch devstack logs for debugging purpose
#scp -i ~/.ssh/google_compute_engine \
#  -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
#  -r ${USERNAME}@${PUBLIC_IP}:/opt/stack/logs $ARTIFACTS/logs/devstack || true

# Fetch octavia amphora image build logs for debugging purpose
scp -i ~/.ssh/google_compute_engine \
    -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
    -r ${USERNAME}@${PUBLIC_IP}:/var/log/dib-build/amphora-x64-haproxy.qcow2.log $ARTIFACTS/logs/octavia-image-build.log || true

# If Boskos is being used then release the resource back to Boskos.
[ -z "${BOSKOS_HOST:-}" ] || python3 tests/scripts/boskos.py --release >> "$ARTIFACTS/logs/boskos.log" 2>&1

exit ${exit_code}


text:
namespace blink {

static unsigned s_pluginScriptForbiddenCount = 0;

PluginScriptForbiddenScope::PluginScriptForbiddenScope()
{
    ASSERT(isMainThread());
    ++s_pluginScriptForbiddenCount;
}

PluginScriptForbiddenScope::~PluginScriptForbiddenScope()
{
    ASSERT(isMainThread());
    ASSERT(s_pluginScriptForbiddenCount);
    --s_pluginScriptForbiddenCount;
}

bool PluginScriptForbiddenScope::isForbidden()
{
    ASSERT(isMainThread());
    return s_pluginScriptForbiddenCount > 0;
}

} // namespace blink


text:
#pragma once

#include <glm.hpp>
#include <gtc/matrix_transform.hpp>
#include <gtc/type_ptr.hpp>

#include <QtGui\QOpenGLFunctions_3_3_Core>

#include "vertex.h"
#include <string>

#include "genericcamera.h"
#include "shaderprogram.h"
#include "texture.h"
#include "material.h"
#include "uglutilities.h"

typedef QOpenGLFunctions_3_3_Core OpenGLContext;

namespace Shapes
{
	class SceneObject
	{
	public:
		SceneObject(const std::string& name, GLenum renderingMode = GL_TRIANGLES);
		virtual ~SceneObject();

		virtual GLfloat* vertices() = 0;
		virtual GLuint* indices() = 0;

		virtual int getVerticesCount() const = 0;
		virtual int getIndicesCount() const = 0;

		virtual int getVerticesByteSize() const { return getVerticesCount() * sizeof(Utilities::Vertex); }
		virtual int getIndicesByteSize() const { return getIndicesCount() * sizeof(GLuint); }

		virtual glm::vec3 currentPosition() const { return position; };
		virtual void changePosition(const glm::vec3& position)
		{
			this->position = position;
		}

		virtual const glm::vec3& scaleFactor() const { return scale; }
		virtual void scaleShape(float scaleFactor);
		virtual void scaleShape(const glm::vec3& scaleFactor);
		virtual void rotate(const glm::vec3& eulersAngle);

		virtual void loadModel(OpenGLContext* context, GLuint shaderProgramId);

		/*
		 * Load the texture into the OpenGL context
		 * Sets the USE_TEXTURE_UNIFORM uniform on the shader if supported
		 */
		virtual void loadTexture(OpenGLContext* context, GLuint shaderProgramId);

		virtual void loadMaterial(OpenGLContext* context, GLuint shaderProgramId);

		/*
		 * Principal rendering method for the pipeline.
		 * Given the memory offset to draw from indices
		 *
		 * In case of overriding :
		 *   - Should call its glDrawElements (or other)
		 *
		 * Parameters
		 *   - byteOffset : where to look in the buffer
		 *   - context : the opengl context
		 */
		virtual void render(
			int byteOffset,
			OpenGLContext* context,
			GLuint shaderProgramId,
			Camera::GenericCamera* camera)
		{
			camera->applyCamera(shaderProgramId, context);

			loadModel(context, shaderProgramId);
			loadMaterial(context, shaderProgramId);
			loadTexture(context, shaderProgramId);

			context->glDrawElements(renderingMode, getIndicesCount(), GL_UNSIGNED_INT, (void*)byteOffset);
		}

		virtual Shaders::Material getMaterial() const { return material; }
		virtual void changeMaterial(const Shaders::Material material) {
			this->material = material;
		}

		virtual void setDrawAsMesh(bool drawAsMesh);
		virtual bool isDrawnAsMesh() const;

		virtual const std::string& getName() const;
		virtual void changeName(const std::string& name);

		virtual void changeTexture(Textures::Texture* texture);

	protected:
		std::string name;
		GLenum renderingMode;

		bool drawAsMesh;

		Shaders::Material material;
		Textures::Texture* texture = 0;

		glm::vec3 position;
		glm::vec3 scale;
		glm::quat rotation;

		glm::mat4 model;
		glm::mat3 normalMatrix;

		glm::mat4 createModel()
		{
			glm::mat4 model;
			return glm::translate(model, position) * (glm::mat4_cast(rotation) * model) * glm::scale(model, scale);
		}

		glm::mat3 createNormalMatrix()
		{

		}

		virtual void renderMesh(OpenGLContext* context) { context->glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); }

	};
}


text:
<html><head>
<meta name="description" content="exercise on simplification of fractions"/>
<meta name="author" content="annemarie.govindraj">
<meta name="keywords" content="interactive, exercise , mathematics, fraction, canceling, maths, school">
</head>
<body>
<applet code="Fractions.class" width="100%" height="100%">
<param name="archive" value="fractions.jar">
<param name="level" value="2">
<param name="seedofRandom" value="0">
</applet></body>
</html>


text:
div#importCsvSteps{
    background-color: #fff;
    border:1px solid #CCCCCC;
    padding:12px;
}

div#importCsvSteps *{
    font-family:Arial, Tahoma;
    font-size:12px;
    line-height: 14px;
    color: #000;
}

div#importCsvSteps h1{
    font-size: 15px;
}

div#importCsvSteps a{
    text-decoration: underline;
    color: #0066cc;
}

div#importCsvSteps a:hover{
    text-decoration: none;
}

div#importCsvSteps span.require{
    color:#ff0404;
}

div#importCsvSecondStep, div#importCsvThirdStep, span#importCsvBread1, span#importCsvBread2{
    display: none;
}

div#importCsvSteps span.importCsvError{
    color:#ff0404;
}

div#importCsvSteps span.importCsvNoError{
    color: #60BF60;
}

table.importCsvTable{
    background-color: #f4f3f2;
}

table.importCsvTable td{
    background-color: #fff;
}


text:
using namespace std;

class Calendar
{
public:

private;
    int day;
    int month;
    string monthName;
    int year;
};

int main()
{

}


text:
<?php

    namespace JX\CmOta\Helpers;

    use \Flight;

    class Build {

    	private $apiLevel = -1;
        private $channel = '';
        private $model = '';
        private $filename = '';
        private $url = '';
        private $changelogUrl = '';
        private $timestamp = '';
        private $incremental = '';
        private $filePath = '';
        private $buildProp = '';

        /**
         * Constructor of the Build class.
         * Here all the information about the current build will be collected
         * and make them available for the next time.
         * @param type $fileName The current filename of the build
         * @param type $physicalPath The current path where the build lives
         */
    	public function __construct($fileName, $physicalPath) {
    		/*
				$tokens Schema:

                array(
                    1 => [CM VERSION] (ex. 10.1.x, 10.2, 11, etc.)
                    2 => [DATE OF BUILD] (ex. 20140130)
                    3 => [CHANNEL OF THE BUILD] (ex. RC, RC2, NIGHTLY, etc.)
                    4 => [MODEL] (ex. i9100, i9300, etc.)
                )
            */
            preg_match_all( '/cm-([0-9\.]+-)(\d+-)?([a-zA-Z0-9]+-)?([a-zA-Z0-9]+)/', $fileName, $tokens );
            $tokens = $this->removeTrailingDashes( $tokens );

            $this->filePath = $physicalPath . '/' . $fileName;
            $this->buildProp = explode( "\n", file_get_contents('zip://'.$this->filePath.'#system/build.prop') );
            $this->channel = $this->_getChannel( str_replace( range( 0 , 9 ), '', $tokens[3] ) );
            $this->filename = $fileName;
            $this->url = $this->_getUrl( '', Flight::cfg()->get('buildsPath') );
            $this->changelogUrl = $this->_getChangelogUrl();
            $this->timestamp = filemtime( $this->filePath );
            $this->incremental = $this->getBuildPropValue( 'ro.build.version.incremental' );
            $this->apiLevel = $this->getBuildPropValue( 'ro.build.version.sdk' );
            $this->model = $this->getBuildPropValue( 'ro.cm.device' );
    	}

        /**
         * Check if the current build is valid within the current request
         * @param type $params The params dictionary inside the current POST request
         * @return boolean True if valid, False if not.
         */
    	public function isValid($params){
            $ret = false;

            if ( $params['device'] == $this->model ) {
                if ( count($params['channels']) > 0 ) {
                    foreach ( $params['channels'] as $channel ) {
                        var_dump($channel);
                        if ( strtolower($channel) == $this->channel ) $ret = true;
                    }
                }
            }

            return $ret;
        }

        /**
         * Create a delta build based from the current build to the target build.
         * @param type $targetToken The target build from where to build the Delta
         * @return array/boolean Return an array performatted with the correct data inside, otherwise false if not possible to be created
         */
        public function getDelta($targetToken){
            $ret = false;

            $deltaFile = $this->incremental . '-' . $targetToken->incremental . '.zip';
            $deltaFilePath = Flight::cfg()->get('realBasePath') . '/builds/delta/' . $deltaFile;

            if ( $this->commandExists('xdelta3') ) {

                if ( !file_exists( $deltaFilePath ) ) {
                    exec( 'xdelta3 -e -s ' . $this->filePath . ' ' . $targetToken->filePath . ' ' . $deltaFilePath );
                }

                $ret = array(
                    'filename' => $deltaFile,
                    'timestamp' => filemtime( $deltaFilePath ),
                    'md5' => $this->getMD5( $deltaFilePath ),
                    'url' => $this->_getUrl( $deltaFile, Flight::cfg()->get('deltasPath') ),
                    'api_level' => $this->apiLevel,
                    'incremental' => $targetToken->incremental
                );
            }

            return $ret;
        }

        /**
         * Return the MD5 value of the current build
         * @param string $path The path of the file
         * @return string The MD5 hash
         */
        public function getMD5($path = ''){
            $ret = '';

            if ( empty($path) ) $path = $this->filePath;
            // Pretty much faster if it is available
            if ( $this->commandExists( 'md5sum' ) ) {
                $tmp = explode("  ", exec( 'md5sum ' . $path));
                $ret = $tmp[0];
            } else {
                $ret = md5_file($path);
            }

            return $ret;
        }

        /* Getters */

        /**
         * Get the Incremental value of the current build
         * @return string The incremental value
         */
        public function getIncremental() {
        	return $this->incremental;
        }

        /**
         * Get the API Level of the current build.
         * @return string The API Level value
         */
        public function getApiLevel() {
        	return $this->apiLevel;
        }

        /**
         * Get the Url of the current build
         * @return string The Url value
         */
        public function getUrl() {
        	return $this->url;
        }

        /**
         * Get the timestamp of the current build
         * @return string The timestamp value
         */
        public function getTimestamp() {
        	return $this->timestamp;
        }

        /**
         * Get the changelog Url of the current build
         * @return string The changelog Url value
         */
        public function getChangelogUrl() {
        	return $this->changelogUrl;
        }

        /**
         * Get the channel of the current build
         * @return string The channel value
         */
        public function getChannel() {
        	return $this->channel;
        }

        /**
         * Get the filename of the current build
         * @return string The filename value
         */
        public function getFilename() {
        	return $this->filename;
        }

    	/* Utility / Internal */

        /**
         * Remove trailing dashes
         * @param type $token The string where to do the operation
         * @return string The string without trailing dashes
         */
        private function removeTrailingDashes($token){
            foreach ( $token as $key => $value ) {
                $token[$key] = rtrim( $value[0], '-' );
            }
            return $token;
        }

        /**
         * Get the current channel of the build based on the current token
         * @param string $token The channel obtained from build.prop
         * @return string The correct channel to be returned
         */
        private function _getChannel($token){
            $ret = 'stable';

            $token = strtolower( $token );
            if ( $token > '' ) {
                $ret = $token;
                if ( $token == 'experimental' ) $ret = 'snapshot';
            }

            return $ret;
        }

        /**
         * Get the correct URL for the build
         * @param string $fileName The name of the file
         * @return string The absolute URL for the file to be downloaded
         */
        private function _getUrl($fileName = '', $basePath){
            if ( empty($fileName) ) $fileName = $this->filename;
            return $basePath . '/' . $fileName;
        }

        /**
         * Get the changelog URL for the current build
         * @return string The changelog URL
         */
        private function _getChangelogUrl(){
            return str_replace('.zip', '.txt', $this->url);
        }

        /**
         * Get a property value based on the $key value.
         * It does it by searching inside the file build.prop of the current build.
         * @param string $key The key for the wanted value
         * @return string The value for the specified key
         */
        private function getBuildPropValue($key){
            $ret = '';

            foreach ($this->buildProp as $line) {
                if ( strpos($line, $key) !== false ) {
                    $tmp = explode('=', $line);
                    $ret = $tmp[1];
                    break;
                }
            }

            return $ret;
        }

        /**
         * Checks if a command is available on the current server
         * @param string $cmd The current command to execute
         * @return boolean Return True if available, False if not
         */
        private function commandExists($cmd){
            $returnVal = shell_exec("which $cmd");
            return (empty($returnVal) ? false : true);
        }
    }


text:
Demo: https://simple-task-list.firebaseapp.com/

Technology used: JavaScript, HTML5, CSS3


text:
<?php
namespace Brainwave\Workbench\Facades;

use \Brainwave\Workbench\StaticalProxyManager;

/**
 * Response
 *
 * @package Narrowspark/framework
 * @author  Daniel Bannert
 * @since   0.8.0-dev
 *
 */
class Response extends StaticalProxyManager
{
    protected static function getFacadeAccessor()
    {
        return 'response';
    }

    /**
     * Return a new JSON response from the application.
     *
     * @param  string|array  $data
     * @param  int    $status
     * @param  array  $headers
     * @param  int    $options
     * @return \Brainwave\Http\Response
     */
    public static function json($data = [], $status = 200, array $headers = [], $options = 0)
    {
        $app = StaticalProxyManager::getFacadeApp();

        $jsonData = array_merge(
            $data,
            [
                'options' => $options,
                'json.headers' => $headers
            ]
        );

        $app['view']->make('json', $status, $jsonData);
    }
}


text:
<?php namespace App;

use Illuminate\Database\Eloquent\Model;

class PermissionRole extends Model {

	protected $fillable = [];

	protected $table = 'permission_role';

}


text:
cask 'pgadmin4' do
  version '4.6'
  sha256 '02bf09511435dbe695060b0bfc6fb993a1186af0ed55bc05d5a04afae929c9e0'

  # ftp.postgresql.org was verified as official when first introduced to the cask
  url "https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v#{version}/macos/pgadmin4-#{version}.dmg"
  name 'pgAdmin4'
  homepage 'https://www.pgadmin.org/'

  app 'pgAdmin 4.app'

  zap trash: [
               '~/.pgadmin',
               '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.pgadmin.pgadmin4.sfl*',
               '~/Library/Preferences/org.pgadmin.pgadmin4.plist',
               '~/Library/Saved Application State/org.pgadmin.pgAdmin4.savedState',
             ]
end


text:
package org.gradle.composite.internal;

import org.gradle.StartParameter;
import org.gradle.api.InvalidUserDataException;
import org.gradle.api.initialization.IncludedBuild;
import org.gradle.api.internal.SettingsInternal;
import org.gradle.initialization.GradleLauncher;
import org.gradle.initialization.NestedBuildFactory;
import org.gradle.initialization.layout.BuildLayoutFactory;
import org.gradle.internal.Factory;
import org.gradle.internal.reflect.Instantiator;
import org.gradle.internal.work.WorkerLeaseService;

import java.io.File;

public class DefaultIncludedBuildFactory implements IncludedBuildFactory {
    private final Instantiator instantiator;
    private final StartParameter startParameter;
    private final WorkerLeaseService workerLeaseService;
    private final BuildLayoutFactory buildLayoutFactory;

    public DefaultIncludedBuildFactory(Instantiator instantiator, StartParameter startParameter, WorkerLeaseService workerLeaseService, BuildLayoutFactory buildLayoutFactory) {
        this.instantiator = instantiator;
        this.startParameter = startParameter;
        this.workerLeaseService = workerLeaseService;
        this.buildLayoutFactory = buildLayoutFactory;
    }

    private void validateBuildDirectory(File dir) {
        if (!dir.exists()) {
            throw new InvalidUserDataException(String.format("Included build '%s' does not exist.", dir));
        }
        if (!dir.isDirectory()) {
            throw new InvalidUserDataException(String.format("Included build '%s' is not a directory.", dir));
        }
    }

    private void validateIncludedBuild(IncludedBuild includedBuild, SettingsInternal settings) {
        File settingsFile = buildLayoutFactory.findExistingSettingsFileIn(settings.getSettingsDir());
        if (settingsFile == null) {
            throw new InvalidUserDataException(String.format("Included build '%s' must have a settings file.", includedBuild.getName()));
        }
    }

    @Override
    public IncludedBuildInternal createBuild(File buildDirectory, NestedBuildFactory nestedBuildFactory) {
        validateBuildDirectory(buildDirectory);
        Factory<GradleLauncher> factory = new ContextualGradleLauncherFactory(buildDirectory, nestedBuildFactory, startParameter);
        DefaultIncludedBuild includedBuild = instantiator.newInstance(DefaultIncludedBuild.class, buildDirectory, factory, workerLeaseService.getCurrentWorkerLease());

        SettingsInternal settingsInternal = includedBuild.getLoadedSettings();
        validateIncludedBuild(includedBuild, settingsInternal);
        return includedBuild;
    }

    private class ContextualGradleLauncherFactory implements Factory<GradleLauncher> {
        private final File buildDirectory;
        private final NestedBuildFactory nestedBuildFactory;
        private final StartParameter buildStartParam;

        public ContextualGradleLauncherFactory(File buildDirectory, NestedBuildFactory nestedBuildFactory, StartParameter buildStartParam) {
            this.buildDirectory = buildDirectory;
            this.nestedBuildFactory = nestedBuildFactory;
            this.buildStartParam = buildStartParam;
        }

        @Override
        public GradleLauncher create() {
            StartParameter participantStartParam = createStartParameter(buildDirectory);
            GradleLauncher gradleLauncher = nestedBuildFactory.nestedInstance(participantStartParam);
            return gradleLauncher;
        }

        private StartParameter createStartParameter(File buildDirectory) {
            StartParameter includedBuildStartParam = buildStartParam.newBuild();
            includedBuildStartParam.setProjectDir(buildDirectory);
            includedBuildStartParam.setSearchUpwards(false);
            includedBuildStartParam.setConfigureOnDemand(false);
            includedBuildStartParam.setInitScripts(buildStartParam.getInitScripts());
            return includedBuildStartParam;
        }
    }
}


text:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { DynamicComponent } from './dynamic.component';
import { TestComponent } from './test.component';

@NgModule({
  imports: [CommonModule],
  declarations: [DynamicComponent, TestComponent],
  entryComponents: [DynamicComponent]
})
export class TestModule { }


text:
This directory contains scripts that are related to CI only.

### `build-and-test.sh`

The main script. Setup the tests environment, build the files using the `angular-cli` tool and run the tests.


text:
import React from "react";

export default function actionHelper(
  name,
  Comp,
  message = "",
  props = {},
  inputs = [],
) {
  const Component = ({value = {}, updateValue = () => {}}) => {
    return (
      <div
        style={{display: "flex", flexDirection: "column"}}
        onMouseDown={e => e.stopPropagation()}
      >
        <Comp
          updateArgs={(key, val) => updateValue({...value, [key]: val})}
          args={value}
          {...props}
        />
        <small>{message}</small>
      </div>
    );
  };
  return {
    name,
    hiddenInLibrary: true,
    category: "Actions",
    component: Component,
    outputs: [],
    inputs: [
      {
        id: "trigger",
        color: "orange",
        title: "Triggers the action",
        type: "Trigger",
      },
      ...inputs,
    ],
    config: [
      {
        id: "delay",
        title: "Delay",
        props: {
          type: "number",
          placeholder: "Delay in milliseconds",
        },
      },
    ],
  };
}


text:
/*
 * File:   nodes.c
 * Author: Ben Brooks (beb12@aber.ac.uk)
 */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "runners.h"
#include "event_data.h"

static node *head = NULL;
static node *curr = NULL;

node the_node;

static node* create_list(int node_number, char node_type[NODE_TYPE_LENGTH]) {
    node *ptr = (node*)malloc(sizeof(node));
    if (NULL == ptr) {
        return NULL;
    }

    strcpy(ptr->node_type, node_type);
    ptr->node_number = node_number;
    ptr->next_node   = NULL;

    curr = ptr;
    head = ptr;
    return ptr;

}

static node* add_to_list(int node_number, char node_type[NODE_TYPE_LENGTH]) {
    if (NULL == head) {
        return (create_list(node_number, node_type));
    }

    node *ptr = (node*)malloc(sizeof(node));
    if (NULL == ptr) {
        return NULL;
    }

    strcpy(ptr->node_type, node_type);
    ptr->node_number = node_number;
    ptr->next_node   = NULL;

    curr->next_node  = ptr;
    curr = ptr;
    return ptr;
}

/*
 * Debug function to print checkpoints
 */
void print_node_list(void) {
    node *ptr = head;
    while (ptr != NULL) {
        printf("Node: %d Type: %s\n", ptr->node_number, ptr->node_type);
        ptr = ptr->next_node;
    }
    return;
}

/*
 * Read node file data and adds to linked list
 */
void read_node_file(char filename[FILE_LENGTH]) {
    FILE *file;
    file = fopen(filename, "r");
    if (!file) {
        fprintf(stderr, "Can't open the file \"%s\"! (Does it exist?)\n", filename);
    } else {
        node tmp_node;
        while (fscanf(file, "%d %s\n", &tmp_node.node_number, tmp_node.node_type) != EOF) {
            add_to_list(tmp_node.node_number, tmp_node.node_type);
        }
    }
}


text:
package marubinotto.piggydb.model.fragments.relation;

import static marubinotto.util.CollectionUtils.list;
import static org.junit.Assert.assertEquals;

import java.util.ArrayList;

import marubinotto.piggydb.model.Fragment;
import marubinotto.piggydb.model.FragmentRepository;
import marubinotto.piggydb.model.fragments.FragmentRepositoryTestBase;

import org.junit.Before;
import org.junit.Test;

public class ChildRelationPriorityTest extends FragmentRepositoryTestBase {

	private Long parentId;

	private Long relation1;
	private Long relation2;
	private Long relation3;

	public ChildRelationPriorityTest(RepositoryFactory<FragmentRepository> factory) {
		super(factory);
	}

	@Before
	public void given() throws Exception {
		super.given();

		this.parentId = this.object.register(newFragment());
		Long child1Id = this.object.register(newFragment());
		Long child2Id = this.object.register(newFragment());
		Long child3Id = this.object.register(newFragment());

		this.relation1 = this.object.createRelation(this.parentId, child1Id, getPlainUser());
		this.relation2 = this.object.createRelation(this.parentId, child2Id, getPlainUser());
		this.relation3 = this.object.createRelation(this.parentId, child3Id, getPlainUser());
	}

	@Test
	public void defaultPriorities() throws Exception {
		assertEquals(0, this.object.getRelation(this.relation1).priority.intValue());
		assertEquals(0, this.object.getRelation(this.relation2).priority.intValue());
		assertEquals(0, this.object.getRelation(this.relation3).priority.intValue());
	}

	@Test
	public void updateChildRelationPriorities() throws Exception {
		Fragment parent = this.object.get(this.parentId);
		this.object.updateChildRelationPriorities(parent, list(this.relation1, this.relation3), getPlainUser());

		assertEquals(2, this.object.getRelation(this.relation1).priority.intValue());
		assertEquals(0, this.object.getRelation(this.relation2).priority.intValue());
		assertEquals(1, this.object.getRelation(this.relation3).priority.intValue());
	}

	@Test
	public void emptyOrder() throws Exception {
		Fragment parent = this.object.get(this.parentId);
		this.object.updateChildRelationPriorities(parent, new ArrayList<Long>(), getPlainUser());

		assertEquals(0, this.object.getRelation(this.relation1).priority.intValue());
		assertEquals(0, this.object.getRelation(this.relation2).priority.intValue());
		assertEquals(0, this.object.getRelation(this.relation3).priority.intValue());
	}
}


text:
.class Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;
.super Ljava/lang/Object;
.source "CalendarView.java"

# interfaces
.implements Ljava/lang/Runnable;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/widget/CalendarView$LegacyCalendarViewDelegate;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ScrollStateRunnable"
.end annotation

# instance fields
.field private mNewState:I

.field private mView:Landroid/widget/AbsListView;

.field final synthetic this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

# direct methods
.method private constructor <init>(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;)V
    .locals 0

    .prologue
    .line 1564
    iput-object p1, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;Landroid/widget/CalendarView$1;)V
    .locals 0
    .param p1, "x0"    # Landroid/widget/CalendarView$LegacyCalendarViewDelegate;
    .param p2, "x1"    # Landroid/widget/CalendarView$1;

    .prologue
    .line 1564
    invoke-direct {p0, p1}, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;-><init>(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;)V

    return-void
.end method

# virtual methods
.method public doScrollStateChange(Landroid/widget/AbsListView;I)V
    .locals 4
    .param p1, "view"    # Landroid/widget/AbsListView;
    .param p2, "scrollState"    # I

    .prologue
    .line 1577
    iput-object p1, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mView:Landroid/widget/AbsListView;

    .line 1578
    iput p2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mNewState:I

    .line 1579
    iget-object v0, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    iget-object v0, v0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mDelegator:Landroid/widget/CalendarView;

    invoke-virtual {v0, p0}, Landroid/widget/CalendarView;->removeCallbacks(Ljava/lang/Runnable;)Z

    .line 1580
    iget-object v0, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    iget-object v0, v0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mDelegator:Landroid/widget/CalendarView;

    const-wide/16 v2, 0x28

    invoke-virtual {v0, p0, v2, v3}, Landroid/widget/CalendarView;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 1581
    return-void
.end method

.method public run()V
    .locals 5

    .prologue
    const/16 v4, 0x1f4

    .line 1584
    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    iget v3, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mNewState:I

    # setter for: Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mCurrentScrollState:I
    invoke-static {v2, v3}, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->access$1102(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;I)I

    .line 1586
    iget v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mNewState:I

    if-nez v2, :cond_1

    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    # getter for: Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mPreviousScrollState:I
    invoke-static {v2}, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->access$1200(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;)I

    move-result v2

    if-eqz v2, :cond_1

    .line 1588
    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mView:Landroid/widget/AbsListView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/AbsListView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 1589
    .local v0, "child":Landroid/view/View;
    if-nez v0, :cond_0

    .line 1604
    .end local v0    # "child":Landroid/view/View;
    :goto_0
    return-void

    .line 1593
    .restart local v0    # "child":Landroid/view/View;
    :cond_0
    invoke-virtual {v0}, Landroid/view/View;->getBottom()I

    move-result v2

    iget-object v3, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    # getter for: Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mListScrollTopOffset:I
    invoke-static {v3}, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->access$1300(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;)I

    move-result v3

    sub-int v1, v2, v3

    .line 1594
    .local v1, "dist":I
    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    # getter for: Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mListScrollTopOffset:I
    invoke-static {v2}, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->access$1300(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;)I

    move-result v2

    if-le v1, v2, :cond_1

    .line 1595
    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    # getter for: Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mIsScrollingUp:Z
    invoke-static {v2}, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->access$1400(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 1596
    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mView:Landroid/widget/AbsListView;

    invoke-virtual {v0}, Landroid/view/View;->getHeight()I

    move-result v3

    sub-int v3, v1, v3

    invoke-virtual {v2, v3, v4}, Landroid/widget/AbsListView;->smoothScrollBy(II)V

    .line 1603
    .end local v0    # "child":Landroid/view/View;
    .end local v1    # "dist":I
    :cond_1
    :goto_1
    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->this$0:Landroid/widget/CalendarView$LegacyCalendarViewDelegate;

    iget v3, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mNewState:I

    # setter for: Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->mPreviousScrollState:I
    invoke-static {v2, v3}, Landroid/widget/CalendarView$LegacyCalendarViewDelegate;->access$1202(Landroid/widget/CalendarView$LegacyCalendarViewDelegate;I)I

    goto :goto_0

    .line 1599
    .restart local v0    # "child":Landroid/view/View;
    .restart local v1    # "dist":I
    :cond_2
    iget-object v2, p0, Landroid/widget/CalendarView$LegacyCalendarViewDelegate$ScrollStateRunnable;->mView:Landroid/widget/AbsListView;

    invoke-virtual {v2, v1, v4}, Landroid/widget/AbsListView;->smoothScrollBy(II)V

    goto :goto_1
.end method


text:
/*
 * menshend-api
 *
 * The API for the Menshend Project
 *
 * OpenAPI spec version: 1.0.0
 *
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package swagger

import (
	"net/url"
	"strings"
	"encoding/json"
	"fmt"
)

type SecretsApi struct {
	Configuration *Configuration
}

func NewSecretsApi() *SecretsApi {
	configuration := NewConfiguration()
	return &SecretsApi{
		Configuration: configuration,
	}
}

func NewSecretsApiWithBasePath(basePath string) *SecretsApi {
	configuration := NewConfiguration()
	configuration.BasePath = basePath

	return &SecretsApi{
		Configuration: configuration,
	}
}

/**
 *
 * return secret associate with a service
 *
 * @param id secret path
 * @return *Secret
 */
func (a SecretsApi) ReadSecret(id string) (*Secret, *APIResponse, error) {

	var localVarHttpMethod = strings.ToUpper("Get")
	// create path and map variables
	localVarPath := a.Configuration.BasePath + "/v1/secret/{id}"
	localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1)

	localVarHeaderParams := make(map[string]string)
	localVarQueryParams := url.Values{}
	localVarFormParams := make(map[string]string)
	var localVarPostBody interface{}
	var localVarFileName string
	var localVarFileBytes []byte
	// add default headers if any
	for key := range a.Configuration.DefaultHeader {
		localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
	}

	// to determine the Content-Type header
	localVarHttpContentTypes := []string{ "application/json",  }

	// set Content-Type header
	localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
	if localVarHttpContentType != "" {
		localVarHeaderParams["Content-Type"] = localVarHttpContentType
	}
	// to determine the Accept header
	localVarHttpHeaderAccepts := []string{
		"application/json",
		}

	// set Accept header
	localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
	if localVarHttpHeaderAccept != "" {
		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
	}
	var successPayload = new(Secret)
	localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)

	var localVarURL, _ = url.Parse(localVarPath)
	localVarURL.RawQuery = localVarQueryParams.Encode()
	var localVarAPIResponse = &APIResponse{Operation: "ReadSecret", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
	if localVarHttpResponse != nil {
		localVarAPIResponse.Response = localVarHttpResponse.RawResponse
		localVarAPIResponse.Payload = localVarHttpResponse.Body()
	}

	if err != nil {
		return successPayload, localVarAPIResponse, err
	}
	err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
	return successPayload, localVarAPIResponse, err
}


text:
package test.suites.github1533;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.testng.ISuite;
import org.testng.ISuiteListener;
import org.testng.collections.Lists;

public class SuiteCounter implements ISuiteListener {
  private final AtomicInteger counter = new AtomicInteger(0);
  private final List<String> suiteNames = Lists.newArrayList();

  @Override
  public void onStart(ISuite suite) {
    counter.incrementAndGet();
    suiteNames.add(suite.getName());
  }

  @Override
  public void onFinish(ISuite suite) {}

  public int getCounter() {
    return counter.get();
  }

  public List<String> getSuiteNames() {
    return suiteNames;
  }
}


text:
#ifndef _MSWSOCK_
#define _MSWSOCK_

#if _MSC_VER > 1000
#pragma once
#endif

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Options for connect and disconnect data and options.  Used only by
 * non-TCP/IP transports such as DECNet, OSI TP4, etc.
 */
#define SO_CONNDATA                 0x7000
#define SO_CONNOPT                  0x7001
#define SO_DISCDATA                 0x7002
#define SO_DISCOPT                  0x7003
#define SO_CONNDATALEN              0x7004
#define SO_CONNOPTLEN               0x7005
#define SO_DISCDATALEN              0x7006
#define SO_DISCOPTLEN               0x7007

/*
 * Option for opening sockets for synchronous access.
 */
#define SO_OPENTYPE                 0x7008

#define SO_SYNCHRONOUS_ALERT        0x10
#define SO_SYNCHRONOUS_NONALERT     0x20

/*
 * Other NT-specific options.
 */
#define SO_MAXDG                    0x7009
#define SO_MAXPATHDG                0x700A
#define SO_UPDATE_ACCEPT_CONTEXT    0x700B
#define SO_CONNECT_TIME             0x700C
#define SO_UPDATE_CONNECT_CONTEXT   0x7010

/*
 * TCP options.
 */
#define TCP_BSDURGENT               0x7000

/*
 * MS Transport Provider IOCTL to control
 * reporting PORT_UNREACHABLE messages
 * on UDP sockets via recv/WSARecv/etc.
 * Path TRUE in input buffer to enable (default if supported),
 * FALSE to disable.
 */
#define SIO_UDP_CONNRESET           _WSAIOW(IOC_VENDOR,12)

/*
 * Microsoft extended APIs.
 */
int
PASCAL FAR
WSARecvEx (
    SOCKET s,
    char FAR *buf,
    int len,
    int FAR *flags
    );

typedef struct _TRANSMIT_FILE_BUFFERS {
    LPVOID Head;
    DWORD HeadLength;
    LPVOID Tail;
    DWORD TailLength;
} TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, FAR *LPTRANSMIT_FILE_BUFFERS;

#define TF_DISCONNECT       0x01
#define TF_REUSE_SOCKET     0x02
#define TF_WRITE_BEHIND     0x04
#define TF_USE_DEFAULT_WORKER 0x00
#define TF_USE_SYSTEM_THREAD  0x10
#define TF_USE_KERNEL_APC     0x20

BOOL
PASCAL FAR
TransmitFile (
    IN SOCKET hSocket,
    IN HANDLE hFile,
    IN DWORD nNumberOfBytesToWrite,
    IN DWORD nNumberOfBytesPerSend,
    IN LPOVERLAPPED lpOverlapped,
    IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
    IN DWORD dwReserved
    );

BOOL
PASCAL FAR
AcceptEx (
    IN SOCKET sListenSocket,
    IN SOCKET sAcceptSocket,
    IN PVOID lpOutputBuffer,
    IN DWORD dwReceiveDataLength,
    IN DWORD dwLocalAddressLength,
    IN DWORD dwRemoteAddressLength,
    OUT LPDWORD lpdwBytesReceived,
    IN LPOVERLAPPED lpOverlapped
    );

VOID
PASCAL FAR
GetAcceptExSockaddrs (
    IN PVOID lpOutputBuffer,
    IN DWORD dwReceiveDataLength,
    IN DWORD dwLocalAddressLength,
    IN DWORD dwRemoteAddressLength,
    OUT struct sockaddr **LocalSockaddr,
    OUT LPINT LocalSockaddrLength,
    OUT struct sockaddr **RemoteSockaddr,
    OUT LPINT RemoteSockaddrLength
    );

/*
 * "QueryInterface" versions of the above APIs.
 */

typedef
BOOL
(PASCAL FAR * LPFN_TRANSMITFILE)(
    IN SOCKET hSocket,
    IN HANDLE hFile,
    IN DWORD nNumberOfBytesToWrite,
    IN DWORD nNumberOfBytesPerSend,
    IN LPOVERLAPPED lpOverlapped,
    IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
    IN DWORD dwReserved
    );

#define WSAID_TRANSMITFILE \
        {0xb5367df0,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}

typedef
BOOL
(PASCAL FAR * LPFN_ACCEPTEX)(
    IN SOCKET sListenSocket,
    IN SOCKET sAcceptSocket,
    IN PVOID lpOutputBuffer,
    IN DWORD dwReceiveDataLength,
    IN DWORD dwLocalAddressLength,
    IN DWORD dwRemoteAddressLength,
    OUT LPDWORD lpdwBytesReceived,
    IN LPOVERLAPPED lpOverlapped
    );

#define WSAID_ACCEPTEX \
        {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}

typedef
VOID
(PASCAL FAR * LPFN_GETACCEPTEXSOCKADDRS)(
    IN PVOID lpOutputBuffer,
    IN DWORD dwReceiveDataLength,
    IN DWORD dwLocalAddressLength,
    IN DWORD dwRemoteAddressLength,
    OUT struct sockaddr **LocalSockaddr,
    OUT LPINT LocalSockaddrLength,
    OUT struct sockaddr **RemoteSockaddr,
    OUT LPINT RemoteSockaddrLength
    );

#define WSAID_GETACCEPTEXSOCKADDRS \
        {0xb5367df2,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}

#if _MSC_VER >= 1200
#pragma warning(push)
#endif
#pragma warning(disable:4201) /* Nonstandard extension, nameless struct/union */

typedef struct _TRANSMIT_PACKETS_ELEMENT {
    ULONG dwElFlags;
#define TP_ELEMENT_MEMORY   1
#define TP_ELEMENT_FILE     2
#define TP_ELEMENT_EOP      4
    ULONG cLength;
    union {
        struct {
            LARGE_INTEGER nFileOffset;
            HANDLE        hFile;
        };
        PVOID             pBuffer;
    };
} TRANSMIT_PACKETS_ELEMENT, *PTRANSMIT_PACKETS_ELEMENT, FAR *LPTRANSMIT_PACKETS_ELEMENT;

#if _MSC_VER >= 1200
#pragma warning(pop)
#else
#pragma warning(default:4201)
#endif
#define TP_DISCONNECT           TF_DISCONNECT
#define TP_REUSE_SOCKET         TF_REUSE_SOCKET
#define TP_USE_DEFAULT_WORKER   TF_USE_DEFAULT_WORKER
#define TP_USE_SYSTEM_THREAD    TF_USE_SYSTEM_THREAD
#define TP_USE_KERNEL_APC       TF_USE_KERNEL_APC

typedef
BOOL
(PASCAL FAR * LPFN_TRANSMITPACKETS) (
    SOCKET hSocket,
    LPTRANSMIT_PACKETS_ELEMENT lpPacketArray,
    DWORD nElementCount,
    DWORD nSendSize,
    LPOVERLAPPED lpOverlapped,
    DWORD dwFlags
    );

#define WSAID_TRANSMITPACKETS \
    {0xd9689da0,0x1f90,0x11d3,{0x99,0x71,0x00,0xc0,0x4f,0x68,0xc8,0x76}}

typedef
BOOL
(PASCAL FAR * LPFN_CONNECTEX) (
    IN SOCKET s,
    IN const struct sockaddr FAR *name,
    IN int namelen,
    IN PVOID lpSendBuffer OPTIONAL,
    IN DWORD dwSendDataLength,
    OUT LPDWORD lpdwBytesSent,
    IN LPOVERLAPPED lpOverlapped
    );

#define WSAID_CONNECTEX \
    {0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}}

typedef
BOOL
(PASCAL FAR * LPFN_DISCONNECTEX) (
    IN SOCKET s,
    IN LPOVERLAPPED lpOverlapped,
    IN DWORD  dwFlags,
    IN DWORD  dwReserved
    );

#define WSAID_DISCONNECTEX \
    {0x7fda2e11,0x8630,0x436f,{0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}

#define DE_REUSE_SOCKET TF_REUSE_SOCKET

/*
 * Network-location awareness -- Name registration values for use
 * with WSASetService and other structures.
 */

// {6642243A-3BA8-4aa6-BAA5-2E0BD71FDD83}
#define NLA_NAMESPACE_GUID \
    {0x6642243a,0x3ba8,0x4aa6,{0xba,0xa5,0x2e,0xb,0xd7,0x1f,0xdd,0x83}}

// {6642243A-3BA8-4aa6-BAA5-2E0BD71FDD83}
#define NLA_SERVICE_CLASS_GUID \
    {0x37e515,0xb5c9,0x4a43,{0xba,0xda,0x8b,0x48,0xa8,0x7a,0xd2,0x39}}

#define NLA_ALLUSERS_NETWORK   0x00000001
#define NLA_FRIENDLY_NAME      0x00000002

typedef enum _NLA_BLOB_DATA_TYPE {
    NLA_RAW_DATA          = 0,
    NLA_INTERFACE         = 1,
    NLA_802_1X_LOCATION   = 2,
    NLA_CONNECTIVITY      = 3,
    NLA_ICS               = 4,
} NLA_BLOB_DATA_TYPE, *PNLA_BLOB_DATA_TYPE;

typedef enum _NLA_CONNECTIVITY_TYPE {
    NLA_NETWORK_AD_HOC    = 0,
    NLA_NETWORK_MANAGED   = 1,
    NLA_NETWORK_UNMANAGED = 2,
    NLA_NETWORK_UNKNOWN   = 3,
} NLA_CONNECTIVITY_TYPE, *PNLA_CONNECTIVITY_TYPE;

typedef enum _NLA_INTERNET {
    NLA_INTERNET_UNKNOWN  = 0,
    NLA_INTERNET_NO       = 1,
    NLA_INTERNET_YES      = 2,
} NLA_INTERNET, *PNLA_INTERNET;

typedef struct _NLA_BLOB {

    struct {
        NLA_BLOB_DATA_TYPE type;
        DWORD dwSize;
        DWORD nextOffset;
    } header;

    union {

        // header.type -> NLA_RAW_DATA
        CHAR rawData[1];

        // header.type -> NLA_INTERFACE
        struct {
            DWORD dwType;
            DWORD dwSpeed;
            CHAR adapterName[1];
        } interfaceData;

        // header.type -> NLA_802_1X_LOCATION
        struct {
            CHAR information[1];
        } locationData;

        // header.type -> NLA_CONNECTIVITY
        struct {
            NLA_CONNECTIVITY_TYPE type;
            NLA_INTERNET internet;
        } connectivity;

        // header.type -> NLA_ICS
        struct {
            struct {
                DWORD speed;
                DWORD type;
                DWORD state;
                WCHAR machineName[256];
                WCHAR sharedAdapterName[256];
            } remote;
        } ICS;

    } data;

} NLA_BLOB, *PNLA_BLOB, * FAR LPNLA_BLOB;

typedef struct _WSAMSG {
    LPSOCKADDR       name;              /* Remote address */
    INT              namelen;           /* Remote address length */
    LPWSABUF         lpBuffers;         /* Data buffer array */
    DWORD            dwBufferCount;     /* Number of elements in the array */
    WSABUF           Control;           /* Control buffer */
    DWORD            dwFlags;           /* Flags */
} WSAMSG, *PWSAMSG, * FAR LPWSAMSG;

/*
 * Layout of ancillary data objects in the control buffer
 */
typedef struct _WSACMSGHDR {
    SIZE_T      cmsg_len;
    INT         cmsg_level;
    INT         cmsg_type;
    /* followed by UCHAR cmsg_data[] */
} WSACMSGHDR, *PWSACMSGHDR, FAR *LPWSACMSGHDR;

/*
 * Alignment macros for header and data members of
 * the control buffer.
 */
#define WSA_CMSGHDR_ALIGN(length)                           \
            ( ((length) + TYPE_ALIGNMENT(WSACMSGHDR)-1) &   \
                (~(TYPE_ALIGNMENT(WSACMSGHDR)-1)) )         \

#define WSA_CMSGDATA_ALIGN(length)                          \
            ( ((length) + MAX_NATURAL_ALIGNMENT-1) &        \
                (~(MAX_NATURAL_ALIGNMENT-1)) )

/*
 *  WSA_CMSG_FIRSTHDR
 *
 *  Returns a pointer to the first ancillary data object,
 *  or a null pointer if there is no ancillary data in the
 *  control buffer of the WSAMSG structure.
 *
 *  LPCMSGHDR
 *  WSA_CMSG_FIRSTHDR (
 *      LPWSAMSG    msg
 *      );
 */
#define WSA_CMSG_FIRSTHDR(msg) \
    ( ((msg)->Control.len >= sizeof(WSACMSGHDR))            \
        ? (LPWSACMSGHDR)(msg)->Control.buf                  \
        : (LPWSACMSGHDR)NULL )

/*
 *  WSA_CMSG_NXTHDR
 *
 *  Returns a pointer to the next ancillary data object,
 *  or a null if there are no more data objects.
 *
 *  LPCMSGHDR
 *  WSA_CMSG_NEXTHDR (
 *      LPWSAMSG        msg,
 *      LPWSACMSGHDR    cmsg
 *      );
 */
#define WSA_CMSG_NXTHDR(msg, cmsg)                          \
    ( ((cmsg) == NULL)                                      \
        ? WSA_CMSG_FIRSTHDR(msg)                            \
        : ( ( ((u_char *)(cmsg) +                           \
                    WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len) +   \
                    sizeof(WSACMSGHDR) ) >                  \
                (u_char *)((msg)->Control.buf) +            \
                    (msg)->Control.len )                    \
            ? (LPWSACMSGHDR)NULL                            \
            : (LPWSACMSGHDR)((u_char *)(cmsg) +             \
                WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len)) ) )

/*
 *  WSA_CMSG_DATA
 *
 *  Returns a pointer to the first byte of data (what is referred
 *  to as the cmsg_data member though it is not defined in
 *  the structure).
 *
 *  u_char *
 *  WSA_CMSG_DATA (
 *      LPWSACMSGHDR   pcmsg
 *      );
 */
#define WSA_CMSG_DATA(cmsg)             \
            ( (u_char *)(cmsg) + WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) )

/*
 *  WSA_CMSG_SPACE
 *
 *  Returns total size of an ancillary data object given
 *  the amount of data. Used to allocate the correct amount
 *  of space.
 *
 *  SIZE_T
 *  WSA_CMSG_SPACE (
 *      SIZE_T length
 *      );
 */
#define WSA_CMSG_SPACE(length)  \
        (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR) + WSA_CMSGHDR_ALIGN(length)))

/*
 *  WSA_CMSG_LEN
 *
 *  Returns the value to store in cmsg_len given the amount of data.
 *
 *  SIZE_T
 *  WSA_CMSG_LEN (
 *      SIZE_T length
 *  );
 */
#define WSA_CMSG_LEN(length)    \
         (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) + length)

/*
 * Definition for flags member of the WSAMSG structure
 * This is in addition to other MSG_xxx flags defined
 * for recv/recvfrom/send/sendto.
 */
#define MSG_TRUNC       0x0100
#define MSG_CTRUNC      0x0200
#define MSG_BCAST       0x0400
#define MSG_MCAST       0x0800

typedef
INT
(PASCAL FAR * LPFN_WSARECVMSG) (
    IN SOCKET s,
    IN OUT LPWSAMSG lpMsg,
    OUT LPDWORD lpdwNumberOfBytesRecvd,
    IN LPWSAOVERLAPPED lpOverlapped,
    IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
    );

#define WSAID_WSARECVMSG \
    {0xf689d7c8,0x6f1f,0x436b,{0x8a,0x53,0xe5,0x4f,0xe3,0x51,0xc3,0x22}}

#ifdef __cplusplus
}
#endif

#endif  /* _MSWSOCK_ */


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/maven-v4_0_0.xsd">

  <!-- POM file generated with GWT webAppCreator -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.jcommerce</groupId>
  <artifactId>jcommerce-jboss-core</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>jcommerce jboss core</name>

	<properties>
		<spring.version>3.2.3.RELEASE</spring.version>
		<version.hibernate>4.2.0.Final</version.hibernate>

		<version.compiler.plugin>2.3.1</version.compiler.plugin>
		<maven.compiler.target>1.6</maven.compiler.target>
		<maven.compiler.source>1.6</maven.compiler.source>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.jcommerce</groupId>
			<artifactId>jcommerce-spring-core</artifactId>
			<version>1.0</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<version>${version.hibernate}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${version.hibernate}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
            <version>${spring.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
			<version>${spring.version}</version>
			<exclusions>
				<exclusion>
					<groupId>quartz</groupId>
					<artifactId>quartz</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.10</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
      		<artifactId>junit</artifactId>
     		<version>4.8.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
		<plugin>
        <artifactId>maven-compiler-plugin</artifactId>
          <version>${version.compiler.plugin}</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>
		</plugins>
	</build>
</project>


text:
import React, { Component } from 'react'

class Speaker extends Component {
  render () {
    let img = (this.props.is_muted) ? 'vol_off.png': 'vol_on.png';
    let src = '/resources/images/'+img;

    return (
      <img
        id="speaker"
        src={src}
        onClick={this.props.handle}
      />
    )
  }
}

Speaker.propTypes = {
  handle: React.PropTypes.func.isRequired,
  is_muted: React.PropTypes.bool.isRequired
}

export default Speaker


text:
package stream

import (
	"bytes"
	"io"
	"testing"
	"time"
)

func TestBasicReadWrite(t *testing.T) {
	send := []byte("hello world")
	c := make(chan *StreamChunk)
	writer := NewChanWriter(c)
	reader := NewChanReader(c)
	go writer.Write(send)
	buf := make([]byte, len(send))
	n, err := reader.Read(buf)
	if n != len(send) {
		t.Fatalf("Read wrong number of bytes: %d expected %d", n, len(send))
	}
	if err != nil {
		t.Fatal("Couldn't read from stream", err)
	}
	if !bytes.Equal(buf, send) {
		t.Fatal("Got wrong message from stream", string(buf))
	}
	writer.Close()
	n, err = reader.Read(buf)
	if err != io.EOF {
		t.Fatal("Read returned wrong error after close:", err)
	}
	if n != 0 {
		t.Fatalf("Read still returned data after close: %d bytes", n)
	}
}

func TestReadMoreThanWrite(t *testing.T) {
	send := []byte("hello world")
	c := make(chan *StreamChunk)
	writer := NewChanWriter(c)
	reader := NewChanReader(c)
	go writer.Write(send)
	buf := make([]byte, len(send)+10)
	n, err := reader.Read(buf)
	if err != nil {
		t.Fatal("Couldn't read from stream", err)
	}
	if n != len(send) {
		t.Fatalf("Read wrong number of bytes: %d expected %d", n, len(send))
	}
	if !bytes.Equal(buf[:n], send) {
		t.Fatal("Got wrong message from stream", string(buf[:n]))
	}
	writer.Close()
	n, err = reader.Read(buf)
	if err != io.EOF {
		t.Fatal("Read returned wrong error after close:", err)
	}
	if n != 0 {
		t.Fatalf("Read still returned data after close: %d bytes", n)
	}
}

func TestReadLessThanWrite(t *testing.T) {
	send := []byte("hello world")
	c := make(chan *StreamChunk)
	writer := NewChanWriter(c)
	reader := NewChanReader(c)
	go writer.Write(send)
	buf := make([]byte, 6)
	n, err := reader.Read(buf)
	if err != nil {
		t.Fatal("Couldn't read from stream", err)
	}
	if n != len(buf) {
		t.Fatalf("Read wrong number of bytes: %d expected %d", n, len(buf))
	}
	if !bytes.Equal(buf, send[:len(buf)]) {
		t.Fatal("Got wrong message from stream", string(buf))
	}
	writer.Close()
	n, err = reader.Read(buf)
	if err != nil {
		t.Fatal("Couldn't read from stream", err)
	}
	if n != len(send)-len(buf) {
		t.Fatalf("Read wrong number of bytes: %d expected %d", n, len(send)-len(buf))
	}
	if !bytes.Equal(buf[:n], send[len(buf):]) {
		t.Fatal("Got wrong message from stream", string(buf[:n]))
	}
	n, err = reader.Read(buf)
	if err != io.EOF {
		t.Fatal("Read returned wrong error after close:", err)
	}
	if n != 0 {
		t.Fatalf("Read still returned data after close: %d bytes", n)
	}
}

func TestMultiReadWrite(t *testing.T) {
	send := []byte("hello world, this message is longer")
	c := make(chan *StreamChunk)
	writer := NewChanWriter(c)
	reader := NewChanReader(c)
	go func() {
		writer.Write(send[:9])
		writer.Write(send[9:19])
		writer.Write(send[19:])
		writer.Close()
	}()
	buf := make([]byte, 10)
	for read := 0; read < len(send); {
		n, err := reader.Read(buf)
		if err != nil {
			t.Fatal("Couldn't read from stream", err, n)
		}
		if !bytes.Equal(buf[:n], send[read:read+n]) {
			t.Fatal("Got wrong message from stream", string(buf))
		}
		read += n
	}
	n, err := reader.Read(buf)
	if err != io.EOF {
		t.Fatal("Read returned wrong error after close:", err, string(buf[:n]))
	}
	if !bytes.Equal(buf[:n], send[len(send)-n:]) {
		t.Fatal("Got wrong message from stream", string(buf[:n]))
	}
}

func TestMultiWriteWithCopy(t *testing.T) {
	send := []byte("hello world, this message is longer")
	c := make(chan *StreamChunk)
	writer := NewChanWriter(c)
	reader := NewChanReader(c)
	go func() {
		writer.Write(send[:9])
		writer.Write(send[9:19])
		writer.Write(send[19:])
		writer.Close()
	}()
	buf := new(bytes.Buffer)
	n, err := io.Copy(buf, reader)
	if int(n) != len(send) {
		t.Fatalf("Read wrong number of bytes: %d expected %d", n, len(send))
	}
	if err != nil {
		t.Fatal("Couldn't read from stream", err)
	}
	if !bytes.Equal(buf.Bytes(), send) {
		t.Fatal("Got wrong message from stream", buf.String())
	}
}

func TestStream_ReadCorrectness(t *testing.T) {
	sendMsg := []byte("hello world")
	c := make(chan *StreamChunk)
	interrupt := make(chan struct{})
	writer := NewChanWriter(c)
	reader := NewChanReader(c)
	reader.SetInterrupt(interrupt)

	go writer.Write(sendMsg)
	readMsg := make([]byte, len(sendMsg))
	n, err := reader.Read(readMsg)
	if err != nil {
		t.Fatalf("Couldn't read from stream: %v", err)
	}

	if n != len(sendMsg) {
		t.Fatalf("Read wrong number of bytes: %d expected %d", n, len(sendMsg))
	}

	if !bytes.Equal(readMsg, sendMsg) {
		t.Fatal("Got wrong message from stream", string(readMsg))
	}
}

func TestStream_ReadInterrupt(t *testing.T) {
	sendMsg := []byte("hello world")
	c := make(chan *StreamChunk)
	interrupt := make(chan struct{})
	writer := NewChanWriter(c)
	reader := NewChanReader(c)
	reader.SetInterrupt(interrupt)

	go writer.Write(sendMsg)
	readMsg := make([]byte, len(sendMsg))
	reader.Read(readMsg)

	// Interrupting the stream mid-read
	go func() {
		time.Sleep(50 * time.Millisecond)
		interrupt <- struct{}{}
	}()

	n, err := reader.Read(readMsg)

	if err != ErrInterrupted {
		t.Fatalf("Read returned wrong error after interrupt: %v", err)
	}

	if n != 0 {
		t.Fatalf("Read still returned data after interrput: %d bytes", n)
	}

	// Try writing again after the channel was interrupted
	go writer.Write(sendMsg)
	n, err = reader.Read(readMsg)

	if n != len(sendMsg) {
		t.Fatalf("Read wrong number of bytes: %d expected %d", n, len(sendMsg))
	}

	if err != nil {
		t.Fatalf("Couldn't read from stream: %v", err)
	}

	if !bytes.Equal(readMsg, sendMsg) {
		t.Fatal("Got wrong message from stream", string(readMsg))
	}
}


text:
.modal-bg{
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;

    overflow: hidden;

    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    outline: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(236, 236, 236, 0.39);
}
.modal-box{
    position: absolute;
    overflow: hidden;

}
.modal-bg,.modal-box{
    transition-property:all;
    transition-duration: 0.24s;
    transition-timing-function: ease-out;
    /* Firefox 4 */
    -moz-transition-property:all;
    -moz-transition-duration:0.24s;
    -moz-transition-timing-function:ease-out;
    /* Safari 和 Chrome */
    -webkit-transition-property:all;
    -webkit-transition-duration:0.24s;
    -webkit-transition-timing-function:ease-out;
    /* Opera */
    -o-transition-property:all;
    -o-transition-duration:0.24s;
    -o-transition-timing-function:ease-out;
}


text:
ACCEPTED

#### According to
IRMNG Homonym List

#### Published in
Heol. Zh. 30 (3): 76.

#### Original name
null

### Remarks
null


text:
import React, { PropTypes } from 'react';
import CSSModules from 'react-css-modules';

// Styles
import styles from './index.scss';

const propTypes = {
  current: PropTypes.number.isRequired,
  max: PropTypes.number.isRequired,
};

const CrisisProgressBar = ({ max = 1, current = 0 }) => {
  let barColor = '#51a351';

  if ((current / max) > (3 / 4)) {
    barColor = '#ffc04d';
  }

  if (max - current <= 0) {
    barColor = '#ec3232';
  }

  const barStyles = {
    width: `calc(${100 * (current / max)}%)`,
    backgroundColor: barColor,
  };

  return (

      {current}
      {max}

  );
};

CrisisProgressBar.propTypes = propTypes;
export default CSSModules(CrisisProgressBar, styles);


text:
<?php

/**
 * MediaBindHandler
 *
 * @package     CrowdFusion
 */
class ImagesBindHandler {

    /////////////////////
    // HANDLER ACTIONS //
    /////////////////////

    /* Bound to "Node.@images.get" for loading file URLs when editing a Media record */
    public function loadImageThumbnails(NodeRef $nodeRef, NodePartials &$nodePartials = null)
    {
        return;

        if(!is_null($nodePartials))
        {
            $nodePartials->increaseOutPartials('#thumbnails.#url,#thumbnails.#width,#thumbnails.#height');
        }
    }

    /* Bound to "Node.@mixin-primary-image.get" for loading URLs when editing a record with media out tags */
    public function loadImageTagsThumbnailsCms($nothing, $nothing, Node $node)
    {
        return;

        if($node->getNodePartials()->getOutPartials() != "")
        {
            $tagDefs = $node->getNodeRef()->getElement()->Schema->getTagDefs();
            foreach($tagDefs as $k => $tagDef) {
                if($tagDef->Partial->TagAspect == 'images') {
                    $node->getNodePartials()->increaseOutPartials('#'.$tagDef->Partial->TagRole.'.#thumbnails.#url,#'.$tagDef->Partial->TagRole.'.#thumbnails.#width,#'.$tagDef->Partial->TagRole.'.#thumbnails.#height');
                }
            }
        }
    }

    /* Bound to "Node.@media.outtags.#original.bind" and "Node.@media.outtags.#thumbnails.bind" so the NodeBinder
       doesn't remove the TagLinkNodes during a validation exception */
    public function bindTags()
    {
        //do nothing
    }
}


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

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"

  create_table "posts", force: :cascade do |t|
    t.string   "title"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

end


text:
class ChangeDisplayNameForVolumePrices < SpreeExtension::Migration[4.2]
  def self.up
    rename_column :volume_prices, :display, :name
  end

  def self.down
    rename_column :volume_prices, :name, :display
  end
end


text:
package org.jetbrains.idea.svn.commandLine;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.Ref;
import com.intellij.util.WaitForProgressToShow;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.dialogs.ServerSSHDialog;
import org.jetbrains.idea.svn.dialogs.SimpleCredentialsDialog;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author Konstantin Kolosovsky.
 */
public class TerminalSshModule extends LineCommandAdapter implements CommandRuntimeModule, InteractiveCommandListener {

  private static final Logger LOG = Logger.getInstance(TerminalSshModule.class);

  private static final Pattern PASSPHRASE_PROMPT = Pattern.compile("Enter passphrase for key \\'(.*)\\':\\s?");
  private static final Pattern PASSWORD_PROMPT = Pattern.compile("(.*)\\'s password:\\s?");

  private static final Pattern UNKNOWN_HOST_MESSAGE =
    Pattern.compile("The authenticity of host \\'((.*) \\((.*)\\))\\' can\\'t be established\\.\\s?");
  private static final Pattern HOST_FINGERPRINT_MESSAGE = Pattern.compile("(\\w+) key fingerprint is (.*)\\.\\s?");
  private static final Pattern ACCEPT_HOST_PROMPT = Pattern.compile("Are you sure you want to continue connecting \\(yes/no\\)\\?\\s?");

  @NotNull private final CommandRuntime myRuntime;
  @NotNull private final CommandExecutor myExecutor;

  private String unknownHost;
  private String fingerprintAlgorithm;
  private String hostFingerprint;

  // TODO: Do not accept executor here and make it as command runtime module
  public TerminalSshModule(@NotNull CommandRuntime runtime, @NotNull CommandExecutor executor) {
    myExecutor = executor;
    myRuntime = runtime;
  }

  @Override
  public void onStart(@NotNull Command command) throws SvnBindException {
  }

  @Override
  public boolean handlePrompt(String line, Key outputType) {
    return checkPassphrase(line) || checkPassword(line) || checkUnknownHost(line);
  }

  private boolean checkPassphrase(@NotNull String line) {
    Matcher matcher = PASSPHRASE_PROMPT.matcher(line);

    return matcher.matches() && handleAuthPrompt(SimpleCredentialsDialog.Mode.SSH_PASSPHRASE, matcher.group(1));
  }

  private boolean checkPassword(@NotNull String line) {
    Matcher matcher = PASSWORD_PROMPT.matcher(line);

    return matcher.matches() && handleAuthPrompt(SimpleCredentialsDialog.Mode.SSH_PASSWORD, matcher.group(1));
  }

  private boolean checkUnknownHost(@NotNull String line) {
    Matcher unknownHostMatcher = UNKNOWN_HOST_MESSAGE.matcher(line);
    Matcher hostFingerPrintMatcher = HOST_FINGERPRINT_MESSAGE.matcher(line);
    Matcher acceptHostMatcher = ACCEPT_HOST_PROMPT.matcher(line);

    if (unknownHostMatcher.matches()) {
      unknownHost = unknownHostMatcher.group(1);
    }
    else if (hostFingerPrintMatcher.matches()) {
      fingerprintAlgorithm = hostFingerPrintMatcher.group(1);
      hostFingerprint = hostFingerPrintMatcher.group(2);
    }
    else if (acceptHostMatcher.matches()) {
      handleUnknownHost();
    }

    return unknownHostMatcher.matches() || hostFingerPrintMatcher.matches() || acceptHostMatcher.matches();
  }

  private void handleUnknownHost() {
    final Project project = myRuntime.getVcs().getProject();
    final Ref<Integer> answer = new Ref<Integer>();

    Runnable command = new Runnable() {
      @Override
      public void run() {
        final ServerSSHDialog dialog = new ServerSSHDialog(project, true, unknownHost, fingerprintAlgorithm, hostFingerprint);
        dialog.show();
        answer.set(dialog.getResult());
      }
    };

    WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(command);

    unknownHost = null;
    fingerprintAlgorithm = null;
    hostFingerprint = null;

    sendAnswer(answer.get() == ISVNAuthenticationProvider.REJECTED ? "no" : "yes");
  }

  private boolean handleAuthPrompt(@NotNull final SimpleCredentialsDialog.Mode mode, @NotNull final String key) {
    @NotNull final SVNURL repositoryUrl = myExecutor.getCommand().getRepositoryUrl();
    final Project project = myRuntime.getVcs().getProject();
    final Ref<String> answer = new Ref<String>();

    Runnable command = new Runnable() {
      public void run() {
        SimpleCredentialsDialog dialog = new SimpleCredentialsDialog(project);
        dialog.setup(mode, repositoryUrl.toDecodedString(), key, true);
        dialog.setTitle(SvnBundle.message("dialog.title.authentication.required"));
        dialog.show();
        if (dialog.isOK()) {
          answer.set(dialog.getPassword());
        }
        // TODO: Correctly handle "cancel" - kill the process
        // TODO: and perform "cleanup" on working copy
      }
    };

    WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(command);

    if (!answer.isNull()) {
      sendAnswer(answer.get());
    } else {
      myExecutor.destroyProcess("Authentication canceled for repository: " + repositoryUrl);
    }

    return !answer.isNull();
  }

  private boolean sendAnswer(@NotNull String answer) {
    try {
      myExecutor.write(answer + "\n");
      return true;
    }
    catch (SvnBindException e) {
      // TODO: handle this more carefully
      LOG.info(e);
    }
    return false;
  }
}


text:
__author__ = 'nir0s'

from jocker.jocker import _import_config
from jocker.logger import init
from jocker.jocker import _set_global_verbosity_level
from jocker.jocker import Jocker
from jocker.jocker import execute
from jocker.jocker import JockerError

import testtools
import os
from testfixtures import log_capture
import logging
import json

TEST_DIR = '{0}/test_dir'.format(os.path.expanduser("~"))
TEST_FILE_NAME = 'test_file'
TEST_FILE = TEST_DIR + '/' + TEST_FILE_NAME
TEST_RESOURCES_DIR = 'jocker/tests/resources'
MOCK_CONFIG_FILE = os.path.join(TEST_RESOURCES_DIR, 'mock_docker_config.yaml')
MOCK_VARS_FILE = os.path.join(TEST_RESOURCES_DIR, 'mock_varsfile.py')
MOCK_DOCKER_FILE = os.path.join(TEST_RESOURCES_DIR, 'mock_dockerfile')
BAD_CONFIG_FILE = os.path.join(TEST_RESOURCES_DIR, 'bad_config.py')
BAD_YAML_FILE = os.path.join(TEST_RESOURCES_DIR, 'bad_yaml.yaml')
TEST_OUTPUT_FILE = os.path.join(TEST_RESOURCES_DIR, 'test_outputfile')
TEST_JSON_STRING = \
    '{"status":"test one (len: 1)"}' \
    '{"status":"test two (len: 1)"}'

class TestBase(testtools.TestCase):

    @log_capture()
    def test_set_global_verbosity_level(self, capture):
        lgr = init(base_level=logging.INFO)

        _set_global_verbosity_level(is_verbose_output=False)
        lgr.debug('TEST_LOGGER_OUTPUT')
        capture.check()
        lgr.info('TEST_LOGGER_OUTPUT')
        capture.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT'))

        _set_global_verbosity_level(is_verbose_output=True)
        lgr.debug('TEST_LOGGER_OUTPUT')
        capture.check(
            ('user', 'INFO', 'TEST_LOGGER_OUTPUT'),
            ('user', 'DEBUG', 'TEST_LOGGER_OUTPUT'))

    def test_import_config_file(self):
        outcome = _import_config(MOCK_CONFIG_FILE)
        self.assertEquals(type(outcome), dict)
        self.assertIn('client', outcome.keys())
        self.assertIn('build', outcome.keys())

    def test_fail_import_config_file(self):
        ex = self.assertRaises(RuntimeError, _import_config, '')
        self.assertEquals(str(ex), 'cannot access config file')

    def test_import_bad_config_file_mapping(self):
        ex = self.assertRaises(Exception, _import_config, BAD_CONFIG_FILE)
        self.assertIn('mapping values are not allowed here', str(ex))

    def test_import_bad_yaml_file(self):
        ex = self.assertRaises(RuntimeError, _import_config,
                               BAD_YAML_FILE)
        self.assertEquals('invalid yaml file', str(ex))

    def test_generate_dockerfile(self):
        execute(MOCK_VARS_FILE, MOCK_DOCKER_FILE, TEST_OUTPUT_FILE)
        with open(TEST_OUTPUT_FILE, 'r') as f:
            self.assertIn('git make curl', f.read())
        os.remove(TEST_OUTPUT_FILE)

    def test_dryrun(self):
        output = execute(MOCK_VARS_FILE, MOCK_DOCKER_FILE,
                         TEST_OUTPUT_FILE, dryrun=True)
        self.assertIn('git make curl', output)
        if os.path.isfile(TEST_OUTPUT_FILE):
            raise RuntimeError('test file created in dryrun...')

    def test_missing_template_file_verbose_mode(self):
        ex = self.assertRaises(
            JockerError, execute, MOCK_VARS_FILE, '', verbose=True)
        self.assertIn('template file missing', str(ex))

    def test_missing_template_file(self):
        ex = self.assertRaises(
            SystemExit, execute, MOCK_VARS_FILE, '', verbose=False)
        self.assertIn('508', str(ex))

    def test_dumb_json_output_parser(self):
        j = Jocker(MOCK_VARS_FILE, MOCK_DOCKER_FILE)
        # verify that the initial string isn't already json
        ex = self.assertRaises(ValueError, json.loads, TEST_JSON_STRING)
        self.assertTrue('Extra data', str(ex))
        output = j._parse_dumb_push_output(TEST_JSON_STRING)
        # only now test that it's been converted
        for json_obj in output:
            json.loads(json_obj)

    def test_build_or_dryrun(self):
        ex = self.assertRaises(SystemExit, execute, MOCK_VARS_FILE,
                               MOCK_DOCKER_FILE, build=True, dryrun=True)
        self.assertEquals(str(ex), str(100))

    def test_push_or_dryrun(self):
        ex = self.assertRaises(SystemExit, execute, MOCK_VARS_FILE,
                               MOCK_DOCKER_FILE, push=True, dryrun=True)
        self.assertEquals(str(ex), str(100))


text:
'use strict';

var expect = require('chai').expect;
var hashed = require('../');
var node_path = require('path');
var spawns = require('spawns');
var once = require('once');

var command_file = node_path.join(__dirname, 'bin', 'cache.js')

function s (dir, callback) {
  var cb = once(callback);
  spawns(['node ' + command_file + '  --file ' ]).on('close', function () {

  })
}

describe("description", function(){
  // code ...
});


text:
using UnityEngine;
using System.Collections;

public class PowerUpBlimp : MonoBehaviour {

	public char gun;
	public GameObject powerUp;

	float t=0;
	public float freq = 4;
	public float yi;
	public float xSpeed=10f;

	// Use this for initialization
	void Start () {
	}

	// Update is called once per frame
	void Update () {

	}
	void FixedUpdate()
	{
		t += Time.deltaTime;
		Vector3 pos = transform.position;
		pos.y = yi + Mathf.Sin (freq * t);
		pos.x += xSpeed * Time.deltaTime;
		transform.position = pos;
		}

	void OnTriggerEnter(Collider col)
	{
		if(col.CompareTag("Bullet"))
		   {
			GameObject bgo = col.gameObject;
			Bullet bill = bgo.GetComponent<Bullet>();
			if(bill.IsPlayer())
			{
				GameObject pup= Instantiate(powerUp) as GameObject;
				pup.transform.position=transform.position;
				PowerUp pu = pup.GetComponent<PowerUp>();
				pu.gun=gun;
				Destroy(bgo);
				Destroy(this.gameObject);
			}
		}
	}
}


text:
from sqlalchemy import DDL, Index, text
from sqlalchemy.event import listens_for
from sqlalchemy.sql import func
from sqlalchemy.sql.elements import conv

# if you wonder why search_path is set and the two-argument `unaccent` function is used,
# see this post on stackoverflow: http://stackoverflow.com/a/11007216/298479
SQL_FUNCTION_UNACCENT = '''
    CREATE FUNCTION indico.indico_unaccent(value TEXT)
        RETURNS TEXT
    AS $$
    BEGIN
        RETURN unaccent('unaccent', value);
    END;
    $$
    LANGUAGE plpgsql IMMUTABLE SET search_path = public, pg_temp;
'''

def _should_create_function(ddl, target, connection, **kw):
    sql = "SELECT COUNT(*) FROM information_schema.routines WHERE routine_name = 'indico_unaccent'"
    count = connection.execute(text(sql)).scalar()
    return not count

def create_unaccent_function(conn):
    """Create the unaccent function if it doesn't exist yet."""
    DDL(SQL_FUNCTION_UNACCENT).execute_if(callable_=_should_create_function).execute(conn)

def define_unaccented_lowercase_index(column):
    """Define an index that uses the indico_unaccent function.

    Since this is usually used for searching, the column's value is
    also converted to lowercase before being unaccented. To make proper
    use of this index, use this criterion when querying the table::

        db.func.indico.indico_unaccent(db.func.lower(column)).ilike(...)

    The index will use the trgm operators which allow very efficient LIKE
    even when searching e.g. ``LIKE '%something%'``.

    :param column: The column the index should be created on, e.g.
                   ``User.first_name``
    """
    @listens_for(column.table, 'after_create')
    def _after_create(target, conn, **kw):
        assert target is column.table
        col_func = func.indico.indico_unaccent(func.lower(column))
        index_kwargs = {'postgresql_using': 'gin',
                        'postgresql_ops': {col_func.key: 'gin_trgm_ops'}}
        Index(conv(f'ix_{column.table.name}_{column.name}_unaccent'), col_func, **index_kwargs).create(conn)

def unaccent_match(column, value, exact):
    from indico.core.db import db
    value = value.replace('%', r'\%').replace('_', r'\_').lower()
    if not exact:
        value = f'%{value}%'
    # we always use LIKE, even for an exact match. when using the pg_trgm indexes this is
    # actually faster than `=`
    return db.func.indico.indico_unaccent(db.func.lower(column)).ilike(db.func.indico.indico_unaccent(value))


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>de.general.transliteration.impl</title>
<meta name="date" content="2014-08-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

de.general.transliteration.impl

Classes

TransliteratorChain


text:
class ApacheGeode < Formula
  desc "In-memory Data Grid for fast transactional data processing"
  homepage "https://geode.apache.org/"
  url "https://www.apache.org/dyn/closer.lua?path=geode/1.15.0/apache-geode-1.15.0.tgz"
  mirror "https://archive.apache.org/dist/geode/1.15.0/apache-geode-1.15.0.tgz"
  mirror "https://downloads.apache.org/geode/1.15.0/apache-geode-1.15.0.tgz"
  sha256 "97cd96e94991cbd433d93e8474e1c2e65deb92f022d810a1931464017701701b"
  license "Apache-2.0"

  bottle do
    sha256 cellar: :any_skip_relocation, all: "5c9144215ae6053dfa5182e3245cac977dd2007200b695fa0aca0ccbcd31e26b"
  end

  depends_on "openjdk@11"

  def install
    rm_f "bin/gfsh.bat"
    bash_completion.install "bin/gfsh-completion.bash" => "gfsh"
    libexec.install Dir["*"]
    (bin/"gfsh").write_env_script libexec/"bin/gfsh", Language::Java.java_home_env("11")
  end

  test do
    flags = "--dir #{testpath} --name=geode_locator_brew_test"
    output = shell_output("#{bin}/gfsh start locator #{flags}")
    assert_match "Cluster configuration service is up and running", output
  ensure
    quiet_system "pkill", "-9", "-f", "geode_locator_brew_test"
  end
end


text:
package br.edu.fumep.entity;

import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.*;
import java.time.LocalDate;
import java.util.Date;

/**
 * Created by arabasso on 03/05/2017.
 *
 */
@Entity
@Table(name = "arquivo")
public class Arquivo implements java.io.Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @ManyToOne
    private Mensagem mensagem;
    @ManyToOne
    private GrupoEstudo grupoEstudo;
    @ManyToOne
    private Aluno aluno;
    @NotBlank
    private String nome;
    private Double tamanho;
    private String formato;
    private LocalDate dataInclusao;

    protected Arquivo() {
    }

    public Arquivo(Mensagem mensagem) {
        this.mensagem = mensagem;
        this.aluno = mensagem.getAluno();
        this.grupoEstudo = mensagem.getGrupoEstudo();
    }

    public long getId() {
        return id;
    }

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

    public Mensagem getMensagem() {
        return mensagem;
    }

    public void setMensagem(Mensagem mensagem) {
        this.mensagem = mensagem;
    }

    public GrupoEstudo getGrupoEstudo() {
        return grupoEstudo;
    }

    public void setGrupoEstudo(GrupoEstudo grupoEstudo) {
        this.grupoEstudo = grupoEstudo;
    }

    public Aluno getAluno() {
        return aluno;
    }

    public void setAluno(Aluno aluno) {
        this.aluno = aluno;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public Double getTamanho() {
        return tamanho;
    }

    public void setTamanho(Double tamanho) {
        this.tamanho = tamanho;
    }

    public String getFormato() {
        return formato;
    }

    public void setFormato(String formato) {
        this.formato = formato;
    }

    public LocalDate getDataInclusao() {
        return dataInclusao;
    }

    public void setDataInclusao(LocalDate dataInclusao) {
        this.dataInclusao = dataInclusao;
    }
}


text:
package org.springframework.cloud.dataflow.server.config.features;

import org.springframework.analytics.metrics.AggregateCounterRepository;
import org.springframework.analytics.metrics.FieldValueCounterRepository;
import org.springframework.analytics.metrics.redis.RedisAggregateCounterRepository;
import org.springframework.analytics.metrics.redis.RedisFieldValueCounterRepository;
import org.springframework.boot.actuate.metrics.repository.MetricRepository;
import org.springframework.boot.actuate.metrics.repository.redis.RedisMetricRepository;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.retry.support.RetryTemplate;

/**
 * @author Ilayaperumal Gopinathan
 */
@Configuration
@ConditionalOnProperty(prefix = FeaturesProperties.FEATURES_PREFIX, name = FeaturesProperties.ANALYTICS_ENABLED, matchIfMissing = true)
public class AnalyticsConfiguration {

	@Bean
	@ConditionalOnMissingBean
	public MetricRepository metricRepository(RedisConnectionFactory redisConnectionFactory) {
		return new RedisMetricRepository(redisConnectionFactory);
	}

	@Bean
	@ConditionalOnMissingBean
	public FieldValueCounterRepository fieldValueCounterReader(RedisConnectionFactory redisConnectionFactory) {
		return new RedisFieldValueCounterRepository(redisConnectionFactory, new RetryTemplate());
	}

	@Bean
	@ConditionalOnMissingBean
	public AggregateCounterRepository aggregateCounterReader(RedisConnectionFactory redisConnectionFactory) {
		return new RedisAggregateCounterRepository(redisConnectionFactory, new RetryTemplate());
	}
}


text:
#import <Foundation/Foundation.h>

/// <summary>
/// The SLTBoardLayer class represents the game board's layer.
/// </summary>
@interface SLTBoardLayer : NSObject

/// The unique identifier of the layer.
@property (nonatomic, strong, readonly) NSString* token;

/// The layer's ordering index.
@property (nonatomic, assign, readonly) NSInteger index;

/**
 * Inits an instance of @b SLTBoardLayer class with the given token and layer index.
 * @param theToken The unique identifier of the layer.
 * @param theLayerIndex The layer's ordering index.
 * @return The instance of @b SLTBoardLayer class.
 */
-(id) initWithToken:(NSString*)theToken andLayerIndex:(NSInteger)theLayerIndex;

@end