text:
require 'virtus'
require 'forwardable'
require 'scorm/errors'

# 3.4.1.14. <dataFromLMS> Element
# The <dataFromLMS> element provides initialization data expected by the
# resource (i.e., SCO) represented by the <item> after launch. This data
# is opaque to the LMS and only has functional meaning to the SCO. This
# element shall not be used for parameters that the SCO may need during
# the launch (query string parameters). If this type of functionality is
# required, then the developer should use the parameters attribute of the
# item referencing the SCO resource.
#
# This element is an ADL defined extension to the IMS Content Packaging
# Specification. The element shall only appear, if needed, as a child of
# a leaf <item> element. Only those <item> elements that reference a SCO
# resource can contain the <dataFromLMS> element).
#
# The LMS shall use the value of the <dataFromLMS> element, if provided,
# to initialize the cmi.launch_data data model element
# (refer to SCORM Run-Time Environment book).
#
# XML Namespace: http://www.adlnet.org/xsd/adlcp_v1p3
# XML Namespace Prefix: adlcp
# XML Binding Representation: <dataFromLMS>
# SCORM Requirements:
#   SCORM places a requirement that all manifests shall adhere to the
#   following multiplicity requirements for the <dataFromLMS> element:
#     Content Aggregation: 0 or 1
#     Resource:            0
#
# For Resource Content Packages, this element shall not appear.
# The <organizations> element is required to be empty.
#
# Data Type:
#   The <dataFromLMS> element is represented as a characterstring element.
#   The characterstring has an SPM of 4000 characters.
#
module Scorm::Adlcp
  class DataFromLMS
    include Virtus.model
    extend Forwardable

    def self.from_xml(data)
      return nil if data.length == 0
      raise Scorm::Errors::DuplicateItem.new(
        "Found #{data.length} instances of <adlcp:dataFromLMS>, but only 0 or 1 is allowed."
      ) if data.length > 1

      new(data: data.text)
    end

    def to_s
      "<adlcp:dataFromLMS>#{data.length} bytes</adlcp:dataFromLMS>"
    end

    attribute :data, String, default: ''
    def_delegators :data, :hash, :eql, :==
  end
end


text:
//
//  BumpGeneratorDialog.java
//  xal
//
//  Created by Thomas Pelaia on 3/13/06.
//  Copyright 2006 Oak Ridge National Lab. All rights reserved.
//

package xal.app.knobs;

import xal.smf.AcceleratorNode;

import javax.swing.*;
import javax.swing.event.*;
import java.awt.Component;
import java.awt.event.*;
import java.util.*;

/** Dialog for managing and observing the bump generator */
public class BumpGeneratorDialog extends JDialog implements BumpGeneratorListener {
    /** serialization identifier */
    private static final long serialVersionUID = 1L;
	/** bump generator */
	final BumpGenerator BUMP_GENERATOR;

	/** run button */
	final JButton RUN_BUTTON;

	/** Cancel button */
	final JButton CANCEL_BUTTON;

	/** progress bar */
	final JProgressBar PROGRESS_BAR;

	/** the element count control model */
	final SpinnerNumberModel ELEMENT_COUNT_CONTROL_MODEL;

	/** indicates whether the model should use the live model or design */
	protected boolean _useLiveModel;

	/** selected bump shape adaptor */
	protected BumpShapeAdaptor _bumpShapeAdaptor;

	/** Constructor */
	public BumpGeneratorDialog( final JFrame owner, final KnobsModel model, final KnobGroup knobGroup, final PlaneAdaptor planeAdaptor ) {
		super( owner, planeAdaptor.planeName() + " Bump Generator", true );

		BUMP_GENERATOR = new BumpGenerator( model, knobGroup );
		BUMP_GENERATOR.addBumpGeneratorListener( this );
		BUMP_GENERATOR.setPlaneAdaptor( planeAdaptor );

		RUN_BUTTON = new JButton( "Generate" );
		CANCEL_BUTTON = new JButton( "Cancel" );
		CANCEL_BUTTON.setEnabled( false );

		PROGRESS_BAR = new JProgressBar();
		PROGRESS_BAR.setStringPainted( true );
		PROGRESS_BAR.setString( " Bump Generation Progress... " );

		ELEMENT_COUNT_CONTROL_MODEL = new SpinnerNumberModel( 3, 3, 100, 1 );

		makeContent();

		setLocationRelativeTo( owner );

		addWindowListener( new WindowAdapter() {
			public void windowClosing( final WindowEvent event ) {
				BUMP_GENERATOR.cancelBumpGeneration();
			}
		});
	}

	/** make the content */
	protected void makeContent() {
		setResizable( false );

		final Box mainView = new Box( BoxLayout.Y_AXIS );
		getContentPane().add( mainView );

		final Box contentView = new Box( BoxLayout.Y_AXIS );
		contentView.setBorder( BorderFactory.createEtchedBorder() );

		contentView.add( makeSettingsView() );
		contentView.add( Box.createVerticalStrut( 5 ) );
		contentView.add( PROGRESS_BAR );

		mainView.add( contentView );
		mainView.add( makeButtonRow() );

		pack();
	}

	/** make the settings view */
	protected Component makeSettingsView() {
		final Box view = new Box( BoxLayout.X_AXIS );

		view.add( Box.createHorizontalGlue() );
		view.add( makeModelSourceSelector() );
		view.add( makeBumpShapeSelector() );
		view.add( makeMagnetCountView() );

		return view;
	}

	/** make the magnet count view */
	protected Component makeMagnetCountView() {
		final Box view = new Box( BoxLayout.Y_AXIS );

		view.setBorder( BorderFactory.createTitledBorder( "Magnets" ) );
		view.add( new JSpinner( ELEMENT_COUNT_CONTROL_MODEL ) );
		view.add( Box.createVerticalGlue() );

		return view;
	}

	/** make model source selector */
	protected Component makeModelSourceSelector() {
		final Box view = new Box( BoxLayout.Y_AXIS );
		view.setBorder( BorderFactory.createTitledBorder( "Model" ) );

		_useLiveModel = BUMP_GENERATOR.usesLiveModel();

		final JRadioButton designButton = new JRadioButton( "Design" );
		designButton.addActionListener( new ActionListener() {
			public void actionPerformed( final ActionEvent event ) {
				_useLiveModel = !designButton.isSelected();
			}
		});
		designButton.setSelected( !_useLiveModel );

		final JRadioButton liveButton = new JRadioButton( "Live" );
		liveButton.addActionListener( new ActionListener() {
			public void actionPerformed( final ActionEvent event ) {
				_useLiveModel = liveButton.isSelected();
			}
		});
		liveButton.setSelected( _useLiveModel );

		view.add( designButton );
		view.add( liveButton );

		final ButtonGroup group = new ButtonGroup();
		group.add( designButton );
		group.add( liveButton );

		return view;
	}

	/** make bump shape selector */
	protected Component makeBumpShapeSelector() {
		final Box view = new Box( BoxLayout.Y_AXIS );
		view.setBorder( BorderFactory.createTitledBorder( "Bump" ) );

		_bumpShapeAdaptor = BUMP_GENERATOR.getBumpShapeAdaptor();
		updateMinimumElementCount();

		final JRadioButton offsetButton = new JRadioButton( "Offset" );
		offsetButton.addActionListener( new ActionListener() {
			public void actionPerformed( final ActionEvent event ) {
				_bumpShapeAdaptor = BumpShapeAdaptor.getBumpOffsetAdaptor();
				updateMinimumElementCount();
			}
		});
		offsetButton.setSelected( _bumpShapeAdaptor == BumpShapeAdaptor.getBumpOffsetAdaptor() );

		final JRadioButton angleButton = new JRadioButton( "Angle" );
		angleButton.addActionListener( new ActionListener() {
			public void actionPerformed( final ActionEvent event ) {
				_bumpShapeAdaptor = BumpShapeAdaptor.getBumpAngleAdaptor();
				updateMinimumElementCount();
			}
		});
		angleButton.setSelected( _bumpShapeAdaptor == BumpShapeAdaptor.getBumpAngleAdaptor() );

		view.add( offsetButton );
		view.add( angleButton );

		final ButtonGroup group = new ButtonGroup();
		group.add( offsetButton );
		group.add( angleButton );

		return view;
	}

	/** update the minimum element count */
	protected void updateMinimumElementCount() {
		final Number value = ELEMENT_COUNT_CONTROL_MODEL.getNumber();
		final Integer minimumCount = new Integer( _bumpShapeAdaptor.getMinimumElementCount() );
		ELEMENT_COUNT_CONTROL_MODEL.setMinimum( minimumCount );
		if ( minimumCount.intValue() > value.intValue() ) {
			ELEMENT_COUNT_CONTROL_MODEL.setValue( minimumCount );
		}
	}

	/** make the button row */
	protected Component makeButtonRow() {
		final Box row = new Box( BoxLayout.X_AXIS );
		row.setBorder( BorderFactory.createEtchedBorder() );

		RUN_BUTTON.addActionListener( new ActionListener() {
			public void actionPerformed( final ActionEvent event ) {
				RUN_BUTTON.setEnabled( false );
				final int elementCount = ELEMENT_COUNT_CONTROL_MODEL.getNumber().intValue();
				BUMP_GENERATOR.setBumpElementCount( elementCount );
				BUMP_GENERATOR.setBumpShapeAdaptor( _bumpShapeAdaptor );
				BUMP_GENERATOR.setUsesLiveModel( _useLiveModel );
				spawnBumpGeneration();
			}
		});

		CANCEL_BUTTON.addActionListener( new ActionListener() {
			public void actionPerformed( final ActionEvent event ) {
				BUMP_GENERATOR.cancelBumpGeneration();
				setVisible( false );
			}
		});

		row.add( Box.createHorizontalStrut( 100 ) );
		row.add( Box.createHorizontalGlue() );
		row.add( CANCEL_BUTTON );
		row.add( RUN_BUTTON );
		row.add( Box.createHorizontalStrut( 10 ) );

		getRootPane().setDefaultButton( RUN_BUTTON );

		return row;
	}

	/** spawn bump generation */
	protected void spawnBumpGeneration() {
		CANCEL_BUTTON.setEnabled( true );

		new Thread( new Runnable() {
			/** perform the bump generation */
			public void run() {
				try {
					BUMP_GENERATOR.makeBumpKnobs();
				}
				finally {
					setupControlsForRunCompletion();
				}
			}
		}).start();
	}

	/** setup controls for run completion */
	protected void setupControlsForRunCompletion() {
		try {
			SwingUtilities.invokeAndWait( new Runnable() {
				public void run() {
					RUN_BUTTON.setEnabled( true );
					CANCEL_BUTTON.setEnabled( false );
				}
			});
		}
		catch( Exception exception ) {
			exception.printStackTrace();
		}
	}

	/** handle the event indicating that a new knob is about to be generated */
	public void willGenerateKnob( final BumpGenerator generator, final AcceleratorNode node ) {
		try {
			SwingUtilities.invokeAndWait( new Runnable() {
				public void run() {
					PROGRESS_BAR.setMaximum( BUMP_GENERATOR.getBumpCount() );
					PROGRESS_BAR.setString( node.getId() );
				}
			});
		}
		catch( Exception exception ) {
			exception.printStackTrace();
		}
	}

	/** handle event indicating that the knob has been generated */
	public void knobGenerated( final BumpGenerator generator, final Knob knob ) {
		try {
			SwingUtilities.invokeAndWait( new Runnable() {
				public void run() {
					PROGRESS_BAR.setValue( BUMP_GENERATOR.getProcessedBumpCount() );
				}
			});
		}
		catch( Exception exception ) {
			exception.printStackTrace();
		}
	}

	/** handle event indicating that the generator failed to make the bump for the specified node */
	public void knobGeneratorException( final BumpGenerator generator, final AcceleratorNode node, final Exception exception ) {}

	/** handle event indicating that the knob generation is complete */
	public void knobGenerationComplete( final BumpGenerator generator, final List<Knob> knobs ) {
		try {
			SwingUtilities.invokeAndWait( new Runnable() {
				public void run() {
					setVisible( false );
				}
			});
		}
		catch( Exception exception ) {
			exception.printStackTrace();
		}
	}

	/** handle event indicating that the knob generation failed */
	public void knobGenerationFailed( final BumpGenerator generator, final Exception exception ) {
		try {
			SwingUtilities.invokeAndWait( new Runnable() {
				public void run() {
					JOptionPane.showMessageDialog( BumpGeneratorDialog.this, exception.getMessage(), "Generator Failed", JOptionPane.ERROR_MESSAGE );
					setVisible( false );
				}
			});
		}
		catch( Exception runException ) {
			runException.printStackTrace();
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
package com.goforer.beatery.model.event;

import com.goforer.base.model.event.ResponseListEvent;

/**
 * Define event to handle getting the eatery-list.
 *
 *

 * Please refer to EventBus.
 *
 * @see
 *     EventBus
 * @see
 *     How to get started
 *

 *
 */
public class EateryListEvent extends ResponseListEvent {
    public EateryListEvent(boolean isNew) {
        super(isNew);
    }
}


text:
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>

#include <asm/mipsregs.h>
#include <asm/bcache.h>
#include <asm/cacheops.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <asm/r4kcache.h>

/*
 * MIPS32/MIPS64 L2 cache handling
 */

/*
 * Writeback and invalidate the secondary cache before DMA.
 */
static void mips_sc_wback_inv(unsigned long addr, unsigned long size)
{
	blast_scache_range(addr, addr + size);
}

/*
 * Invalidate the secondary cache before DMA.
 */
static void mips_sc_inv(unsigned long addr, unsigned long size)
{
	unsigned long lsize = cpu_scache_line_size();
	unsigned long almask = ~(lsize - 1);

	cache_op(Hit_Writeback_Inv_SD, addr & almask);
	cache_op(Hit_Writeback_Inv_SD, (addr + size - 1) & almask);
	blast_inv_scache_range(addr, addr + size);
}

static void mips_sc_enable(void)
{
	/* L2 cache is permanently enabled */
}

static void mips_sc_disable(void)
{
	/* L2 cache is permanently enabled */
}

static struct bcache_ops mips_sc_ops = {
	.bc_enable = mips_sc_enable,
	.bc_disable = mips_sc_disable,
	.bc_wback_inv = mips_sc_wback_inv,
	.bc_inv = mips_sc_inv
};

/*
 * Check if the L2 cache controller is activated on a particular platform.
 * MTI's L2 controller and the L2 cache controller of Broadcom's BMIPS
 * cores both use c0_config2's bit 12 as "L2 Bypass" bit, that is the
 * cache being disabled.  However there is no guarantee for this to be
 * true on all platforms.  In an act of stupidity the spec defined bits
 * 12..15 as implementation defined so below function will eventually have
 * to be replaced by a platform specific probe.
 */
static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
{
	unsigned int config2 = read_c0_config2();
	unsigned int tmp;

	/* Check the bypass bit (L2B) */
	switch (c->cputype) {
	case CPU_34K:
	case CPU_74K:
	case CPU_1004K:
	case CPU_BMIPS5000:
		if (config2 & (1 << 12))
			return 0;
	}

	tmp = (config2 >> 4) & 0x0f;
	if (0 < tmp && tmp <= 7)
		c->scache.linesz = 2 << tmp;
	else
		return 0;
	return 1;
}

static inline int __init mips_sc_probe(void)
{
	struct cpuinfo_mips *c = &current_cpu_data;
	unsigned int config1, config2;
	unsigned int tmp;

	/* Mark as not present until probe completed */
	c->scache.flags |= MIPS_CACHE_NOT_PRESENT;

	/* Ignore anything but MIPSxx processors */
	if (c->isa_level != MIPS_CPU_ISA_M32R1 &&
	    c->isa_level != MIPS_CPU_ISA_M32R2 &&
	    c->isa_level != MIPS_CPU_ISA_M64R1 &&
	    c->isa_level != MIPS_CPU_ISA_M64R2)
		return 0;

	/* Does this MIPS32/MIPS64 CPU have a config2 register? */
	config1 = read_c0_config1();
	if (!(config1 & MIPS_CONF_M))
		return 0;

	config2 = read_c0_config2();

	if (!mips_sc_is_activated(c))
		return 0;

	tmp = (config2 >> 8) & 0x0f;
	if (0 <= tmp && tmp <= 7)
		c->scache.sets = 64 << tmp;
	else
		return 0;

	tmp = (config2 >> 0) & 0x0f;
	if (0 <= tmp && tmp <= 7)
		c->scache.ways = tmp + 1;
	else
		return 0;

	c->scache.waysize = c->scache.sets * c->scache.linesz;
	c->scache.waybit = __ffs(c->scache.waysize);

	c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;

	return 1;
}

int __cpuinit mips_sc_init(void)
{
	int found = mips_sc_probe();
	if (found) {
		mips_sc_enable();
		bcops = &mips_sc_ops;
	}
	return found;
}


text:
Submit button caption

        Setup the value for the submit button

        <input type="text" class="umb-editor umb-textstring" ng-model="model.submitButtonCaption" required />

Required error message

        Text to be displayed when a required field isn't populated, use {0} to replace with field caption

        <input type="text" class="umb-editor umb-textstring" ng-model="model.requiredErrorMessage" required />

Invalid error message

        Text to be displayed when a field value isn't valid, use {0} to replace with field caption

        <input type="text" class="umb-editor umb-textstring" ng-model="model.invalidErrorMessage" required />

Success Message

        Text to dislay after a successful form submit

        <input type="text" class="umb-editor umb-textstring" ng-model="model.messageOnSubmit" required />

Stores data

        If you don't wish to store the data to the db, disable this switch

        <switch ng-model="model.storesData" class="green"></switch>


text:
package io.cloudslang.lang.runtime.env;

import io.cloudslang.lang.entities.bindings.values.Value;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class ReturnValues implements Serializable {

    private final Map<String, Value> outputs;

    private final String result;

    public ReturnValues(Map<String, Value> outputs, String result) {
        this.outputs = new HashMap<>(outputs);
        this.result = result;
    }

    public Map<String, Value> getOutputs() {
        return outputs;
    }

    public String getResult() {
        return result;
    }

    @Override
    public String toString() {
        return "ReturnValues{" +
                "result='" + result + "', " +
                "outputs=" + outputs +
                '}';
    }
}


text:
<?php

/**
 * Flushes the output to the client.
 *
 * @see flush()
 */
class Twig_TokenParser_Flush extends Twig_TokenParser
{

    /**
     * Parses a token and returns a node.
     *
     * @param Twig_Token $token A Twig_Token instance
     *
     * @return Twig_NodeInterface A Twig_NodeInterface instance
     */
    public function parse( Twig_Token $token )
    {

        $this->parser->getStream()->expect( Twig_Token::BLOCK_END_TYPE );

        return new Twig_Node_Flush( $token->getLine(), $this->getTag() );
    }

    /**
     * Gets the tag name associated with this token parser.
     *
     * @return string The tag name
     */
    public function getTag()
    {

        return 'flush';
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;

namespace Azure.AI.FormRecognizer.DocumentAnalysis
{
    [CodeGenModel("DocumentKeyValueElement")]
    public partial class DocumentKeyValueElement
    {
    }
}


text:
class WrappingTextView : public BTextView
{
	public:
		WrappingTextView(BRect a_frame,const char* a_name,int32 a_resize_mode,int32 a_flags);
		virtual ~WrappingTextView();

		//BTextView overrides
		virtual void DetachedFromWindow();
		virtual void FrameResized(float a_width, float a_height);
		virtual void MakeFocus(bool a_focused);
		void SetText(const char *text, int32 length, const text_run_array *runs = NULL);
		void SetText(const char *text, const text_run_array *runs = NULL);
		void SetText(BFile *file, int32 offset, int32 length, const text_run_array *runs = NULL);
		virtual void StoreChange();
		virtual void Modified();
		bool HasBeenModified();
		void ResetTextRect();

	protected:
		virtual void InsertText(const char *a_text, int32 a_length, int32 a_offset, const text_run_array *a_runs);

	private:
		bool m_modified;
		bool m_modified_disabled;
};

#endif


text:
/// <reference path="../../Scripts/jquery-1.10.2-vsdoc.js" />

(function ($) {
	// Class Definition
	var MbComingsoon;
	MbComingsoon = function (date, element, localization, speed, callBack) {
		this.$el = $(element);
		this.end = date;
		this.active = false;
		this.interval = 1000;
		this.speed = speed;
		if (jQuery.isFunction(callBack))
			this.callBack = callBack;
		else
		    this.callBack = null;
		this.localization = {days:"days", hours: "hours", minutes: "minutes", seconds: "seconds"};
		$.extend(this.localization, this.localization, localization);
	}

	MbComingsoon.prototype = {
		// Returns an object containing counter data
		getCounterNumbers: function () {
			var result = {
				days: {
					tens: 0,
					units: 0,
					hundreds: 0
				},
				hours: {
					tens: 0,
					units: 0
				},
				minutes: {
					tens: 0,
					units: 0
				},
				seconds: {
					tens: 0,
					units: 0
				}
			}, millday = 1000 * 60 * 60 * 24,
				millhour = 1000 * 60 * 60,
				millminutes = 1000 * 60,
				millseconds = 1000,
				rest = 0
			;
			var now = new Date()
			var diff = this.end.getTime() - now.getTime();
			// CountDown expired !!
			if (diff <= 0)
				return result;

			// Max number of days is 99 (i will expand in future versions)
			var days = Math.min(Math.floor(diff / millday), 999);
			rest = diff % millday;

			result.days.hundreds = Math.floor(days / 100);
			var dayrest = days % 100;
			result.days.tens = Math.floor(dayrest / 10);
			result.days.units = dayrest % 10;

			var hours = Math.floor(rest / millhour);
			rest = rest % millhour;
			result.hours.tens = Math.floor(hours / 10);
			result.hours.units = hours % 10;

			var minutes = Math.floor(rest / millminutes);
			rest = rest % millminutes;
			result.minutes.tens = Math.floor(minutes / 10);
			result.minutes.units = minutes % 10;

			var seconds = Math.floor(rest / 1000);
			result.seconds.tens = Math.floor(seconds / 10);
			result.seconds.units = seconds % 10;
			return result;
		},
		// If changed update a part (day, hours, minutes, seconds) of counter
		updatePart: function (part) {
			var cn = this.getCounterNumbers();
			var $part = $('.' + part, this.$el);
			if (part == 'days') {
				this.setDayHundreds(cn.days.hundreds > 0);
				if ($part.find('.number.hundreds.show').html() != cn[part].hundreds) {
					var $n1 = $('.n1.hundreds', $part);
					var $n2 = $('.n2.hundreds', $part);
					this.scrollNumber($n1, $n2, cn[part].hundreds);
				}
			}
			if ($part.find('.number.tens.show').html() != cn[part].tens) {
				var $n1 = $('.n1.tens', $part);
				var $n2 = $('.n2.tens', $part);
				this.scrollNumber($n1, $n2, cn[part].tens);

			}
			if ($part.find('.number.units.show').html() != cn[part].units) {
				var $n1 = $('.n1.units', $part);
				var $n2 = $('.n2.units', $part);
				this.scrollNumber($n1, $n2, cn[part].units);
			}
			// Only forn day part update hundreds
		},
		// True if countdown is expired
		timeOut: function () {
			var now = new Date()
			var diff = this.end.getTime() - now.getTime();
			if (diff <= 0)
				return true;
			return false;
		},
		setDayHundreds: function (action) {
			if (action)
				$('.counter.days', this.$el).addClass('with-hundreds');
			else
				$('.counter.days', this.$el).removeClass('with-hundreds');
		},
		// Update entire counter
		updateCounter: function () {
			this.updatePart('days');
			this.updatePart('hours');
			this.updatePart('minutes');
			this.updatePart('seconds');
			if (this.timeOut()) {
				this.active = false;
				if (this.callBack)
					this.callBack(this);
			}
		},
		localize: function (localization) {
		    if($.isPlainObject(localization))
		        $.extend(this.localization, this.localization, localization);
		    $('.days', this.$el).siblings('.counter-caption').text(this.localization.days);
		    $('.hours', this.$el).siblings('.counter-caption').text(this.localization.hours);
		    $('.minutes', this.$el).siblings('.counter-caption').text(this.localization.minutes);
		    $('.seconds', this.$el).siblings('.counter-caption').text(this.localization.seconds);
		},
		// Start automatic update (interval in milliseconds)
		start: function (interval) {
			if (interval)
				this.interval = interval;
			var i = this.interval;
			this.active = true;
			var me = this;
			setTimeout(function () {
				me.updateCounter();
				if (me.active)
					me.start();
			}, i);
		},
		// Stop automatic update
		stop: function () {
			this.active = false;
		},
		// Animation of a single
		scrollNumber: function ($n1, $n2, value) {
			if ($n1.hasClass('show')) {
				$n2.removeClass('hidden-down')
					.css('top', '-100%')
					.text(value)
					.stop()
					.animate({ top: 0 }, this.speed, function () {
						$n2.addClass('show');
					});
				$n1.stop().animate({ top: "100%" }, this.speed, function () {
					$n1.removeClass('show')
						.addClass('hidden-down');
				});
			} else {
				$n1.removeClass('hidden-down')
					.css('top', '-100%')
					.text(value)
					.stop()
					.animate({ top: 0 }, this.speed, function () {
						$n1.addClass('show');
					});
				$n2.stop().animate({ top: "100%" }, this.speed, function () {
					$n2.removeClass('show')
						.addClass('hidden-down');
				});
			}
		}
	}

	// jQuery plugin
	jQuery.fn.mbComingsoon = function (opt) {
		var defaults = {
			interval: 1000,
			callBack: null,
			localization: { days: "days", hours: "hours", minutes: "minutes", seconds: "seconds" },
            speed:500
		}
		var options = {};
		var content = '
' +
						'
' +
						'
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
' +
						'
days
' +
						'
' +
						'
' +
						'
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
' +
						'
hours
' +
						'
' +
						'
' +
						'
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
' +
						'
minutes
' +
						'
' +
						'
' +
						'
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
0
' +
						'
' +
						'
seconds
' +
						'
' +
						'
';
		return this.each(function () {
			var $this = $(this);
			var data = $this.data('mbComingsoon');
			if (!data) {
				if (opt instanceof Date)
					options.expiryDate = opt;
				else if ($.isPlainObject(opt))
					$.extend(options, defaults, opt);
				else if (typeof opt == "string")
					options.expiryDate = new Date(opt);
				if (!options.expiryDate)
					throw new Error('Expiry date is required!');
				data = new MbComingsoon(options.expiryDate, $this, options.localization, options.speed, options.callBack);
				$this.html(content);
				data.localize();
				data.start();
			} else if (opt == 'start')
				data.start();
			else if (opt == 'stop')
				data.stop();
			else if ($.isPlainObject(opt)) {
				if (opt.expiryDate instanceof Date)
					data.end = opt.expiryDate;
				if ($.isNumeric(opt.interval))
					data.interval = opt.interval;
				if ($.isFunction(opt.callBack))
				    data.callBack = opt.callBack;
				if ($.isPlainObject(opt.localization))
				    this.localize(opt.localization);
			}
		})
	}

})(jQuery)


text:
package kiwi.api.recommendation;

import javax.ejb.Remote;

/**
 * @author Peter Dolog
 *
 */
@Remote
public interface RecommendationServiceRemote extends RecommendationService {

}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.operator.aggregation;

import com.facebook.presto.spi.block.Block;
import com.facebook.presto.spi.block.BlockBuilder;
import com.facebook.presto.spi.block.BlockBuilderStatus;
import com.facebook.presto.spi.type.BigintType;
import com.google.common.collect.ImmutableList;

import java.util.List;

import static com.facebook.presto.spi.type.VarbinaryType.VARBINARY;
import static com.facebook.presto.type.ArrayType.toStackRepresentation;

public class TestArrayMinAggregation
        extends AbstractTestAggregationFunction
{
    @Override
    public Block[] getSequenceBlocks(int start, int length)
    {
        BlockBuilder blockBuilder = VARBINARY.createBlockBuilder(new BlockBuilderStatus(), length);
        for (int i = start; i < start + length; i++) {
            VARBINARY.writeSlice(blockBuilder, toStackRepresentation(ImmutableList.of(i), BigintType.BIGINT));
        }
        return new Block[] {blockBuilder.build()};
    }

    @Override
    public List<Long> getExpectedValue(int start, int length)
    {
        if (length == 0) {
            return null;
        }
        return ImmutableList.of((long) start);
    }

    @Override
    protected String getFunctionName()
    {
        return "min";
    }

    @Override
    protected List<String> getFunctionParameterTypes()
    {
        return ImmutableList.of("array<bigint>");
    }
}


text:
#include <cassert>
#include <iostream>
#include <memory>

#include "scanner.hpp"
#include "parser.hpp"
#include "variable.hpp"
#include "evaluator.hpp"
#include "opcode.hpp"
#include "encoder.hpp"
#include "serializer.hpp"
#include "vm.hpp"

using namespace CS;

const char* GetSourceCode() {
    const char* code = "int a;\na = 1 + 1;\n println(a);\n";
    return code;
}

void TestScanner() {
    printf("------scanner test------\n");
    const char* code = GetSourceCode();
    CS::TokenList token_list = CS::Scanner::Scan(code);
    for (auto &i : token_list) {
        std::cout << i.first << " : " << i.second <<std::endl;
    }
    printf("-----pass: scanner test------\n\n");
}

void DumpSyntaxTree(CS::SyntaxTree* root, int interval) {
    if (!root) return;
    printf("%*s", interval, "");
    std::string line = "->";
    if (!root->value_.empty())
        line += root->value_;
    else if (root->type_ == CS::GetId("call_type"))
        line += "call";
    line += ":" +std::to_string(root->type_);
    printf("%-10s", line.c_str());
        DumpSyntaxTree(root->left_, 0);

    printf("\n");
        DumpSyntaxTree(root->right_, interval + 10);
    DumpSyntaxTree(root->next_, interval);
}

void TestParser() {
    using namespace CS;
    printf("------parser test------\n");
    const char* code = GetSourceCode();
    CS::TokenList token_list = CS::Scanner::Scan(code);
    CS::Parser parser;
    std::shared_ptr<SyntaxTree> syntax_tree(parser.Parse(token_list));
    DumpSyntaxTree(syntax_tree.get(), 0);
    printf("-----pass: parser test------\n\n");
}

void TestVariable() {
    printf("------variable test------\n");
    CS::Variable a(1);
    CS::Variable b(1.0);
    CS::Variable c(2);
    CS::Variable p(static_cast<void*>(&a));
    // int and double
    std::cout << (a + b).to_string() << std::endl;
    std::cout << (a - b).to_string() << std::endl;
    std::cout << (a * b).to_string() << std::endl;
    std::cout << (a / b).to_string() << std::endl;
    // int and int
    std::cout << (a + c).to_string() << std::endl;
    printf("-----pass: variable test------\n\n");
}

void TestEvaluator() {
    printf("-----evaluator test------\n");
    CS::Evaluator eval;
    std::cout << eval.Evaluate("int a;\n") << std::endl;
    std::cout << eval.Evaluate("a = 1+1;\n") << std::endl;
    std::cout << eval.Evaluate("println(a);\n") << std::endl;
    printf("-----pass: evaluator test------\n\n");
}

void TestOpCode() {
    printf("-----opcode test------\n");
    using namespace CS::OpCode;
    int op = GetOpCode("push");
    int val = 1;
    long long i = MakeOpCode(op, val);
    printf("%016llx\n", i);
    assert(i == 0x0000000100000001);
    auto instruction = SplitOpCode(i);
    assert(instruction.first == GetOpCode("push"));
    assert(instruction.second == 1);
    printf("-----pass: opcode test------\n\n");
}

void TestStackModel() {
    printf("-----stack model test-----\n");

    /* int a; a = 1 + 1; println(a); */
    using namespace CS::OpCode;
    StackModel stack;
    stack.Action("alloc", 4);
    stack.Action("push", 1);
    stack.Action("push", 1);
    stack.Action("add");
    stack.Action("pop");
    stack.Action("mov", 0);
    stack.Action("pop");
    stack.Action("load", 0);
    stack.Action("call", "println");
    auto res = stack.Export();
    InstructionTable instructions = *(res.first);
    SymbolTable symbols = *(res.second);
    for (long long i : instructions) {
        printf("%016llx\n", i);
    }
    printf("-----pass: stack model test-----\n\n");
}

void TestEncoder() {
    printf("-----encoder test------\n");

    using namespace CS;

    const char* code = GetSourceCode();
    Parser parser;
    Encoder::Encoder encoder;

    TokenList token_list = Scanner::Scan(code);
    std::shared_ptr<SyntaxTree> syntax_tree(parser.Parse(token_list));
    auto instruction_symbol = encoder.Encode(syntax_tree.get());

    /* instructions */
    for (long long i : *(instruction_symbol.first)) {
        printf("%016llx\n", i);
    }

    /* symbols */
    for (auto i: *(instruction_symbol.second)) {
        printf("%s -> %d\n", i.first.data(), i.second);
    }

    printf("-----pass: encoder test------\n\n");
}

void TestSerializer() {
    printf("-----serializer test-----\n");
    using namespace CS;
    using namespace OpCode;

    Parser parser;
    Encoder::Encoder encoder;
    const char* code = GetSourceCode();

    TokenList token_list = Scanner::Scan(code);
    std::shared_ptr<SyntaxTree> syntax_tree(parser.Parse(token_list));
    auto instruction_symbol = encoder.Encode(syntax_tree.get());
    auto inst = instruction_symbol.first;
    auto symb = instruction_symbol.second;
    /* serialize */
    Serializer::Serialize(instruction_symbol, "./test.oc");

    /* deserialize */
    auto deserialized = Serializer::Deserialize("./test.oc");
    auto inst_d = deserialized.first;
    auto symb_d = deserialized.second;

    assert(*inst == *inst_d);
    assert(*symb == *symb_d);
    remove("./test.oc");
    printf("-----pass: serializer test-----\n\n");
}

void TestVM() {
    printf("-----vm test-----\n");
    using namespace CS;
    using namespace OpCode;

    Parser parser;
    Encoder::Encoder encoder;
    VM::VM vm;
    const char* code = GetSourceCode();

    TokenList token_list = Scanner::Scan(code);
    std::shared_ptr<SyntaxTree> syntax_tree(parser.Parse(token_list));
    auto instruction_symbol = encoder.Encode(syntax_tree.get());
    InstructionTable* inst = instruction_symbol.first;
    SymbolTable* symb = instruction_symbol.second;

    vm.LoadSymbolTable(*symb);
    vm.Execute(*inst);

    printf("-----pass: vm test-----\n\n");
}

int main()
{
    TestScanner();
    TestParser();
    TestVariable();
    TestEvaluator();
    TestOpCode();
    TestStackModel();
    TestEncoder();
    TestSerializer();
    TestVM();
    printf("\n------pass all test !------\n\n");
    return 0;
}


text:
/// <reference path="../_references.ts"/>

module powerbitests {
    import Card = powerbi.visuals.Card;
    import cardCapabilities = powerbi.visuals.cardCapabilities;
    import DataViewTransform = powerbi.data.DataViewTransform;
    import ValueType = powerbi.ValueType;
    import SVGUtil = powerbi.visuals.SVGUtil;

    describe("Card", () => {
        it('Card_registered_capabilities', () => {
            expect(powerbi.visuals.visualPluginFactory.create().getPlugin('card').capabilities).toBe(cardCapabilities);
        });

        it('Capabilities should include dataViewMappings', () => {
            expect(cardCapabilities.dataViewMappings).toBeDefined();
            expect(cardCapabilities.dataViewMappings.length).toBe(1);
        });

        it('Capabilities should have condition',() => {
            expect(cardCapabilities.dataViewMappings[0].conditions[0][cardCapabilities.dataRoles[0].name].max).toBe(1);
        });

        it('Capabilities should include dataRoles', () => {
            expect(cardCapabilities.dataRoles).toBeDefined();
            expect(cardCapabilities.dataRoles.length).toBe(1);
        });

        it('Capabilities should suppressDefaultTitle',() => {
            expect(cardCapabilities.suppressDefaultTitle).toBe(true);
        });

        it('FormatString property should match calculated',() => {
            expect(powerbi.data.DataViewObjectDescriptors.findFormatString(cardCapabilities.objects)).toEqual(Card.formatStringProp);
        });

        it('cardChart preferred capabilities requires at most 1 row', () => {
            var dataViewMetadata: powerbi.DataViewMetadata = {
                columns: [
                    { displayName: 'col1' },
                    { displayName: 'col2', isMeasure: true }]
            };

            var dataViewWithTwoRows: powerbi.DataView = {
                metadata: dataViewMetadata,
                categorical: {
                    categories: [{
                        source: dataViewMetadata.columns[0],
                        values: ['John Domo', 'Delta Force'],
                        identity: [mocks.dataViewScopeIdentity('a'), mocks.dataViewScopeIdentity('b')]
                    }],
                    values: DataViewTransform.createValueColumns([{
                        source: dataViewMetadata.columns[1],
                        values: [100, 200],
                        subtotal: 300
                    }])
                }
            };

            var plugin = powerbi.visuals.visualPluginFactory.create().getPlugin('card');
            expect(powerbi.DataViewAnalysis.supports(dataViewWithTwoRows, plugin.capabilities.dataViewMappings[0], true)).toBe(false);
        });

        it('cardChart preferred capabilities requires 1 row', () => {
            var dataViewMetadata: powerbi.DataViewMetadata = {
                columns: [
                    { displayName: 'numeric', type: ValueType.fromDescriptor({ numeric: true }) }
                ],
            };

            var data: powerbi.DataView = {
                metadata: dataViewMetadata,
                single: { value: 123.456 }
            };

            var plugin = powerbi.visuals.visualPluginFactory.create().getPlugin('card');
            expect(powerbi.DataViewAnalysis.supports(data, plugin.capabilities.dataViewMappings[0], true)).toBe(true);
        });
    });

            describe("enumerateObjectInstances", () => {
                var v: powerbi.IVisual, element: JQuery;

                var dataViewMetadata: powerbi.DataViewMetadata = {
                    columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
                    groups: [],
                    measures: [0],
                    objects: {
                        labels: {
                            color: { solid: { color: '#222222'}},
                            labelPrecision: 3,
                            labelDisplayUnits: 1000
                        }
                    }
                };

            beforeEach(() => {
                element = powerbitests.helpers.testDom('500', '500');
                v = powerbi.visuals.visualPluginFactory.create().getPlugin('card').create();

                v.init({
                    element: element,
                    host: powerbitests.mocks.createVisualHostServices(),
                    style: powerbi.visuals.visualStyles.create(),
                    viewport: {
                        height: element.height(),
                        width: element.width()
                    },
                    animation: { transitionImmediate: true }
                });
            });

            it("verify default values", () => {
                v.onDataChanged({ dataViews: [] });

                verifyLabels();
                verifyTitle();
            });

            it("changed data", () => {
                //var dataView = powerbi.visuals.visualPluginFactory.createMinerva({}).getPlugin("card").create();

                v.onDataChanged({
                    dataViews: [{
                        metadata: dataViewMetadata,
                        single: {
                            value: 20
                        }
                    }]
                });

                verifyLabels('#222222', 3, 1000);
            });

                it("changed title", () => {
                    var metadata: powerbi.DataViewMetadata = {
                        columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
                        groups: [],
                        measures: [0],
                        objects: {
                            cardTitle: {
                                show: false
                            }
                        }
                    };

                    v.onDataChanged({
                        dataViews: [{
                            metadata: metadata,
                            single: {
                                value: 0
                            }
                        }]
                    });

                    var objects = v.enumerateObjectInstances({ objectName: "cardTitle" });
                    expect(objects.length).toBe(1);
                    expect(objects[0].properties["show"]).toBeDefined();
                    expect(objects[0].properties["show"]).toBe(false);

                });

            function verifyTitle(){
                var objects = v.enumerateObjectInstances({ objectName: "cardTitle" });
                expect(objects.length).toBe(1);
                expect(objects[0].properties["show"]).toBeDefined();
                expect(objects[0].properties["show"]).toBe(true);
            }

            function verifyLabels(color?: string, precision?: number, displayUnits?: number) {
                var objects = v.enumerateObjectInstances({ objectName: "labels" });
                var defaultLabelSettings = powerbi.visuals.dataLabelUtils.getDefaultLabelSettings();

                expect(objects.length).toBe(1);
                expect(objects[0].properties).toBeDefined();

                // Default values
                color = color ? color : Card.DefaultStyle.value.color;
                precision = precision ? precision : 0;
                displayUnits = displayUnits ? displayUnits : defaultLabelSettings.displayUnits;

                var properties = objects[0].properties;
                expect(properties["color"]).toBe(color);
                expect(properties["labelPrecision"]).toBe(precision);
                expect(properties["labelDisplayUnits"]).toBe(displayUnits);
            }
        });

    describe("Card DOM tests", () => {
        var v: Card, element: JQuery;
        var dataViewMetadata: powerbi.DataViewMetadata = {
            columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
            groups: [],
            measures: [0],
        };
        var cardStyles = Card.DefaultStyle.card;

        beforeEach(() => {
            createCard();
        });

        function createCard(displayUnitSystemType?: powerbi.DisplayUnitSystemType, isScrollable?: boolean): void {
            element = powerbitests.helpers.testDom('200', '300');
            v = <Card> new Card({ displayUnitSystemType: displayUnitSystemType, isScrollable: isScrollable});

            v.init({
                element: element,
                host: mocks.createVisualHostServices(),
                style: powerbi.visuals.visualStyles.create(),
                viewport: {
                    height: element.height(),
                    width: element.width()
                },
                animation: { transitionImmediate: true },
                isScrollable: isScrollable
            });
        }

        it('Card_getAdjustedFontHeight with seed font size fitting in available width but equal/larger than MaxFontSize', () => {
            v.currentViewport = {
                height: 500,
                width: 500
            };
            expect(v.getAdjustedFontHeight(v.currentViewport.width, "t", cardStyles.maxFontSize)).toBe(cardStyles.maxFontSize);
            expect(v.getAdjustedFontHeight(v.currentViewport.width, "t", cardStyles.maxFontSize + 5)).toBe(cardStyles.maxFontSize);
        });

        it('Card_getAdjustedFontHeight with seed font size not fitting in available width and smaller than MaxFontSize', () => {
            v.currentViewport = {
                height: 30,
                width: 30
            };
            expect(v.getAdjustedFontHeight(v.currentViewport.width, "t", cardStyles.maxFontSize)).toBeLessThan(cardStyles.maxFontSize);
        });

        it('Card_onDataChanged (single value)', () => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: '7191394482447.7'
                    }
                }]
            });

            v.onResizing({
                height: element.height(),
                width: element.width()
            });

            expect($('.card')).toBeInDOM();
            expect($('.mainText')).toBeInDOM();
            var titleText = $('.card').find('title').text();
            expect(titleText).toBe('7191394482447.7');
        });

        it('Card_onDataChanged (0)', () => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 0
                    }
                }]
            });

            expect($('.card')).toBeInDOM();
            expect($('.mainText')).toBeInDOM();
            var titleText = $('.card').find('title').text();
            expect(titleText).toBe('0');
        });

        it('Card with null dataview', (done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 0
                    }
                }]
            });

            setTimeout(() => {
                expect($('.mainText').first().text()).toBe('0');
                v.onDataChanged({
                    dataViews: [{
                        metadata: dataViewMetadata,
                        single: {
                            value: null
                        }
                    }]
                });
                setTimeout(() => {
                    expect($('.mainText').first().text()).toBe('(Blank)');
                    done();
                }, DefaultWaitForRender);

            }, DefaultWaitForRender);
        });

        it('Card updated with undefined dataview', (done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 0
                    }
                }]
            });

            setTimeout(() => {
                expect($('.mainText').first().text()).toBe('0');
                v.onDataChanged({
                    dataViews: [{
                        metadata: dataViewMetadata,
                        single: {
                            value: undefined
                        }
                    }]
                });
                setTimeout(() => {
                    expect($('.mainText').first().text()).toBe('');
                    done();
                }, DefaultWaitForRender);

            }, DefaultWaitForRender);
        });

        it('Card_onDataChanged formats number < 10000', (done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 85.23498239847123
                    }
                }]
            });

            expect($('.card')).toBeInDOM();
            expect($('.mainText')).toBeInDOM();
            SVGUtil.flushAllD3Transitions();
            setTimeout(() => {
                expect($('.mainText').text()).toEqual('85');
                done();
            }, DefaultWaitForRender);
        });

        it('Card_onDataChanged verbose display units (explore mode)', (done) => {
            createCard(powerbi.DisplayUnitSystemType.Verbose);

            var spy = spyOn(powerbi.visuals.valueFormatter, 'create');
            spy.and.callThrough();

            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 900000
                    }
                }]
            });

            expect($('.card')).toBeInDOM();
            expect($('.mainText')).toBeInDOM();
            setTimeout(() => {
                expect(spy.calls.count()).toBe(1);

                var args = spy.calls.argsFor(0);
                expect(args).toBeDefined();

                expect(args[0].displayUnitSystemType).toBe(powerbi.DisplayUnitSystemType.Verbose);
                done();
            }, DefaultWaitForRender);
        });

        it('Card_onDataChanged whole display units (dashboard tile mode, default)', (done) => {
            var spy = spyOn(powerbi.visuals.valueFormatter, 'create');
            spy.and.callThrough();

            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 900000
                    }
                }]
            });

            expect($('.card')).toBeInDOM();
            expect($('.mainText')).toBeInDOM();
            setTimeout(() => {
                expect(spy.calls.count()).toBe(1);

                var args = spy.calls.argsFor(0);
                expect(args).toBeDefined();

                expect(args[0].displayUnitSystemType).toBe(powerbi.DisplayUnitSystemType.WholeUnits);
                done();
            }, DefaultWaitForRender);
        });

        it('Card with DateTime value on dashboard',(done) => {
            var dateValue = new Date(2015, 5, 20);
            var dataViewMetadata: powerbi.DataViewMetadata = {
                columns: [
                    { displayName: 'date', type: powerbi.ValueType.fromDescriptor({ dateTime: true }), isMeasure: true }
                ],
            };
            v.init({
                element: element,
                host: mocks.createVisualHostServices(),
                style: powerbi.visuals.visualStyles.create(),
                viewport: {
                    height: element.height(),
                    width: element.width()
                },
            });
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: dateValue
                    }
                }]
            });

            setTimeout(() => {
                expect($('.mainText').first().text()).toBe('6/20/2015');
                var transform = SVGUtil.parseTranslateTransform($('.mainText').first().attr('transform'));
                expect(transform.x).toBe('150');
                expect(transform.y).toBe('130');
                done();
            }, DefaultWaitForRender);
        });

        it('Card text alignment',(done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 900000
                    }
                }]
            });

            var smallTileViewport = {
                height: 170,
                width: 250
            };

            v.onResizing(smallTileViewport);

            setTimeout(() => {
                var transform = SVGUtil.parseTranslateTransform($('.mainText').first().attr('transform'));
                expect(transform.x).toBe('125');
                expect($('.mainText').first().attr('text-anchor')).toBe('middle');
                done();
            }, DefaultWaitForRender);
        });

        it('card label on', (done) => {

            createCard(null, true);
            var metadata: powerbi.DataViewMetadata = {
                columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
                groups: [],
                measures: [0],
                objects: {
                    cardTitle: {
                        show: true
                    }
                }
            };

            v.onDataChanged({
                dataViews: [{
                    metadata: metadata,
                    single: {
                        value: '7191394482447.7'
                    }
                }]
            });

            setTimeout(() => {
                expect($('.label')[0]).toBeDefined();
                expect($('.label')[0].textContent).toBe('col1');
                done();
            }, DefaultWaitForRender);
        });

        it('card label off', (done) => {

            createCard(null, true);
            var metadata: powerbi.DataViewMetadata = {
                columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
                groups: [],
                measures: [0],
                objects: {
                    cardTitle: {
                        show: false
                    }
                }
            };

            v.onDataChanged({
                dataViews: [{
                    metadata: metadata,
                    single: {
                        value: '7191394482447.7'
                    }
                }]
            });

            setTimeout(() => {
                expect($('.label')[0]).toBeUndefined();
                done();
            }, DefaultWaitForRender);
        });

        it('change color', (done) => {
            createCard(null, true);
            var metadata: powerbi.DataViewMetadata = {
                columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
                groups: [],
                measures: [0],
                objects: {
                    labels: {
                        color: { solid: { color: '#222222' } },
                        labelPrecision: 3,
                        labelDisplayUnits: 1000
                    },
                    cardTitle: {
                        show: true
                    }
                }
            };

            v.onDataChanged({
                dataViews: [{
                    metadata: metadata,
                    single: {
                        value: '7191394482447.7'
                    }
                }]
            });

            setTimeout(() => {
                expect($('.card .value').css('fill')).toBe('#222222');
                done();
            }, DefaultWaitForRender);
        });

        it('change precision', (done) => {
            createCard(null, true);

            var metadata: powerbi.DataViewMetadata = {
                columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
                groups: [],
                measures: [0],
                objects: {
                    labels: {
                        labelPrecision: 3,
                        labelDisplayUnits: 1000
                    },
                    cardTitle: {
                        show: true
                    }
                }
            };

            v.onDataChanged({
                dataViews: [{
                    metadata: metadata,
                    single: {
                        value: '7'
                    }
                }]
            });

            setTimeout(() => {
                expect($('.card .value')[0].textContent).toBe('0.007K');
                done();
            }, DefaultWaitForRender);
        });

        it('change display unit', (done) => {
            createCard(null, true);

            var metadata: powerbi.DataViewMetadata = {
                columns: [{ displayName: 'col1', isMeasure: true, objects: { 'general': { formatString: '#0' } } }],
                groups: [],
                measures: [0],
                objects: {
                    labels: {
                        labelDisplayUnits: 1000
                    },
                    cardTitle: {
                        show: true
                    }
                }
            };

            v.onDataChanged({
                dataViews: [{
                    metadata: metadata,
                    single: {
                        value: '2500'
                    }
                }]
            });

            setTimeout(() => {
                expect($('.card .value')[0].textContent).toBe('3K');
                done();
            }, DefaultWaitForRender);
        });
    });

    describe("Card tests on Minerva",() => {
        var v: Card, element: JQuery;
        var dataViewMetadata: powerbi.DataViewMetadata = {
            columns: [{ displayName: 'col1', isMeasure: true, format: '#0' }],
            groups: [],
            measures: [0],
        };

        var labelStyles = Card.DefaultStyle.label;
        var valueStyles = Card.DefaultStyle.value;

        beforeEach(() => {
            createCardOnMinerva();
        });

        function createCardOnMinerva(displayUnitSystemType?: powerbi.DisplayUnitSystemType): void {
            element = powerbitests.helpers.testDom('200', '300');
            v = <Card> powerbi.visuals.visualPluginFactory.createMinerva({}).getPlugin('card').create();

            var settings;

            if (displayUnitSystemType) {
                settings = {
                    DisplayUnitSystemType: displayUnitSystemType
                };
            }

            v.init({
                element: element,
                host: mocks.createVisualHostServices(),
                style: powerbi.visuals.visualStyles.create(),
                viewport: {
                    height: element.height(),
                    width: element.width()
                },
                settings: settings,
            });
        }

        it('Card on Canvas DOM validation',(done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 90
                    }
                }]
            });

            setTimeout(() => {
                expect($('.card')).toBeInDOM();
                expect($('.label')).toBeInDOM();
                expect($('.value')).toBeInDOM();
                expect($('.label').length).toBe(1);
                expect($('.value').length).toBe(1);
                expect($('.label').first().text()).toBe('col1');
                expect($('.value').first().text()).toBe('90');
                done();
            }, DefaultWaitForRender);
        });

        it('Card on Canvas Style validation',(done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 900000
                    }
                }]
            });

            setTimeout(() => {
                expect($('.label')).toBeInDOM();
                expect($('.value')).toBeInDOM();
                expect(parseInt($('.label')[0].style.fontSize, 10)).toBe(labelStyles.fontSize);
                expect(parseInt($('.value')[0].style.fontSize, 10)).toBe(valueStyles.fontSize);
                expect($('.label')[0].style.fill).toBe(labelStyles.color);
                expect($('.value')[0].style.fill).toBe(valueStyles.color);
                expect($('.value')[0].style.fontFamily).toBe(valueStyles.fontFamily);
                done();
            }, DefaultWaitForRender);
        });

        it('Card with DateTime value on canvas',(done) => {
            var dateValue = new Date(2015, 5, 20);
            var dataViewMetadata: powerbi.DataViewMetadata = {
                columns: [
                    { displayName: 'date', type: powerbi.ValueType.fromDescriptor({ dateTime: true }), isMeasure: true }
                ],
            };
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: dateValue
                    }
                }]
            });

            setTimeout(() => {
                expect($('.label').first().text()).toBe('date');
                expect($('.value').first().text()).toBe('6/20/2015');
                done();
            }, DefaultWaitForRender);
        });

        it('Card with zero currency value',(done) => {
            var dataViewMetadata: powerbi.DataViewMetadata = {
                columns: [
                    { displayName: 'price', type: powerbi.ValueType.fromDescriptor({ numeric: true }), isMeasure: true, objects: { 'general': { formatString: '$0' } } }
                ],
            };
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 0
                    }
                }]
            });

            setTimeout(() => {
                expect($('.label').first().text()).toBe('price');
                expect($('.value').first().text()).toBe('$0');
                done();
            }, DefaultWaitForRender);
        });

        it('Card with null dataview',(done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 900
                    }
                }]
            });

            setTimeout(() => {
                expect($('.value').first().text()).toBe('900');
                expect($('.label').first().text()).toBe('col1');
                v.onDataChanged({
                    dataViews: [{
                        metadata: dataViewMetadata,
                        single: {
                            value: null
                        }
                    }]
                });
                setTimeout(() => {
                    expect($('.value').first().text()).toBe('(Blank)');
                    expect($('.label').first().text()).toBe('col1');
                    done();
                }, DefaultWaitForRender);

            }, DefaultWaitForRender);
        });

        it('Card updated with undefined dataview', (done) => {
            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: 0
                    }
                }]
            });

            setTimeout(() => {
                expect($('.value').first().text()).toBe('0');
                expect($('.label').first().text()).toBe('col1');
                v.onDataChanged({
                    dataViews: [{
                        metadata: dataViewMetadata,
                        single: {
                            value: undefined
                        }
                    }]
                });
                setTimeout(() => {
                    expect($('.value').first().text()).toBe('');
                    expect($('.label').first().text()).toBe('');
                    done();
                }, DefaultWaitForRender);

            }, DefaultWaitForRender);
        });

        it('card with longer label and value', (done) => {
            var dataViewMetadata: powerbi.DataViewMetadata = {
                columns: [{ displayName: 'this is the value that never ends, it just goes on and on my friends. Some axis started rendering it not knowing what it was, and now it keeps on rendering forever just because this the label that never ends', isMeasure: true, format: '#0' }],
                groups: [],
                measures: [0],
            };

            v.onDataChanged({
                dataViews: [{
                    metadata: dataViewMetadata,
                    single: {
                        value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
                    }
                }]
            });

            setTimeout(() => {
                // Note: the exact text will be different depending on the environment in which the test is run, so we can't do an exact match.
                // Just check that the text is truncated with ellipses.
                var labelText = $('.label').first().text();
                var valueText = $('.value').first().text();
                expect(labelText.length).toBeLessThan(60);
                expect(valueText.length).toBeLessThan(30);
                expect(valueText.substr(valueText.length - 3)).toBe('...');
                expect(labelText.substr(labelText.length - 3)).toBe('...');

                done();
            }, DefaultWaitForRender);
        });

    });
}


text:
package modules

import (
	"net"

	"github.com/rivine/rivine/build"
)

const (
	// GatewayDir is the name of the directory used to store the gateway's
	// persistent data.
	GatewayDir = "gateway"
)

type (
	// Peer contains all the info necessary to Broadcast to a peer.
	Peer struct {
		Inbound    bool       `json:"inbound"`
		Local      bool       `json:"local"`
		NetAddress NetAddress `json:"netaddress"`
		// Rivine Protocol Version used by peer
		Version build.ProtocolVersion `json:"version"`
	}

	// A PeerConn is the connection type used when communicating with peers during
	// an RPC. It is identical to a net.Conn with the additional RPCAddr method.
	// This method acts as an identifier for peers and is the address that the
	// peer can be dialed on. It is also the address that should be used when
	// calling an RPC on the peer.
	PeerConn interface {
		net.Conn
		RPCAddr() NetAddress
	}

	// RPCFunc is the type signature of functions that handle RPCs. It is used for
	// both the caller and the callee. RPCFuncs may perform locking. RPCFuncs may
	// close the connection early, and it is recommended that they do so to avoid
	// keeping the connection open after all necessary I/O has been performed.
	RPCFunc func(PeerConn) error

	// A Gateway facilitates the interactions between the local node and remote
	// nodes (peers). It relays incoming blocks and transactions to local modules,
	// and broadcasts outgoing blocks and transactions to peers. In a broad sense,
	// it is responsible for ensuring that the local consensus set is consistent
	// with the "network" consensus set.
	Gateway interface {
		// Connect establishes a persistent connection to a peer.
		Connect(NetAddress) error

		// Disconnect terminates a connection to a peer.
		Disconnect(NetAddress) error

		// Address returns the Gateway's address.
		Address() NetAddress

		// Peers returns the addresses that the Gateway is currently connected to.
		Peers() []Peer

		// RegisterRPC registers a function to handle incoming connections that
		// supply the given RPC ID.
		RegisterRPC(string, RPCFunc)

		// UnregisterRPC unregisters an RPC and removes all references to the RPCFunc
		// supplied in the corresponding RegisterRPC call. References to RPCFuncs
		// registered with RegisterConnectCall are not removed and should be removed
		// with UnregisterConnectCall. If the RPC does not exist no action is taken.
		UnregisterRPC(string)

		// RegisterConnectCall registers an RPC name and function to be called
		// upon connecting to a peer.
		RegisterConnectCall(string, RPCFunc)

		// UnregisterConnectCall unregisters an RPC and removes all references to the
		// RPCFunc supplied in the corresponding RegisterConnectCall call. References
		// to RPCFuncs registered with RegisterRPC are not removed and should be
		// removed with UnregisterRPC. If the RPC does not exist no action is taken.
		UnregisterConnectCall(string)

		// RPC calls an RPC on the given address. RPC cannot be called on an
		// address that the Gateway is not connected to.
		RPC(NetAddress, string, RPCFunc) error

		// Broadcast transmits obj, prefaced by the RPC name, to all of the
		// given peers in parallel.
		Broadcast(name string, obj interface{}, peers []Peer)

		// Online returns true if the gateway is connected to remote hosts
		Online() bool

		// Close safely stops the Gateway's listener process.
		Close() error
	}
)


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

<title>LoadParams (JxBrowser 6.12 API)</title>
<meta name="date" content="2017-01-31">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.teamdev.jxbrowser.chromium

Class LoadParams

java.lang.Object

com.teamdev.jxbrowser.chromium.LoadParams

public final class LoadParams
extends java.lang.Object

Contains information about load event.

Nested Class Summary

Nested Classes

Modifier and Type
Class and Description

static class
LoadParams.LoadPolicy

static class
LoadParams.LoadType

Constructor Summary

Constructors

Constructor and Description

LoadParams(java.lang.String url,
          LoadParams.LoadType type,
          LoadParams.LoadPolicy policy,
          boolean redirect)

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

LoadParams.LoadPolicy
getPolicy()

LoadParams.LoadType
getType()

java.lang.String
getURL()

boolean
isRedirect()

java.lang.String
toString()

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LoadParams

public LoadParams(java.lang.String url,
                  LoadParams.LoadType type,
                  LoadParams.LoadPolicy policy,
                  boolean redirect)

Method Detail

getURL

public java.lang.String getURL()

getType

public LoadParams.LoadType getType()

getPolicy

public LoadParams.LoadPolicy getPolicy()

isRedirect

public boolean isRedirect()

toString

public java.lang.String toString()

Overrides:

toString in class java.lang.Object

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
<?php

/**
 * @file
 * Contains \Drupal\views\Tests\Plugin\DisplayFeedTest.
 */

namespace Drupal\views\Tests\Plugin;

use Drupal\views\Views;

/**
 * Tests the feed display plugin.
 *
 * @group views
 * @see \Drupal\views\Plugin\views\display\Feed
 */
class DisplayFeedTest extends PluginTestBase {

  /**
   * Views used by this test.
   *
   * @var array
   */
  public static $testViews = array('test_display_feed', 'test_attached_disabled', 'test_feed_icon');

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = array('block', 'node', 'views');

  protected function setUp() {
    parent::setUp();

    $this->enableViewsTestModule();

    $admin_user = $this->drupalCreateUser(array('administer site configuration'));
    $this->drupalLogin($admin_user);
  }

  /**
   * Tests the rendered output.
   */
  public function testFeedOutput() {
    $this->drupalCreateContentType(['type' => 'page']);

    // Verify a title with HTML entities is properly escaped.
    $node_title = 'This "cool" & "neat" article\'s title';
    $node = $this->drupalCreateNode([
      'title' => $node_title,
      'body' => [0 => [
        'value' => 'A paragraph',
        'format' => filter_default_format(),
      ]],
    ]);

    // Test the site name setting.
    $site_name = $this->randomMachineName();
    $this->config('system.site')->set('name', $site_name)->save();

    $this->drupalGet('test-feed-display.xml');
    $result = $this->xpath('//title');
    $this->assertEqual($result[0], $site_name, 'The site title is used for the feed title.');
    $this->assertEqual($result[1], $node_title, 'Node title with HTML entities displays correctly.');
    // Verify HTML is properly escaped in the description field.
    $this->assertRaw('
A paragraph
');

    $view = $this->container->get('entity.manager')->getStorage('view')->load('test_display_feed');
    $display = &$view->getDisplay('feed_1');
    $display['display_options']['sitename_title'] = 0;
    $view->save();

    $this->drupalGet('test-feed-display.xml');
    $result = $this->xpath('//title');
    $this->assertEqual($result[0], 'test_display_feed', 'The display title is used for the feed title.');

    // Add a block display and attach the feed.
    $view->getExecutable()->newDisplay('block', NULL, 'test');
    $display = &$view->getDisplay('feed_1');
    $display['display_options']['displays']['test'] = 'test';
    $view->save();
    // Test the feed display adds a feed icon to the block display.
    $this->drupalPlaceBlock('views_block:test_display_feed-test');
    $this->drupalGet('<front>');
    $feed_icon = $this->cssSelect('div.view-id-test_display_feed a.feed-icon');
    $this->assertTrue(strpos($feed_icon[0]['href'], 'test-feed-display.xml'), 'The feed icon was found.');

    // Test feed display attached to page display with arguments.
    $this->drupalGet('test-feed-icon/' . $node->id());
    $page_url = $this->getUrl();
    $icon_href = $this->cssSelect('a.feed-icon[href *= "test-feed-icon"]')[0]['href'];
    $this->assertEqual($icon_href, $page_url . '/feed', 'The feed icon was found.');
    $link_href = $this->cssSelect('link[type = "application/rss+xml"][href *= "test-feed-icon"]')[0]['href'];
    $this->assertEqual($link_href, $page_url . '/feed', 'The RSS link was found.');
    $feed_link = simplexml_load_string($this->drupalGet($icon_href))->channel->link;
    $this->assertEqual($feed_link, $page_url, 'The channel link was found.');
  }

  /**
   * Tests the rendered output for fields display.
   */
  public function testFeedFieldOutput() {
    $this->drupalCreateContentType(['type' => 'page']);

    // Verify a title with HTML entities is properly escaped.
    $node_title = 'This "cool" & "neat" article\'s title';
    $this->drupalCreateNode(array(
      'title' => $node_title,
      'body' => [0 => [
        'value' => 'A paragraph',
        'format' => filter_default_format(),
      ]],
    ));

    $this->drupalGet('test-feed-display-fields.xml');
    $result = $this->xpath('//title/a');
    $this->assertEqual($result[0], $node_title, 'Node title with HTML entities displays correctly.');
    // Verify HTML is properly escaped in the description field.
    $this->assertRaw('
A paragraph
');
  }

  /**
   * Tests that nothing is output when the feed display is disabled.
   */
  public function testDisabledFeed() {
    $this->drupalCreateContentType(['type' => 'page']);
    $this->drupalCreateNode();

    // Ensure that the feed_1 display is attached to the page_1 display.
    $view = Views::getView('test_attached_disabled');
    $view->setDisplay('page_1');
    $attached_displays = $view->display_handler->getAttachedDisplays();
    $this->assertTrue(in_array('feed_1', $attached_displays), 'The feed display is attached to the page display.');

    // Check that the rss header is output on the page display.
    $this->drupalGet('/test-attached-disabled');
    $feed_header = $this->xpath('//link[@rel="alternate"]');
    $this->assertEqual($feed_header[0]['type'], 'application/rss+xml', 'The feed link has the type application/rss+xml.');
    $this->assertTrue(strpos($feed_header[0]['href'], 'test-attached-disabled.xml'), 'Page display contains the correct feed URL.');

    // Disable the feed display.
    $view->displayHandlers->get('feed_1')->setOption('enabled', FALSE);
    $view->save();

    // Ensure there is no link rel present on the page.
    $this->drupalGet('/test-attached-disabled');
    $result = $this->xpath('//link[@rel="alternate"]');
    $this->assertTrue(empty($result), 'Page display does not contain a feed header.');

    // Ensure the feed attachment returns 'Not found'.
    $this->drupalGet('/test-attached-disabled.xml');
    $this->assertResponse(404);
  }

}


text:
using System.Collections.Generic;
using System.Text;

namespace Example.JSON.Model
{
    public class Connection
    {
        public Stop from { get; set; }
        public Stop to { get; set; }
        public string duration { get; set; }
        public int? transfers { get; set; }
        public Service service { get; set; }
        public List<string> products { get; set; }
        public int? capacity1st { get; set; }
        public int? capacity2nd { get; set; }
        public List<Section> sections { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(string.Format("From: {0}", this.from.location.name));
            sb.AppendLine(string.Format("To: {0}", this.to.location.name));
            sb.AppendFormat(string.Format("Travel time: {0}", this.duration));
            sb.AppendLine();

            return sb.ToString();
        }
    }
}


text:
  Le Mesnil-sous-Jumièges est
       un village
       situé dans le département de Seine-Maritime en Haute-Normandie. On dénombrait 627 habitants en 2008.

À Le Mesnil-sous-Jumièges, la valorisation moyenne à la vente d'un appartement s'évalue à zero € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 2 320 € du m². À la location le prix moyen se situe à 0 € du m² par mois.

À proximité de Le Mesnil-sous-Jumièges sont situées les villes de
Yville-sur-Seine localisée à 2 km, 431 habitants,
La Trinité-de-Thouberville à 5 km, 412 habitants,
Saint-Pierre-de-Manneville localisée à 5 km, 728 habitants,
Heurteauville située à 5 km, 308 habitants,
Le Landin localisée à 4 km, 160 habitants,
Jumièges à 3 km, 1 715 habitants,
 entre autres. De plus, Le Mesnil-sous-Jumièges est située à seulement 17 km de Rouen.

La commune compte quelques  équipements sportifs, elle propose entre autres un terrain de sport.

Le parc d'habitations, à Le Mesnil-sous-Jumièges, était réparti en 2011 en 33 appartements et 234 maisons soit
 un marché relativement équilibré.

Si vous pensez demenager à Le Mesnil-sous-Jumièges, vous pourrez aisément trouver une maison à vendre.


text:
<? $this->load->view('includes/hotjar');?>

                                    <img alt="" title="" src='<?=base_url()?>images/home/week-22-june/HP_02_Jeans.jpg' width="100%" style="" />

SALE

Online and in-store

                                     up to 20% off on selected denim

                                        <a class="button-links" href="<?=base_url()?>man/sale-denim">Shop for him
                                        <a class="button-links" href="<?=base_url()?>woman/sale-denim">Shop for her

		<?php if(!empty($landing_products)):?>

					<?php foreach($landing_products as $curr_product):
                                $cat = '';
                                if($curr_product['L2'] == 'man'):
                                $cat = 'men';
                                elseif($curr_product['L2'] == 'woman'):
                                $cat = 'women';
                                endif;
                                // product url:
                                if($curr_product['L4'] == 'denim'){
                                $prod_cat = $curr_product['L5'];
                                }else{
                                $prod_cat = $curr_product['L4'];
                                }
                                $url = base_url().'product/details/'.$prod_cat.'/'.clean_string($curr_product['disp_name']).'/'.$curr_product['style'].'/'.$curr_product['color'];
                                /*if(!empty($curr_product['prod_images'])){
                                    $image_path = get_image_path($curr_product['prod_images']['image_path'],$curr_product['style']);
                                }else{
                                    $image_path = base_url().'images/sublisting/prod_no_image.jpg';
                                }*/
								$img_name_old = $curr_product['prod_images']['image_path'];
								$img_name= substr($img_name_old, 0, -5);
								$image_path1 = get_prod_img($img_name,'detail');
								if(is_url_exist($image_path1.'F.jpg')){
									$image_path = get_prod_img($img_name.'F.jpg','detail');
								}else if(is_url_exist($image_path1.'D.jpg')){
									$image_path = get_prod_img($img_name.'D.jpg','detail');
								}else if(is_url_exist($image_path1.'D.jpg')){
									$image_path = get_prod_img($img_name.'D.jpg','detail');
								}else if(is_url_exist($image_path1.'E.jpg')){
									$image_path = get_prod_img($img_name.'E.jpg','detail');
								}else if(is_url_exist($image_path1.'R.jpg')){
									$image_path = get_prod_img($img_name.'R.jpg','detail');
								}else if(is_url_exist($image_path1.'A.jpg')){
									$image_path = get_prod_img($img_name.'A.jpg','detail');
								}else if(is_url_exist($image_path1.'O.jpg')){
									$image_path = get_prod_img($img_name.'O.jpg','detail');
								}else if(is_url_exist($image_path1.'B.jpg')){
									$image_path = get_prod_img($img_name.'B.jpg','detail');
								}else{
                                    $image_path = base_url().'images/sublisting/prod_no_image.jpg';
                                }
                            ?>

								<img itemprop="image" class="primary-image" data-altimg="<?=$image_path;?>" src="<?=$image_path;?>" alt="<?=$curr_product['disp_name'];?>
								" />

<?=$cat?>

<?=$curr_product['disp_name'];?>

												$<?php if($curr_product['max_price_sale'] != '' && $curr_product['max_price_sale'] != '0') { echo $curr_product['max_price_sale']; } else { echo $curr_product['max_price']; } ?>

										<a class="button-theme" href="<?=$url;?>">buy

							<?if(ENVIRONMENT == 'production' || ENVIRONMENT == 'development' || ENVIRONMENT == 'testing'): ?>

						   <?endif;?>

					<?php endforeach;?>

		<?php endif; ?>
		<?if(ENVIRONMENT == 'production' || ENVIRONMENT == 'development' || ENVIRONMENT == 'testing'): ?>

          <?endif;?>

				<img alt="" title="" src='<?=base_url()?>images/home/week-22-june/HP03_jeans.jpg' />

SHOES SALE

				30% OFF ON SELECTED FOOTWEAR

                    <a class="button-links" href="<?=base_url()?>man/sale-accessories">Shop for him
                    <a class="button-links" href="<?=base_url()?>woman/sale-accessories">Shop for her

								<img alt="Watches" title="Watches" src='<?=base_url()?>images/home/HP_03_Watches.jpg' /> <a class="full-img-link" href="<?=base_url().'product/mens/watches'?>" alt="Shop Men's Watches">Explore

WATCHES

							Sync it up and strap it on, because size matters.

							<a href="<?=base_url().'product/mens/watches'?>">SHOP NOW

								<img alt=Shoes" title="Shoes" src='<?=base_url()?>images/home/HP_04_Shoes.jpg' /> <a class="full-img-link" href="<?=base_url().'product/mens/footwear'?>" alt="Shoes">Explore

NEW-KICKS

							From sneakers to boots, these shoes are made for walking.

							<a href="<?=base_url()?>product/mens/footwear">SHOP NOW

								<img alt="Perfume" title="Perfume" src='<?=base_url()?>images/home/HP_05_Perfume.jpg' /> <a class="full-img-link" href="<?=base_url().'product/mens/fragrances'?>" alt="Perfume">Explore

PERFUME

							Incredible scents. Great gifts. For him and her.

							<a href="<?=base_url().'product/mens/fragrances'?>">SHOP NOW

				Your browser's Javascript functionality is turned off. Please turn it on so that you can experience the full capabilities of this site.


text:
from django.conf.urls import patterns

urlpatterns = patterns('',
	(r'^url/$', 'phlogiston.views.urls'),
)

# Copyright 2014 Trevor F. Smith (http://trevor.smith.name/)  Some rights reserved: http://opensource.org/licenses/MIT


text:
package localhost.biblioteca.servlets;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import localhost.biblioteca.dao.EditoraDAO;
import localhost.biblioteca.entidades.Editora;

public class ServletEditora implements ServletPost
{
	@Override
	public void post(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		String cmd = request.getParameter("cmd");

		Editora editora = new Editora(request);
		EditoraDAO dao = new EditoraDAO(request);

		if (cmd.equals("Buscar por ID"))
		{
			request.setAttribute("editora", dao.selecionar(editora.getId()));
			request.getRequestDispatcher("index.jsp?page=editora&menu=alterar").forward(request, response);
		}

		else if (cmd.equals("Buscar por Nome"))
		{
			request.setAttribute("editora", dao.selecionar(editora.getNome()));
			request.getRequestDispatcher("index.jsp?page=editora&menu=alterar").forward(request, response);
		}

		else if (cmd.equals("Adicionar"))
		{
			if (dao.inserir(editora))
				request.setAttribute("success", String.format("editora '%s' adicionada com êxito", editora.getNome()));
			else
				request.setAttribute("info", String.format("falha ao adicionar editora '%s'", editora.getNome()));

			request.getRequestDispatcher("index.jsp?page=editora").forward(request, response);
		}

		else if (cmd.equals("Salvar"))
		{
			if (dao.atualizar(editora))
				request.setAttribute("success", String.format("editora '%s' salva com êxito", editora.getNome()));
			else
				request.setAttribute("info", String.format("falha ao salvar editora '%s'", editora.getNome()));

			request.getRequestDispatcher("index.jsp?page=editora").forward(request, response);
		}

		else if (cmd.equals("Voltar"))
			request.getRequestDispatcher("index.jsp").forward(request, response);

		else
		{
			request.setAttribute("error", "comando inválido");
			request.getRequestDispatcher("index.jsp").forward(request, response);
		}
	}
}


text:
/*
 * Interactive Coffee Table library
 * For controling features of the Arduino interative coffee table.
 *
 * Interactive Coffee Table
 * Dan Nixon, dan-nixon.com
 * 20/06/2014
 */

#include <InteractiveCoffeeTable.h>

/*
 * Pin config arrays
 */
uint8_t button_pins[NUM_BUTTONS] =
{
  PIN_BUTTON_UP,    PIN_BUTTON_DOWN,
  PIN_BUTTON_LEFT,  PIN_BUTTON_RIGHT,
  PIN_BUTTON_RED,   PIN_BUTTON_BLUE
};

uint8_t led_pins[NUM_LEDS] =
{
  PIN_LED_ORANGE,
  PIN_LED_GREEN
};

uint8_t control_pins[NUM_CONTROLS] =
{
  PIN_AMP_POWER,
  PIN_BLUETOOTH_POWER,
  PIN_AUDIO_SIGNAL
};

InteractiveCoffeeTable::InteractiveCoffeeTable()
{
  uint8_t i;

  buttonDebounceDelay = DEFAULT_BUTTON_DEBOUNCE_MS;
  buttonCallback = NULL;

  /*
   * Setup LED matrix object
   */
  matrix = new LedControl(
      PIN_MATRIX_DATA, PIN_MATRIX_CLOCK, PIN_MATRIX_LOAD,
      NUM_MATRIX_DRIVERS
    );

  for(i = 0; i < NUM_MATRIX_DRIVERS; i++)
  {
    matrix->shutdown(i, 0);
    matrix->setIntensity(i, 8);
    matrix->clearDisplay(i);
  }

  /*
   * Setup 20x4 LCD
   */
  lcd[LCD_20X4] = new LiquidCrystal(
      LCD_20X4_RS, LCD_20X4_EN,
      LCD_20X4_D4, LCD_20X4_D5, LCD_20X4_D6, LCD_20X4_D7
    );
  lcd[LCD_20X4]->begin(20, 4);

  /*
   * Setup 40x2 LCD
   */
  lcd[LCD_40X2] = new LiquidCrystal(
      LCD_40X2_RS, LCD_40X2_EN,
      LCD_40X2_D4, LCD_40X2_D5, LCD_40X2_D6, LCD_40X2_D7
    );
  lcd[LCD_40X2]->begin(40, 2);

  /*
   * Configure button pins
   */
  for(i = 0; i < NUM_BUTTONS; i++)
  {
    pinMode(button_pins[i], INPUT);
    digitalWrite(button_pins[i], HIGH);
  }

  /*
   * Configure LED pins
   */
  for(i = 0; i < NUM_LEDS; i++)
  {
    pinMode(led_pins[i], OUTPUT);
    digitalWrite(led_pins[i], LOW);
  }

  /*
   * Configure controls pins
   */
  for(i = 0; i < NUM_CONTROLS; i++)
  {
    pinMode(control_pins[i], OUTPUT);
    digitalWrite(control_pins[i], LOW);
  }
}

InteractiveCoffeeTable::~InteractiveCoffeeTable()
{
  uint8_t i;

  delete matrix;
  delete lcd;
}

/*
 * Get the last recorded state of a button
 */
uint8_t InteractiveCoffeeTable::getButtonState(ICT_Button button)
{
  return lastButtonState[button];
}

/*
 * Set the function to call when a button change is detected
 */
void InteractiveCoffeeTable::setButtonCallback(
    void (* callback)(ICT_Button button, uint8_t state))
{
  buttonCallback = callback;
}

/*
 * Get the current setting for the button debounce time
 */
uint16_t InteractiveCoffeeTable::getButtonDebounceTime()
{
  return buttonDebounceDelay;
}

/*
 * Set the button debounce delay time
 */
void InteractiveCoffeeTable::setButtonDebounceTime(uint16_t time)
{
  buttonDebounceDelay = time;
}

/*
 * Update the button states and call handler function if needed
 */
void InteractiveCoffeeTable::pollButtons()
{
  uint8_t i;
  for(i = 0; i < NUM_BUTTONS; i++)
  {
    if((millis() - lastButtonEdgeTime[i]) >= buttonDebounceDelay)
    {
      uint8_t state = !digitalRead(button_pins[i]);
      if(state != lastButtonState[i])
      {
        if(buttonCallback != NULL)
          buttonCallback((ICT_Button) i, state);
        lastButtonState[i] = state;
        lastButtonEdgeTime[i] = millis();
      }
    }
  }
}

/*
 * Reads the state of an LED
 */
uint8_t InteractiveCoffeeTable::getLEDState(ICT_LED led)
{
  return digitalRead(led_pins[led]);
}

/*
 * Sets the state of an LED
 */
void InteractiveCoffeeTable::setLED(ICT_LED led, uint8_t state)
{
  digitalWrite(led_pins[led], state);
}

/*
 * Reads the state of an aux control
 */
uint8_t InteractiveCoffeeTable::getControlState(ICT_Control control)
{
  return digitalRead(control_pins[control]);
}

/*
 * Sets the state of an aux control
 */
void InteractiveCoffeeTable::setControl(ICT_Control control, uint8_t state)
{
  digitalWrite(control_pins[control], state);
}

/*
 * Display text on a given LCD at a spcified start position
 */
void InteractiveCoffeeTable::lcdPrint(
    ICT_LCD lcd, uint8_t row, uint8_t column, char *text)
{
  this->lcd[lcd]->setCursor(column, row);
  this->lcd[lcd]->print(text);
}

/*
 * Clear text displayed on a given LCD
 */
void InteractiveCoffeeTable::lcdClear(ICT_LCD lcd)
{
  this->lcd[lcd]->clear();
}

/*
 * Clears the LED matrix
 */
void InteractiveCoffeeTable::matrixClear()
{
  uint8_t i;
  for(i = 0; i < NUM_MATRIX_DRIVERS; i++)
  {
    matrix->clearDisplay(i);
  }
}

/*
 * Sets all LEDs on matrix on
 */
void InteractiveCoffeeTable::matrixFullOn()
{
  uint8_t i, j;

  for(i = 0; i < NUM_MATRIX_DRIVERS; i++)
  {
    for(j = 0; j < NUM_MATRIX_DRIVER_ROW_COL; j++)
    {
      matrixSetRow(i, j, MATRIX_ROW_FULL);
    }
  }
}

/*
 * Sets the value of a row on a given driver on the LED matrix
 * Note that rows are oriented vertically on my hardware design
 */
void InteractiveCoffeeTable::matrixSetRow(
    uint8_t address, uint8_t row, uint8_t rowData)
{
  matrix->setRow(address, row, rowData);
}

/*
 * Sets LED at a given coordinate indexed from 0 from the bottom left of
 * the matrix
 * Note that this is a slow way to address many LEDs, use matrixSetRow for
 * fast drawing
 */
void InteractiveCoffeeTable::matrixSetPixel(
    uint8_t x, uint8_t y, uint8_t state)
{
  if((x >= NUM_MATRIX_ROW_COL) || (y >= NUM_MATRIX_ROW_COL))
    return;

  uint8_t outputX = NUM_MATRIX_DRIVER_ROW_COL - (y % NUM_MATRIX_DRIVER_ROW_COL) - 1;
  uint8_t outputY = x % NUM_MATRIX_DRIVER_ROW_COL;

  uint8_t address;
  if((y / NUM_MATRIX_DRIVER_ROW_COL) && (x / NUM_MATRIX_DRIVER_ROW_COL))
  {
    address = 1;
  }
  else if(y / NUM_MATRIX_DRIVER_ROW_COL)
  {
    address = 0;
  }
  else if(x / NUM_MATRIX_DRIVER_ROW_COL)
  {
    address = 3;
  }
  else
  {
    address = 2;
  }

  matrix->setLed(address, outputY, outputX, state);
}


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

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *

 * Contains the output of DescribeTerminationPolicyTypes.
 *

 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeTerminationPolicyTypesResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable,
        Cloneable {

    /**
     *

     * The termination policies supported by Auto Scaling (OldestInstance,
     * OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and
     * Default).
     *

     */
    private com.amazonaws.internal.SdkInternalList<String> terminationPolicyTypes;

    /**
     *

     * The termination policies supported by Auto Scaling (OldestInstance,
     * OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and
     * Default).
     *

     *
     * @return The termination policies supported by Auto Scaling (OldestInstance,
     *         OldestLaunchConfiguration, NewestInstance,
     *         ClosestToNextInstanceHour, and Default).
     */

    public java.util.List<String> getTerminationPolicyTypes() {
        if (terminationPolicyTypes == null) {
            terminationPolicyTypes = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return terminationPolicyTypes;
    }

    /**
     *

     * The termination policies supported by Auto Scaling (OldestInstance,
     * OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and
     * Default).
     *

     *
     * @param terminationPolicyTypes
     *        The termination policies supported by Auto Scaling (OldestInstance,
     *        OldestLaunchConfiguration, NewestInstance,
     *        ClosestToNextInstanceHour, and Default).
     */

    public void setTerminationPolicyTypes(java.util.Collection<String> terminationPolicyTypes) {
        if (terminationPolicyTypes == null) {
            this.terminationPolicyTypes = null;
            return;
        }

        this.terminationPolicyTypes = new com.amazonaws.internal.SdkInternalList<String>(terminationPolicyTypes);
    }

    /**
     *

     * The termination policies supported by Auto Scaling (OldestInstance,
     * OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and
     * Default).
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setTerminationPolicyTypes(java.util.Collection)} or
     * {@link #withTerminationPolicyTypes(java.util.Collection)} if you want to override the existing values.
     *

     *
     * @param terminationPolicyTypes
     *        The termination policies supported by Auto Scaling (OldestInstance,
     *        OldestLaunchConfiguration, NewestInstance,
     *        ClosestToNextInstanceHour, and Default).
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeTerminationPolicyTypesResult withTerminationPolicyTypes(String... terminationPolicyTypes) {
        if (this.terminationPolicyTypes == null) {
            setTerminationPolicyTypes(new com.amazonaws.internal.SdkInternalList<String>(terminationPolicyTypes.length));
        }
        for (String ele : terminationPolicyTypes) {
            this.terminationPolicyTypes.add(ele);
        }
        return this;
    }

    /**
     *

     * The termination policies supported by Auto Scaling (OldestInstance,
     * OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and
     * Default).
     *

     *
     * @param terminationPolicyTypes
     *        The termination policies supported by Auto Scaling (OldestInstance,
     *        OldestLaunchConfiguration, NewestInstance,
     *        ClosestToNextInstanceHour, and Default).
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeTerminationPolicyTypesResult withTerminationPolicyTypes(java.util.Collection<String> terminationPolicyTypes) {
        setTerminationPolicyTypes(terminationPolicyTypes);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getTerminationPolicyTypes() != null)
            sb.append("TerminationPolicyTypes: ").append(getTerminationPolicyTypes());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof DescribeTerminationPolicyTypesResult == false)
            return false;
        DescribeTerminationPolicyTypesResult other = (DescribeTerminationPolicyTypesResult) obj;
        if (other.getTerminationPolicyTypes() == null ^ this.getTerminationPolicyTypes() == null)
            return false;
        if (other.getTerminationPolicyTypes() != null && other.getTerminationPolicyTypes().equals(this.getTerminationPolicyTypes()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode + ((getTerminationPolicyTypes() == null) ? 0 : getTerminationPolicyTypes().hashCode());
        return hashCode;
    }

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

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Umbraco.Web.Models.ContentEditing
{

    /// <summary>
    /// Represents a section (application) in the back office
    /// </summary>
    [DataContract(Name = "section", Namespace = "")]
    public class Section
    {

        [DataMember(Name = "name")]
        public string Name { get; set; }

        [DataMember(Name = "cssclass")]
        public string Icon { get; set; }

        [DataMember(Name = "alias")]
        public string Alias { get; set; }

        /// <summary>
        /// In some cases a custom route path can be specified so that when clicking on a section it goes to this
        /// path instead of the normal dashboard path
        /// </summary>
        [DataMember(Name = "routePath")]
        public string RoutePath { get; set; }

    }
}