text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_margin="10dp">

    <LinearLayout
        android:id="@+id/layout_daily_quotes"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:padding="10dp"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true">

        <com.android.volley.toolbox.NetworkImageView
            android:id="@+id/profile_pic_search"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_marginLeft="10dp">

            <TextView
                android:id="@+id/name_author_search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center|left"
                android:text="Bob Sadino"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textStyle="bold"
                android:layout_centerVertical="true"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true" />

        </RelativeLayout>
    </LinearLayout>

</RelativeLayout>
<!--<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/feed_bg"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginLeft="@dimen/feed_item_margin"
        android:layout_marginRight="@dimen/feed_item_margin"
        android:layout_marginTop="@dimen/feed_item_margin"
        android:background="@drawable/bg_parent_rounded_corner"
        android:orientation="vertical"
        android:paddingTop="@dimen/feed_item_padding_top_bottom" >

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/feed_item_padding_left_right"
            android:paddingRight="@dimen/feed_item_padding_left_right" >

            <com.android.volley.toolbox.NetworkImageView
                 android:id="@+id/profilePic"
                 android:layout_width="@dimen/feed_item_profile_pic"
                 android:layout_height="@dimen/feed_item_profile_pic"
                 android:scaleType="fitCenter"
                 android:src="@mipmap/noprofile" />

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingLeft="@dimen/feed_item_profile_info_padd" >

                <TextView
                    android:id="@+id/name"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textSize="@dimen/feed_item_profile_name"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/timestamp"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="@color/timestamp"
                    android:textSize="@dimen/feed_item_timestamp" />
            </LinearLayout>
        </LinearLayout>

        <TextView
            android:id="@+id/txtStatusMsg"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|left"
            android:paddingBottom="5dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:paddingTop="@dimen/feed_item_status_pad_top" />

        <TextView
            android:id="@+id/txtUrl"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:linksClickable="true"
            android:paddingBottom="10dp"
            android:paddingLeft="@dimen/feed_item_status_pad_left_right"
            android:paddingRight="@dimen/feed_item_status_pad_left_right"
            android:textColorLink="@color/link" />

        <com.dreamcodes.dcquotes.adapter.FeedImageView
            android:id="@+id/feedImage1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:scaleType="fitXY"
            android:visibility="gone" />

       <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_margin="5dp"
            android:background="@color/gray_light"/>

        <LinearLayout
            android:id="@+id/LinearLayout02"
            android:layout_height="25dp"
            android:layout_width="match_parent"
            android:orientation="horizontal"
            android:layout_marginBottom="5dp"
            >
            <ImageButton
                android:id="@+id/btn_favorite"
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:background="@drawable/drawer_fav_button">
            </ImageButton>
            <ImageButton
                android:id="@+id/btn_comment"
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:background="@drawable/drawer_comment_button" >
            </ImageButton>
            <ImageButton
                android:id="@+id/btn_share"
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:background="@drawable/drawer_share_button">
            </ImageButton>

        </LinearLayout>
    </LinearLayout>

</LinearLayout> -->


text:
#import "TiProxy.h"
#import "TiDimension.h"

@interface TiPoint : TiProxy {
	TiDimension xDimension;
	TiDimension yDimension;
}

-(id)initWithPoint:(CGPoint)point_;
-(id)initWithObject:(id)object;

-(void)setValues:(id)object;

//Virtual property
@property(nonatomic,assign) CGPoint point;

@property(nonatomic,retain) NSNumber *x;
@property(nonatomic,retain) NSNumber *y;

@property(nonatomic,assign) TiDimension xDimension;
@property(nonatomic,assign) TiDimension yDimension;

@end

redpajama_set_name: RedPajamaGithub


text:
#pragma once

#if defined(__alpha__) || defined(__s390x__)
typedef unsigned int ino_t;
#elif defined(__i386__)
typedef /* __kernel_ulong_t */ unsigned long long ino_t;
#else
typedef /* __kernel_ulong_t */ unsigned long ino_t;
#endif


text:
package commands

import (
	"github.com/spf13/cobra"
	"github.com/spf13/viper"

	wire "github.com/tendermint/go-wire"
	txcmd "github.com/tendermint/light-client/commands/txs"

	bcmd "github.com/tendermint/basecoin/cmd/basecli/commands"
	"github.com/tendermint/basecoin/docs/guide/counter/plugins/counter"
	btypes "github.com/tendermint/basecoin/types"
)

//CounterTxCmd is the CLI command to execute the counter
//  through the appTx Command
var CounterTxCmd = &cobra.Command{
	Use:   "counter",
	Short: "add a vote to the counter",
	Long: `Add a vote to the counter.

You must pass --valid for it to count and the countfee will be added to the counter.`,
	RunE: counterTxCmd,
}

const (
	flagCountFee = "countfee"
	flagValid    = "valid"
)

func init() {
	fs := CounterTxCmd.Flags()
	bcmd.AddAppTxFlags(fs)
	fs.String(flagCountFee, "", "Coins to send in the format <amt><coin>,<amt><coin>...")
	fs.Bool(flagValid, false, "Is count valid?")
}

func counterTxCmd(cmd *cobra.Command, args []string) error {
	// Note: we don't support loading apptx from json currently, so skip that

	// Read the app-specific flags
	name, data, err := getAppData()
	if err != nil {
		return err
	}

	// Read the standard app-tx flags
	gas, fee, txInput, err := bcmd.ReadAppTxFlags()
	if err != nil {
		return err
	}

	// Create AppTx and broadcast
	tx := &btypes.AppTx{
		Gas:   gas,
		Fee:   fee,
		Name:  name,
		Input: txInput,
		Data:  data,
	}
	res, err := bcmd.BroadcastAppTx(tx)
	if err != nil {
		return err
	}

	// Output result
	return txcmd.OutputTx(res)
}

func getAppData() (name string, data []byte, err error) {
	countFee, err := btypes.ParseCoins(viper.GetString(flagCountFee))
	if err != nil {
		return
	}
	ctx := counter.CounterTx{
		Valid: viper.GetBool(flagValid),
		Fee:   countFee,
	}

	name = counter.New().Name()
	data = wire.BinaryBytes(ctx)
	return
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Data.SqlClient;
using System.Data;
using System.ComponentModel;
using System.Configuration;

namespace Xenosynth.Configuration {

    /// <summary>
    /// Provides access to Xenosynth system configuration.
    /// <remarks>
    /// The system configuration provides an easy way to have a configuration that can be managed using the end user from the Xenosynth Admin.  Settings that should not be managed by the end user should reside in the web/user config.
    /// </remarks>
    /// </summary>
    public class SystemConfiguration : IEnumerable {

        private static SystemConfiguration current = new SystemConfiguration();

        private Hashtable settingsCache;
        private string connectionString;

        private const string CONNECTION_STRING_SETTINGS_NAME = "Xenosynth";

		/// <summary>
		/// This property supports the Xenosynth Framework and is not intended to be used directly from your code.
		/// </summary>
        public string ConnectionString {
            set { connectionString = value; }
            get {
                if (connectionString == null) {
                    ConnectionStringSettings connectionStringSetting = ConfigurationManager.ConnectionStrings[CONNECTION_STRING_SETTINGS_NAME];
                    if (connectionStringSetting == null || string.IsNullOrEmpty(connectionStringSetting.ConnectionString)) {
                        throw new ConfigurationErrorsException(string.Format(Properties.Resources.ConnectionStringSettingsNullOrEmpty, CONNECTION_STRING_SETTINGS_NAME));
                    } else {
                        connectionString = connectionStringSetting.ConnectionString;
                    }
                }
                return connectionString;
            }
        }

		/// <summary>
		/// This property supports the Xenosynth Framework and is not intended to be used directly from your code.
		/// </summary>
        public string TableName {
            get { return "ConfigSettings"; }
        }

        private SystemConfiguration() {
        }

		/// <summary>
		/// Gets the <see cref="SystemConfiguration"/> object.
		/// </summary>
        public static SystemConfiguration Current {
            get { return current; }
        }

		/// <summary>
		/// A list categories in the current system configuration.
		/// </summary>
        public string[] Categories {
            get {
                ArrayList categories = new ArrayList();
                foreach (ConfigurationSetting c in Settings.Values) {
                    if (!categories.Contains(c.Category)) {
                        categories.Add(c.Category);
                    }
                }
                categories.Sort();
                return (string[])categories.ToArray(typeof(string));
            }
        }

		/// <summary>
		/// Gets a list of <see cref="ConfigurationSetting"/> for the given category.
		/// </summary>
		/// <param name="category">
		/// A <see cref="System.String"/> for the category.
		/// </param>
		/// <returns>
		/// A <see cref="IList"/> of <see cref="ConfigurationSetting"/>.
		/// </returns>
        public IList GetConfigurationSettingByCategory(string category) {
            ArrayList settings = new ArrayList();
            foreach (ConfigurationSetting c in Settings.Values) {
                if (c.Category == category) {
                    settings.Add(c);
                }
            }
            return settings;
        }

		/// <summary>
		/// Returns the value for a setting.
		/// </summary>
		/// <param name="key">
		/// The key for the setting.
		/// </param>
		/// <param name="throwErrorRequired">
		/// Whether to throw an error if no setting exists for the key. If false and no key exists, returns null.
		/// </param>
		/// <returns>
		/// The value for the configuration settings.
		/// </returns>
        public object GetValue(string key, bool throwErrorRequired) {

            ConfigurationSetting setting = this[key];

            if (setting == null) {
                if (throwErrorRequired) {
                    throw new ConfigurationErrorsException(string.Format(Properties.Resources.ConfigurationSettingNullOrEmpty, key));
                } else {
                    return null;
                }
            }

            return setting.Value;
        }

		/// <summary>
		/// A Hashtable of <see cref="ConfigurationSetting"/> indexed by the setting's key.
		/// </summary>
        private Hashtable Settings {
            get {
                if (settingsCache == null) {
                    settingsCache = new Hashtable();

                    SqlConnection conn = null;

                    try {
                        conn = new SqlConnection(ConnectionString);
                        conn.Open();
                        SqlCommand cmd = new SqlCommand("SELECT * FROM " + TableName, conn);
                        SqlDataReader r = cmd.ExecuteReader(CommandBehavior.CloseConnection);

                        while (r.Read()) {

                            Type type = Type.GetType(r["Type"].ToString(), true);

                            ConfigurationSetting setting = new ConfigurationSetting(
                                r["Key"].ToString(),
                                r["Category"].ToString(),
                                r["Name"].ToString(),
                                r["Description"].ToString(),
                                type,
                                ConvertFromString(r["Value"].ToString(), type)
                                );

                            AddToCache(setting);
                        }

                    } catch (Exception e) {
                        settingsCache = null;
                        throw e;
                    } finally {
                        if (conn != null && conn.State == ConnectionState.Open) {
                            conn.Close();
                        }
                    }
                }

                return settingsCache;
            }
        }

        private void AddToCache(ConfigurationSetting setting) {
            settingsCache.Add(setting.Key, setting);
            setting.Change += new EventHandler(OnSettingChange);
        }

        private object ConvertFromString(string value, Type type) {
            TypeConverter converter = TypeDescriptor.GetConverter(type);
            if (converter != null) {
                return converter.ConvertFromString(value);
            } else {
                return Convert.ChangeType(value, type);
            }
        }

        private string ConvertToString(object value) {
            TypeConverter converter = TypeDescriptor.GetConverter(value);
            if (converter != null) {
                return converter.ConvertToString(value);
            } else {
                return value.ToString();
            }
        }

		/// <summary>
		/// Whether the system configuration can be changed.
		/// </summary>
        public bool IsReadOnly {
            get {
                return false;
            }
        }

		/// <summary>
		/// Returns the <see cref="ConfigurationSetting"/> for the supplied key.
		/// </summary>
		/// <param name="key">
		/// A <see cref="System.String"/>
		/// </param>
        public ConfigurationSetting this[string key] {
            get {
                return (ConfigurationSetting)Settings[key];
            }
        }

		/// <summary>
		/// Removes the <see cref="ConfigurationSetting"/> for the supplied key.
		/// </summary>
		/// <param name="key">
		/// A <see cref="System.String"/>
		/// </param>
        public void Remove(string key) {
            if (!this.Contains(key)) {
                throw new ApplicationException("A setting with key '" + key + "' does not exists.");
            }

            string sql = "DELETE " + TableName + "  WHERE [Key] = @Key";

            SqlConnection conn = new SqlConnection(ConnectionString);
            SqlCommand cmd = new SqlCommand(sql, conn);
            cmd.Parameters.Add("@Key", key);

            try {
                conn.Open();
                cmd.ExecuteNonQuery();
            } finally {
                if (conn.State == ConnectionState.Open) {
                    conn.Close();
                }
            }

            RemoveFromCache(this[key]);
        }

        private void RemoveFromCache(ConfigurationSetting setting) {
            settingsCache.Remove(setting.Key);
            setting.Change -= new EventHandler(OnSettingChange);
        }

		/// <summary>
		/// Whether the configuration contains a <see cref="ConfigurationSetting"/> for the supplied key.
		/// </summary>
		/// <param name="key">
		/// A <see cref="System.String"/>
		/// </param>
		/// <returns>
		/// A <see cref="System.Boolean"/>
		/// </returns>
        public bool Contains(string key) {
            return Settings.Contains(key);
        }

		/// <summary>
		/// This method supports the Xenosynth Framework and is not intended to be used directly from your code.
		/// </summary>
        public void Clear() {
            throw new NotImplementedException();
        }

		/// <summary>
		/// Returns a collection of all the <see cref="ConfigurationSetting"/>.
		/// </summary>
        public ICollection Values {
            get {
                return Settings.Values;
            }
        }

		/// <summary>
		/// Adds a <see cref="ConfigurationSetting"/> to the system configuration.
		/// </summary>
		/// <param name="setting">
		/// A <see cref="ConfigurationSetting"/>
		/// </param>
        public void Add(ConfigurationSetting setting) {
            if (this.Contains(setting.Key)) {
                throw new ApplicationException("A setting with key '" + setting.Key + "' already exists.");
            }

            string sql = "INSERT " + TableName + " ([Key], Category, Name, Description, Type, Value) Values (@Key, @Category, @Name, @Description, @Type, @Value)";

            SqlConnection conn = new SqlConnection(ConnectionString);
            SqlCommand cmd = new SqlCommand(sql, conn);
            cmd.Parameters.Add("@Key", setting.Key);
            cmd.Parameters.Add("@Name", setting.Value);
            cmd.Parameters.Add("@Category", setting.Category);
            cmd.Parameters.Add("@Description", setting.Description);
            cmd.Parameters.Add("@Type", setting.ValueType.AssemblyQualifiedName);
            cmd.Parameters.Add("@Value", ConvertToString(setting.Value));

            try {
                conn.Open();
                cmd.ExecuteNonQuery();
            } finally {
                if (conn.State == ConnectionState.Open) {
                    conn.Close();
                }
            }

            AddToCache(setting);
        }

		/// <summary>
		/// The collection of configuration <see cref="System.String"/> keys.
		/// </summary>
        public ICollection Keys {
            get {
                return Settings.Keys;
            }
        }

		/// <summary>
		/// The count of configurations settings.
		/// </summary>
        public int Count {
            get {
                return Settings.Count;
            }
        }

        #region IEnumerable Members

		/// <summary>
		/// An enumerator for the configuration settings.
		/// </summary>
		/// <returns>
		/// A <see cref="IEnumerator"/>
		/// </returns>
        IEnumerator System.Collections.IEnumerable.GetEnumerator() {
            return settingsCache.GetEnumerator();
        }

        #endregion

        private void OnSettingChange(object sender, EventArgs e) {
            ConfigurationSetting setting = (ConfigurationSetting)sender;
            string sql = "UPDATE " + TableName + " SET Value = @Value WHERE [Key] = @Key";

            SqlConnection conn = new SqlConnection(ConnectionString);
            SqlCommand cmd = new SqlCommand(sql, conn);
            cmd.Parameters.Add("@Key", setting.Key);
            cmd.Parameters.Add("@Value", ConvertToString(setting.Value));

            try {
                conn.Open();
                cmd.ExecuteNonQuery();
            } finally {
                if (conn.State == ConnectionState.Open) {
                    conn.Close();
                }
            }

        }
    }
}


text:
require 'orm_adapter/base'
require 'orm_adapter/to_adapter'
require 'orm_adapter/version'

module OrmAdapter
  # A collection of registered adapters
  def self.adapters
    @@adapters ||= []
  end

  # All model classes from all registered adapters
  def self.model_classes
    self.adapters.map { |a| a.model_classes }.flatten
  end
end

require 'orm_adapter/adapters/active_record' if defined?(ActiveRecord::Base)
require 'orm_adapter/adapters/data_mapper'   if defined?(DataMapper::Resource)
require 'orm_adapter/adapters/mongoid'       if defined?(Mongoid::Document)
require 'orm_adapter/adapters/mongo_mapper'  if defined?(MongoMapper::Document)
require 'orm_adapter/adapters/couchrest_model' if defined?(CouchRest::Model::Base)


text:
package com.vipshop.microscope.client.exception;

import com.vipshop.microscope.client.Tracer;
import com.vipshop.microscope.common.util.IPAddressUtil;
import com.vipshop.microscope.common.util.TimeStampUtil;
import org.apache.commons.lang3.exception.ExceptionUtils;

import java.lang.management.ManagementFactory;

/**
 * Exception data builder.
 *
 * @author Xu Fei
 * @version 1.0
 */
public class ExceptionDataBuilder {

    /**
     * Record exception
     *
     * @param t exception
     */
    public ExceptionData build(final Throwable t) {

        ExceptionData data = ExceptionData.newBuilder()
                .withApp(Tracer.APP_NAME)
                .withIP(IPAddressUtil.IPAddress())
                .withDate(TimeStampUtil.currentTimeMillis())
                .withExceptionName(t.getClass().getName())
                .withExceptionMsg(ExceptionUtils.getMessage(t))
                .withExceptionStack(ExceptionUtils.getStackTrace(t))
                .withTraceId(Tracer.getTraceId())
                .withThreadInfo(ManagementFactory.getThreadMXBean()
                                                 .getThreadInfo(Thread.currentThread().getId()).toString())
                .build();

        return data;
    }

    /**
     * Record exception and debug info
     *
     * @param t    exception
     * @param info debug info
     */
    public ExceptionData build(final Throwable t, String info) {

        ExceptionData data = ExceptionData.newBuilder()
                .withApp(Tracer.APP_NAME)
                .withIP(IPAddressUtil.IPAddress())
                .withDate(TimeStampUtil.currentTimeMillis())
                .withExceptionName(t.getClass().getName())
                .withExceptionMsg(ExceptionUtils.getMessage(t))
                .withExceptionStack(ExceptionUtils.getStackTrace(t))
                .withTraceId(Tracer.getTraceId())
                .withThreadInfo(ManagementFactory.getThreadMXBean()
                                                 .getThreadInfo(Thread.currentThread().getId()).toString())
                .withDebug(info)
                .build();

        return data;

    }

}


text:
=pod

LuaJIT

=head1 LuaJIT

=over

=item * LuaJIT

=over

=item * Download E<rchevron>

=item * Installation

=item * Running

=back

=item * Extensions

=over

=item * FFI Library

=over

=item * FFI Tutorial

=item * ffi.* API

=item * FFI Semantics

=back

=item * jit.* Library

=item * Lua/C API

=item * Profiler

=back

=item * Status

=over

=item * Changes

=back

=item * FAQ

=item * Performance E<rchevron>

=item * Wiki E<rchevron>

=item * Mailing List E<rchevron>

=back

LuaJIT is a B<Just-In-Time Compiler> (JIT) for the E<rchevron> Lua
programming language. Lua is a powerful, dynamic and light-weight
programming language. It may be embedded or used as a general-purpose,
stand-alone language.

LuaJIT is Copyright E<copy> 2005-2016 Mike Pall, released under the
E<rchevron> MIT open source license.

=head2 Compatibility

Windows

Linux

BSD

OSX

POSIX

Embedded

Android

iOS

PS3

PS4

PS Vita

Xbox 360

Xbox One

GCC

Clang

LLVM

MSVC

x86

x64

ARM

ARM64

PPC

MIPS32

MIPS64

Lua 5.1

API+ABI

+ JIT

+ BitOp

+ FFI

Drop-in

DLL/.so

=head2 Overview

3x

- 100x

115 KB

VM

90 KB

JIT

63 KLOC

C

24 KLOC

ASM

11 KLOC

Lua

LuaJIT has been successfully used as a B


text:
module TokyoMetro::Factory::Seed::Static::MetaClass
end


text:
import { SocketIOModel, SocketIOQuery, METHOD } from 'angular2-sails-socketio';
import { Endpoint } from 'angular2-sails-socketio/src/socketio.decorator';

@Endpoint('Places')
export class PlacesModel extends SocketIOModel {
    public restaurants(query: SocketIOQuery): Promise<any> {
        return this.action('restaurants', METHOD.GET, query);
    }

    public restaurantDetails(id: string): Promise<any> {
        return this.action('details/' + id, METHOD.GET, null);
    }

    public autoSuggest(query: SocketIOQuery): Promise<any> {
        return this.action('autosuggest', METHOD.GET, query);
    }
}


text:
#!/bin/bash

: ${TIMEOUT:=50000}
: ${REPORTER:="spec"}
: ${BAIL:=1}
: ${TYPE:="integration"}

if [ $BAIL -eq 1 ]; then
    BAIL_OPT="--bail"
else
    BAIL_OPT=""
fi

if [ $TYPE = "integration" ]; then
    node bin/down-server.js 3010 & export DOWN_SERVER_PID=$!

    TESTS_PATH="tests/integration/test.*.js"
fi
if [ $TYPE = "fuzzy" ]; then
    TESTS_PATH="tests/fuzzy/test.*.js"
fi
if [ $TYPE = "mapreduce" ]; then
    TESTS_PATH="tests/mapreduce/test.*.js"
fi
if [ $TYPE = "find" ]; then
    TESTS_PATH="tests/find/*/test.*.js"
fi
if [ $COVERAGE ]; then
    # run all tests when testing for coverage
    TESTS_PATH="tests/{unit,integration,mapreduce,component}/test*.js tests/find/*/test.*.js"
fi

if [ $PERF ]; then
    node tests/performance/index.js
elif [ ! $COVERAGE ]; then
    ./node_modules/.bin/mocha \
        $BAIL_OPT \
        --timeout "$TIMEOUT" \
        --require=./tests/integration/node.setup.js \
        --reporter="$REPORTER" \
        --grep="$GREP" \
        $TESTS_PATH
else
    ./node_modules/.bin/istanbul cover \
       --no-default-excludes -x 'tests/**' -x 'node_modules/**' \
       ./node_modules/mocha/bin/_mocha -- \
        $BAIL_OPT \
        --timeout "$TIMEOUT" \
        --require=./tests/integration/node.setup.js \
        --reporter="$REPORTER" \
        --grep="$GREP" \
        $TESTS_PATH

    ./node_modules/.bin/istanbul check-coverage --line 100
fi

EXIT_STATUS=$?
if [[ ! -z $DOWN_SERVER_PID ]]; then
  kill $DOWN_SERVER_PID
fi
exit $EXIT_STATUS


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.proto

package com.google.cloud.recommendationengine.v1beta1;

public interface ListPredictionApiKeyRegistrationsRequestOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.recommendationengine.v1beta1.ListPredictionApiKeyRegistrationsRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. The parent placement resource name such as
   * `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`
   *

   *
   *
   * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The parent.
   */
  java.lang.String getParent();
  /**
   *
   *
   *

   * Required. The parent placement resource name such as
   * `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`
   *

   *
   *
   * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The bytes for parent.
   */
  com.google.protobuf.ByteString getParentBytes();

  /**
   *
   *
   *

   * Optional. Maximum number of results to return per page. If unset, the
   * service will choose a reasonable default.
   *

   *
   * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
   *
   * @return The pageSize.
   */
  int getPageSize();

  /**
   *
   *
   *

   * Optional. The previous `ListPredictionApiKeyRegistration.nextPageToken`.
   *

   *
   * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
   *
   * @return The pageToken.
   */
  java.lang.String getPageToken();
  /**
   *
   *
   *

   * Optional. The previous `ListPredictionApiKeyRegistration.nextPageToken`.
   *

   *
   * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
   *
   * @return The bytes for pageToken.
   */
  com.google.protobuf.ByteString getPageTokenBytes();
}


text:
namespace Boilerplate.Web.Mvc
{
    using System;
    using System.Web.Mvc;

    /// <summary>
    /// <see cref="UrlHelper"/> extension methods.
    /// </summary>
    public static class UrlHelperExtensions
    {
        /// <summary>
        /// Generates a fully qualified URL to an action method by using the specified action name, controller name and
        /// route values.
        /// </summary>
        /// <param name="url">The URL helper.</param>
        /// <param name="actionName">The name of the action method.</param>
        /// <param name="controllerName">The name of the controller.</param>
        /// <param name="routeValues">The route values.</param>
        /// <returns>The absolute URL.</returns>
        public static string AbsoluteAction(
            this UrlHelper url,
            string actionName,
            string controllerName,
            object routeValues = null)
        {
            string scheme = url.RequestContext.HttpContext.Request.Url.Scheme;
            return url.Action(actionName, controllerName, routeValues, scheme);
        }

        /// <summary>
        /// Generates a fully qualified URL to the specified content by using the specified content path. Converts a
        /// virtual (relative) path to an application absolute path.
        /// </summary>
        /// <param name="url">The URL helper.</param>
        /// <param name="contentPath">The content path.</param>
        /// <returns>The absolute URL.</returns>
        public static string AbsoluteContent(
            this UrlHelper url,
            string contentPath)
        {
            return new Uri(url.RequestContext.HttpContext.Request.Url, url.Content(contentPath)).ToString();
        }

        /// <summary>
        /// Generates a fully qualified URL to the specified route by using the route name and route values.
        /// </summary>
        /// <param name="url">The URL helper.</param>
        /// <param name="routeName">Name of the route.</param>
        /// <param name="routeValues">The route values.</param>
        /// <returns>The absolute URL.</returns>
        public static string AbsoluteRouteUrl(
            this UrlHelper url,
            string routeName,
            object routeValues = null)
        {
            string scheme = url.RequestContext.HttpContext.Request.Url.Scheme;
            return url.RouteUrl(routeName, routeValues, scheme);
        }
    }
}


text:
(function (){

    'use strict';

    // Constants to identify Items
    var MEETING_REQUEST = 0,
        CALENDAR_ITEM = 1;

    angular.module('officeAddin').service('toxicityService', ['$q', 'x2js', messageService]);

    // Service which controls the data obtention when attending an appointment
    function messageService ($q, x2js){

        var emailPromise, email, type;

        emailPromise = getEmail();
        emailPromise.then(function (json){

            var item = json.Envelope.Body.GetItemResponse.ResponseMessages.GetItemResponseMessage.Items;

            if (item.MeetingRequest){

                email = item.MeetingRequest;
                type = MEETING_REQUEST;

            } else if (item.CalendarItem){

                email = item.CalendarItem;
                type = CALENDAR_ITEM;

            }
        });

        return {
            getEmailInfo: getEmailInfo,
            getAppointmentData: getAppointmentData,
            isAppointment: isAppointment
        };

        function getEmail (){

            var deferred = $q.defer();
            var itemIdDefer = $q.defer();

            if (!Office.context.mailbox.item.itemId) {

                Office.context.mailbox.item.saveAsync(function(result){
                    itemIdDefer.resolve(result.value);
                });

            } else { itemIdDefer.resolve(Office.context.mailbox.item.itemId); }

            itemIdDefer.promise.then(function (itemId){

                Office.context.mailbox.makeEwsRequestAsync(getRequestEnvelope(
                    getMessageRequest(itemId)), function (result){
                    deferred.resolve(x2js.xml_str2json(result.value));
                });

            });

            return deferred.promise;

        }

        function getEmailInfo (){

            var deferred = $q.defer();

            emailPromise.then(function (){
                deferred.resolve({
                    from: email.Organizer.Mailbox.Name.__text,
                    priority: email.Importance.__text
                });
            });

            return deferred.promise;

        }

        function getAppointmentData (){

            var deferred = $q.defer();

            emailPromise.then(function (){

                var attendees = { required: [], optional: [] }
                var locations, subject, description, recurring;

                // Split the locations
                if (email.Location.__text && email.Location.__text !== ''){
                    locations = email.Location.__text.split(';');
                } else {
                    locations = [];
                }

                // Gets the subject, if exists
                if (email.Subject){ subject = email.Subject.__text; }

                // Gets the description inside the body
                description = getDescription(email.Body.__text);

                // Get the required attendees names and store them
                if (email.RequiredAttendees){ attendees.required = getAttendees(email.RequiredAttendees.Attendee); }

                // Get the optional attendees names and store them
                if (email.OptionalAttendees){ attendees.optional = getAttendees(email.OptionalAttendees.Attendee); }

                // If the item is a CalendarItem, the organizer is not included in any attendees group. Add him
                if (type === CALENDAR_ITEM){ attendees.required.push(email.Organizer.Mailbox.__text); }

                // Check meeting recurrence
                if (email.IsRecurring.__text === 'true') { recurring = true; }

                deferred.resolve({
                    organizer: email.Organizer.Mailbox.Name.__text,
                    locations: locations,
                    subject: subject,
                    description: description,
                    attendees: attendees,
                    created: new Date(email.DateTimeCreated.__text),
                    start: new Date(email.Start.__text),
                    end: new Date(email.End.__text),
                    recurring: recurring
                });

            });

            return deferred.promise;

        }

        function isAppointment (){

            var deferred = $q.defer();

            emailPromise.then(function (){
                deferred.resolve(type === MEETING_REQUEST || type === CALENDAR_ITEM);
            });

            return deferred.promise;

        }

        function getMessageRequest (messageId){

            return '<GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">' +
            '   <ItemShape>' +
            '       <t:BaseShape>AllProperties</t:BaseShape>' +
            /*'       <t:AdditionalProperties>' +
            '           <t:FieldURI FieldURI="item:Subject"/>' +
            '       </t:AdditionalProperties>' +*/
            '   </ItemShape>' +
            '   <ItemIds><t:ItemId Id="' + messageId + '"/></ItemIds>' +
            '</GetItem>';

        }

        function getRequestEnvelope (request){

            return '<?xml version="1.0" encoding="utf-8"?>' +
            '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
            '               xmlns:xsd="http://www.w3.org/2001/XMLSchema"' +
            '               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' +
            '               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">' +
            '   <soap:Header>' +
            '       <t:RequestServerVersion Version="Exchange2013"/>' +
            '   </soap:Header>' +
            '   <soap:Body>' +

            request +

            '   </soap:Body>' +
            '</soap:Envelope>';

        }

        function getDescription (string_body){

            var html = new DOMParser().parseFromString(string_body, 'text/html');
            var description = html.getElementById('divtagdefaultwrapper').textContent;
            return (description === '\n\n\n') ? undefined : description;

        }

        function getAttendees (attendees){

            var result = [];

            if (Array.isArray(attendees)){

                attendees.forEach(function(element) {
                    result.push(element.Mailbox.Name.__text);
                }, this);

            } else { result = [attendees.Mailbox.Name.__text]; }

            return result;

        }
    }

})();


text:
package com.datawizards.dqm.rules.field

import org.apache.spark.sql.types.{IntegerType, StringType, StructField, StructType}
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner

@RunWith(classOf[JUnitRunner])
class MinRuleTest extends FunSuite with RowBuilder {
  test("Validate min") {
    val row1 = createRow(
      Array("abc", -1),
      StructType(Seq(
        StructField("f1", StringType),
        StructField("f2", IntegerType)
      ))
    )
    val row2 = createRow(
      Array("ad", 1),
      StructType(Seq(
        StructField("f1", StringType),
        StructField("f2", IntegerType)
      ))
    )
    val ruleString = MinRule("ac")
    val ruleInt = MinRule(0)
    assert(!ruleString.validate("f1", row1))
    assert(!ruleInt.validate("f2", row1))
    assert(ruleString.validate("f1", row2))
    assert(ruleInt.validate("f2", row2))
  }
}


text:
require 'eapi'

# version
require 'esq/version'

# Esq Preparation
module Esq
  extend Eapi
end

# need to go after the Esq preparation (extending Eapi) or definitions will fail
require 'esq/fields'
require 'esq/filter'
require 'esq/filtered_query'
require 'esq/match_query'
require 'esq/query'
require 'esq/sort'
require 'esq/sort_element'
require 'esq/search'


text:
namespace Tailviewer.Core.Filters.ExpressionEngine
{
	internal interface IInterval<out T>
	{
		T Minimum { get; }
		T Maximum { get; }
	}
}


text:
/**
 * @file WaveFile.h
 *
 * WAVE file handling as a signal source.
 *
 * This file is part of the Aquila DSP library.
 * Aquila is free software, licensed under the MIT/X11 License. A copy of
 * the license is provided with the library in the LICENSE file.
 *
 * @package Aquila
 * @version 3.0.0-dev
 * @author Zbigniew Siciarz
 * @date 2007-2014
 * @license http://www.opensource.org/licenses/mit-license.php MIT
 * @since 0.0.7
 */

#ifndef WAVEFILE_H
#define WAVEFILE_H

#include "../global.h"
#include "SignalSource.h"
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

namespace Aquila
{
    /**
     * Which channel to use when reading stereo recordings.
     */
    enum StereoChannel { LEFT, RIGHT };

    /**
     * .wav file header structure.
     */
    struct WaveHeader
    {
        char   RIFF[4];
        std::uint32_t DataLength;
        char   WAVE[4];
        char   fmt_[4];
        std::uint32_t SubBlockLength;
        std::uint16_t formatTag;
        std::uint16_t Channels;
        std::uint32_t SampFreq;
        std::uint32_t BytesPerSec;
        std::uint16_t BytesPerSamp;
        std::uint16_t BitsPerSamp;
        char   data[4];
        std::uint32_t WaveSize;
    };

    /**
     * Wave file data access.
     *
     * Binary files in WAVE format (.wav extension) can serve as data input for
     * Aquila. With this class, you can read the metadata and the actual
     * waveform data from the file. The supported formats are:
     *
     * - 8-bit mono
     * - 8-bit stereo*
     * - 16-bit mono
     * - 16-bit stereo*
     *
     * For stereo data, only only one of the channels is loaded from file.
     * By default this is the left channel, but you can control this from the
     * constructor parameter.
     *
     * There are no requirements for sample frequency of the data.
     */
    class AQUILA_EXPORT WaveFile : public SignalSource
    {
    public:
        /**
         * Audio channel representation.
         */
        typedef decltype(m_data) ChannelType;

        explicit WaveFile(const std::string& filename,
                          StereoChannel channel = LEFT);
        ~WaveFile();

        void load(const std::string& filename, StereoChannel channel);
        static void save(const SignalSource& source, const std::string& file);

        /**
         * Returns the filename.
         *
         * @return full path to currently loaded file
         */
        std::string getFilename() const
        {
            return m_filename;
        }

        /**
         * Returns number of channels.
         *
         * @return 1 for mono, 2 for stereo, other types are not recognized
         */
        unsigned short getChannelsNum() const
        {
            return m_header.Channels;
        }

        /**
         * Checks if this is a mono recording.
         *
         * @return true if there is only one channel
         */
        bool isMono() const
        {
            return 1 == getChannelsNum();
        }

        /**
         * Checks if this is a stereo recording.
         *
         * @return true if there are two channels
         */
        bool isStereo() const
        {
            return 2 == getChannelsNum();
        }

        /**
         * Returns the number of bytes per second.
         *
         * @return product of sample frequency and bytes per sample
         */
        unsigned int getBytesPerSec() const
        {
            return m_header.BytesPerSec;
        }

        /**
         * Returns number of bytes per sample.
         *
         * @return 1 for 8b-mono, 2 for 8b-stereo or 16b-mono, 4 for 16b-stereo
         */
        unsigned int getBytesPerSample() const
        {
            return m_header.BytesPerSamp;
        }

        /**
         * Returns number of bits per sample
         *
         * @return 8 or 16
         */
        virtual unsigned short getBitsPerSample() const
        {
            return m_header.BitsPerSamp;
        }

        /**
         * Returns the recording size (without header).
         *
         * The return value is a raw byte count. To know the real sample count,
         * it must be divided by bytes per sample.
         *
         * @return byte count
         */
        unsigned int getWaveSize() const
        {
            return m_header.WaveSize;
        }

        unsigned int getAudioLength() const;

    private:
        /**
         * Full path of the .wav file.
         */
        std::string m_filename;

        /**
         * Header structure.
         */
        WaveHeader m_header;
    };
}

#endif // WAVEFILE_H


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<meta name="generator" content=
"HTML Tidy for Windows (vers 26 April 2007), see www.w3.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<meta name="Copyright" content=
"Copyright (c) 2001-2007, International Business Machines Corporation and others. All Rights Reserved.">
<meta name="Author" content="Eric Mader">
<meta name="GENERATOR" content=
"Mozilla/4.72 [en] (Windows NT 5.0; U) [Netscape]">
<title>Readme file for letest and gendata</title>

What are letest and gendata?

letest is a test program that you can use to verify the basic
functionality of the ICU LayoutEngine. It tests the LayoutEngine's
API and reads an XML file that contains test cases to test some of
the features of the LayoutEngine. These test cases are not
comprehensive, but they do test the most important features of
 the LayoutEngine. When you have successfully run letest, you
can use the ICU LayoutEngine in you application knowing that the
basic functionality is working correctly.

gendata is a program that is used by the ICU team to build the
file letest.xml which contains the test cases. Unless you have
changed your copy of the LayoutEngine and want to validate the
changes on other platforms, there's no reason for you to run this
program.

(The ICU team first runs a Windows application which uses the
ICU LayoutEngine to display the text that letest uses. Once it has
been verified that the text is displayed correctly, gendata is run
to produce letest.xml, and then letest is run on Windows to verify
that letest still works with the new data.)

How do I build letest?

First, you need to build ICU, including the LayoutEngine.

On Windows, letest is part of the allinone project, so a normal
build of ICU will also build letest. On UNIX systems, connect to
<top-build-dir>/test/letest and do "make all" .

How do I run letest?

Before you can run letest, you'll need to get the fonts it uses.
For legal reasons, we can't include most of them with ICU, but you
can download them from the web. To do this, you'll need access to a
computer running Windows. All of the fonts should be stored in
<icu>/source/test/testdata. Here's how to get the fonts:

Download a recent version of the Java 2 Platform, Standard
Edition (J2SE) from java.sun.com.
Click on the "Download" button for the version of Java that you
want to download. The page offers both JDKs and JREs. (The JRE is
sufficient for letest.) The download page will have a link to the
license agreement. Be sure to read and understand the license
agreement, and then click on the Accept button. Download the
package and install it. You'll need one font. On Windows, it will
be in, for example, "C:\Program Files\Java\jdk1.6.0\jre\lib\fonts".
The file you want is "LucidaSansRegular.ttf". Copy this file into
the directory from which you'll run letest.

Next is the Hindi font. Go to the NCST site and download
raghu.ttf.
When you hit the DOWNLOAD button on the page, it will open another
window which contains a disclaimer and a license agreement. Be sure
that you understand and agree to all of this before you download
the font. You can download raghu.ttf into the directory from which
you'll run letest.

Then download the Thai font. Go to into-asia.com
and click on the link for the Angsana font. This will download a
.ZIP file. Extract the font file, angsd___.ttf, into the directory
from which you will run letest.

There's still one more font to get, the Code2000 Unicode font.
Go to James Kass' Unicode
Support In Your Browser page and click on the link that says
"Click Here to download Code2000 shareware demo Unicode font." This
will download a .ZIP file which contains CODE2000.TTF and
CODE2000.HTM. Expand this .ZIP file and put the CODE2000.TTF file
in the directory from which you'll run letest.

Note: The Code2000 font
is shareware. If you want to use it for longer than a trial period,
you should send a shareware fee to James. Directions for how to do
this are in CODE2000.HTM.

letest.xml references three other fonts:

ARIALUNI.TTF is Microsoft's Arial Unicode MS font, which is
distributed with Microsoft Office and is licensed only for use on
the Windows operating system.

Devamt.ttf is a proprietary font which cannot be freely
downloaded.

TestFont1.otf is included with ICU.

To run letest type CTRL+F5 in Visual Studio, or "make check" in
UNIX.  If everything's OK you should see something like this:

<tt> /

 /api/

   ---[OK]  ---/api/ParameterTest

   ---[OK]  ---/api/FactoryTest

 /layout/

   ---[OK]  ---/layout/AccessTest

   ---[OK]  ---/layout/DataDrivenTest

 /c_api/

   ---[OK]  ---/c_api/ParameterTest

   ---[OK]  ---/c_api/FactoryTest

 /c_layout/

   ---[OK]  ---/c_layout/AccessTest

   ---[OK]  ---/c_layout/DataDrivenTest

[All tests passed successfully...]

Elapsed Time: 00:00:00.351
</tt>

If letest cannot open a font, it will print a warning message and
skip the test. letest will also check the version of the font you
have to make sure it's the same one that was used to generate the
test case. If the version doesn't match, letest will print a
warning message and proceed with the test.


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorPrimary"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1">

        <LinearLayout
            android:id="@+id/sum_pane"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:layout_marginTop="40dp"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/amount_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="sans-serif"
                android:shadowDx="0"
                android:shadowDy="5"
                android:shadowRadius="5"
                android:textColor="@color/colorText"
                android:textSize="100sp"/>

            <TextView
                android:id="@+id/currency_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="sans-serif-medium"
                android:text="czk"
                android:textColor="@color/colorText"
                android:textSize="32sp"/>

        </LinearLayout>

    </RelativeLayout>

    <Button
        android:id="@+id/send_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_margin="20dp"
        android:layout_weight="0"
        android:background="@drawable/rounded_red_rectangle"
        android:paddingLeft="71dp"
        android:paddingRight="71dp"
        android:text="Send"
        android:textColor="@color/colorText"
        android:textSize="24sp"/>

    <TableLayout
        android:id="@+id/keypad"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:stretchColumns="*">

        <TableRow>

            <Button
                android:id="@+id/button_keypad_1"
                style="@style/KeyPadButton"
                android:text="1"/>

            <Button
                android:id="@+id/button_keypad_2"
                style="@style/KeyPadButton"
                android:text="2"/>

            <Button
                android:id="@+id/button_keypad_3"
                style="@style/KeyPadButton"
                android:text="3"/>

        </TableRow>

        <TableRow>

            <View
                style="@style/KeyPadDivider"/>

            <View
                style="@style/KeyPadDivider"/>

            <View
                style="@style/KeyPadDivider"/>
        </TableRow>

        <TableRow>

            <Button
                android:id="@+id/button_keypad_4"
                style="@style/KeyPadButton"
                android:text="4"/>

            <Button
                android:id="@+id/button_keypad_5"
                style="@style/KeyPadButton"
                android:text="5"/>

            <Button
                android:id="@+id/button_keypad_6"
                style="@style/KeyPadButton"
                android:text="6"/>

        </TableRow>

        <TableRow>

            <View
                style="@style/KeyPadDivider"/>

            <View
                style="@style/KeyPadDivider"/>

            <View
                style="@style/KeyPadDivider"/>
        </TableRow>

        <TableRow>

            <Button
                android:id="@+id/button_keypad_7"
                style="@style/KeyPadButton"
                android:text="7"/>

            <Button
                android:id="@+id/button_keypad_8"
                style="@style/KeyPadButton"
                android:text="8"/>

            <Button
                android:id="@+id/button_keypad_9"
                style="@style/KeyPadButton"
                android:text="9"/>

        </TableRow>

        <TableRow>

            <View
                style="@style/KeyPadDivider"/>

            <View
                style="@style/KeyPadDivider"/>

            <View
                style="@style/KeyPadDivider"/>
        </TableRow>

        <TableRow>

            <Button
                android:id="@+id/button_keypad_dot"
                style="@style/KeyPadButton"
                android:text="."/>

            <Button
                android:id="@+id/button_keypad_0"
                style="@style/KeyPadButton"
                android:text="0"/>

            <Button
                android:id="@+id/button_keypad_delete"
                style="@style/KeyPadButton"
                android:text="X"/>

        </TableRow>

    </TableLayout>
</LinearLayout>


text:
name              "dome9"
maintainer        "Guavus, Inc."
maintainer_email  "bernardo.gomezpalacio@guavus.com"
license           "Apache 2.0"
description       "Installs Dome9 Service."
long_description  IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version           "0.0.1"

recipe "dome9", "Installs Dome9 Service"

%w{ debian ubuntu centos redhat scientific fedora amazon }.each do |os|
  supports os
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using EloBuddy;
using EloBuddy.SDK;
using PerfectWard.Config;
using SharpDX;

namespace PerfectWard.Draw
{
    public abstract class RenderObject
    {
        public bool Visable = true;
        abstract public void Draw();
        abstract public Vector3 GetScreenPos();
    }

    public static class RenderObjects
    {
        private static readonly List<RenderObject> Objects = new List<RenderObject>();
        private static readonly DateTime AssemblyLoadTime = DateTime.Now;

        public static float TickCount
        {
            get
            {
                return (int)DateTime.Now.Subtract(AssemblyLoadTime).TotalMilliseconds;
            }
        }
        static RenderObjects()
        {
            Drawing.OnDraw += Drawing_OnDraw;
        }

        private static void Drawing_OnDraw(EventArgs args)
        {
            if (!Properties.GetData<bool>("Enable")) return;
            Render();
        }

        private static void Render()
        {
            foreach (RenderObject obj in Objects.Where(x => x.Visable))
            {
                if(obj.GetScreenPos().IsOnScreen() || obj.GetType() == typeof(RenderLine))
                    obj.Draw(); //weird after draw
            }
        }

        public static void Add(RenderObject obj)
        {
            Objects.Add(obj);
        }

        public static bool IsNearPlayer(this Vector3 location, float radius)
        {
            return Player.Instance.Position.IsInRange(location, radius);
        }
    }
}


text:
namespace com.kupio.FlowControl
{
    using System;
    using UnityEngine;
#if UNITY_EDITOR
    using UnityEditor;
#endif

    [ExecuteInEditMode]
    [Serializable]
    public class SplinePoint : MonoBehaviour
    {
#if UNITY_EDITOR
        private Vector3 oldPos;
        private Quaternion oldRot;
#endif

        public Vector3 Position
        {
            get
            {
                return transform.position;
            }
            set
            {
                if (transform.position != value)
                {
                    transform.position = value;
                    SendMessageToParent("OnPointChanged");
                }
            }
        }

        [SerializeField]
        private Vector3 m_handleApproach;
        public Vector3 HandleApproach
        {
            get
            {
                return m_handleApproach;
            }
            set
            {
                if (m_handleApproach != value)
                {
                    m_handleApproach = value;
                    HandleDepart = new Vector3(-m_handleApproach.x, -m_handleApproach.y, -m_handleApproach.z);
                    SendMessageToParent("OnPointChanged");
                }
            }
        }

        [SerializeField]
        private Vector3 m_handleDepart;
        public Vector3 HandleDepart
        {
            get
            {
                return m_handleDepart;
            }
            set
            {
                if(m_handleDepart != value)
                {
                    m_handleDepart = value;
                    HandleApproach = new Vector3(-m_handleDepart.x, -m_handleDepart.y, -m_handleDepart.z);
                    SendMessageToParent("OnPointChanged");
                }
            }
        }

        void Awake()
        {
#if UNITY_EDITOR
#endif
        }

        void OnValidate()
        {
            SendMessageToParent("OnPointChanged");
        }

#if UNITY_EDITOR

        public bool ShowSplinePoints
        {
            get
            {
                Spline s = GetComponentInParent<Spline>();
                return (s == null || s.ShowSplines);
            }
        }

        void OnDrawGizmos()
        {
            if (oldPos != transform.position || oldRot != transform.rotation)
            {
                SendMessageToParent("OnPointChanged");
                oldPos = transform.position;
                oldRot = transform.rotation;
            }

            if (!ShowSplinePoints || Selection.activeGameObject == gameObject)
            {
                return;
            }

            Handles.color = Color.yellow;

            Transform t = gameObject.transform;

            Handles.DrawDottedLine(t.TransformPoint(HandleDepart), t.TransformPoint(HandleApproach), 3f);

        }
#endif
        private void SendMessageToParent(string msg)
        {
            Transform pt = this.gameObject.transform.parent;
            if (pt == null)
            {
                return;
            }
            pt.gameObject.SendMessage(msg, SendMessageOptions.DontRequireReceiver);
        }

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="E:\AndroidWorkspace\FnF\ParseStarterProject\src\androidTest\assets"/></dataSet></merger>


text:
package com.cola.web.dashboard.controller;

import com.netflix.appinfo.AmazonInfo;
import com.netflix.appinfo.ApplicationInfoManager;
import com.netflix.appinfo.DataCenterInfo;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.config.ConfigurationManager;
import com.netflix.discovery.shared.Application;
import com.netflix.discovery.shared.Pair;
import com.netflix.eureka.EurekaServerContext;
import com.netflix.eureka.EurekaServerContextHolder;
import com.netflix.eureka.cluster.PeerEurekaNode;
import com.netflix.eureka.registry.PeerAwareInstanceRegistry;
import com.netflix.eureka.registry.PeerAwareInstanceRegistryImpl;
import com.netflix.eureka.resources.StatusResource;
import com.netflix.eureka.util.StatusInfo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import java.net.URI;
import java.util.*;

/**
 * @author Spencer Gibb
 */
@Controller
@RequestMapping("${cola.dashboard.path:/}")
public class DashboardController {

    @Value("${cola.dashboard.path:/}")
    private String dashboardPath = "";

    private ApplicationInfoManager applicationInfoManager;

    public DashboardController(ApplicationInfoManager applicationInfoManager) {
        this.applicationInfoManager = applicationInfoManager;
    }

    @RequestMapping(method = RequestMethod.GET, produces = "text/html")
    public String dashboard(HttpServletRequest request, Map<String, Object> model) {
        populateBase(request, model);
        populateApps(model);
        StatusInfo statusInfo;
        try {
            statusInfo = new StatusResource().getStatusInfo();
        } catch (Exception e) {
            statusInfo = StatusInfo.Builder.newBuilder().isHealthy(false).build();
        }
        model.put("statusInfo", statusInfo);
        populateInstanceInfo(model, statusInfo);
        filterReplicas(model, statusInfo);
        return "dashboard";
    }

    @RequestMapping(value = "/lastn", method = RequestMethod.GET, produces = "text/html")
    public String lastn(HttpServletRequest request, Map<String, Object> model) {
        populateBase(request, model);
        PeerAwareInstanceRegistryImpl registry = (PeerAwareInstanceRegistryImpl) getRegistry();
        ArrayList<Map<String, Object>> lastNCanceled = new ArrayList<>();
        List<Pair<Long, String>> list = registry.getLastNCanceledInstances();
        for (Pair<Long, String> entry : list) {
            lastNCanceled.add(registeredInstance(entry.second(), entry.first()));
        }
        model.put("lastNCanceled", lastNCanceled);
        list = registry.getLastNRegisteredInstances();
        ArrayList<Map<String, Object>> lastNRegistered = new ArrayList<>();
        for (Pair<Long, String> entry : list) {
            lastNRegistered.add(registeredInstance(entry.second(), entry.first()));
        }
        model.put("lastNRegistered", lastNRegistered);
        return "lastn";
    }

    private Map<String, Object> registeredInstance(String id, long date) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("date", new Date(date));
        return map;
    }

    protected void populateBase(HttpServletRequest request, Map<String, Object> model) {
        model.put("time", new Date());
        model.put("basePath", "/");
        model.put("dashboardPath", this.dashboardPath.equals("/") ? ""
                : this.dashboardPath);
        populateHeader(model);
        populateNavbar(request, model);
    }

    private void populateHeader(Map<String, Object> model) {
        model.put("currentTime", StatusResource.getCurrentTimeAsString());
        model.put("upTime", StatusInfo.getUpTime());
        model.put("environment", ConfigurationManager.getDeploymentContext()
                .getDeploymentEnvironment());
        model.put("datacenter", ConfigurationManager.getDeploymentContext()
                .getDeploymentDatacenter());
        PeerAwareInstanceRegistry registry = getRegistry();
        model.put("registry", registry);
        model.put("isBelowRenewThresold", registry.isBelowRenewThresold() == 1);
        DataCenterInfo info = applicationInfoManager.getInfo().getDataCenterInfo();
        if (info.getName() == DataCenterInfo.Name.Amazon) {
            AmazonInfo amazonInfo = (AmazonInfo) info;
            model.put("amazonInfo", amazonInfo);
            model.put("amiId", amazonInfo.get(AmazonInfo.MetaDataKey.amiId));
            model.put("availabilityZone",
                    amazonInfo.get(AmazonInfo.MetaDataKey.availabilityZone));
            model.put("instanceId", amazonInfo.get(AmazonInfo.MetaDataKey.instanceId));
        }
    }

    private PeerAwareInstanceRegistry getRegistry() {
        return getServerContext().getRegistry();
    }

    private EurekaServerContext getServerContext() {
        return EurekaServerContextHolder.getInstance().getServerContext();
    }

    private void populateNavbar(HttpServletRequest request, Map<String, Object> model) {
        Map<String, String> replicas = new LinkedHashMap<>();
        List<PeerEurekaNode> list = getServerContext().getPeerEurekaNodes().getPeerNodesView();
        for (PeerEurekaNode node : list) {
            try {
                URI uri = new URI(node.getServiceUrl());
                String href = scrubBasicAuth(node.getServiceUrl());
                replicas.put(uri.getHost(), href);
            } catch (Exception ex) {
// ignore?
            }
        }
        model.put("replicas", replicas.entrySet());
    }

    private void populateApps(Map<String, Object> model) {
        List<Application> sortedApplications = getRegistry().getSortedApplications();
        ArrayList<Map<String, Object>> apps = new ArrayList<>();
        for (Application app : sortedApplications) {
            LinkedHashMap<String, Object> appData = new LinkedHashMap<>();
            apps.add(appData);
            appData.put("name", app.getName());
            Map<String, Integer> amiCounts = new HashMap<>();
            Map<InstanceInfo.InstanceStatus, List<Pair<String, String>>> instancesByStatus = new HashMap<>();
            Map<String, Integer> zoneCounts = new HashMap<>();
            for (InstanceInfo info : app.getInstances()) {
                String id = info.getId();
                String url = info.getStatusPageUrl();
                InstanceInfo.InstanceStatus status = info.getStatus();
                String ami = "n/a";
                String zone = "";
                if (info.getDataCenterInfo().getName() == DataCenterInfo.Name.Amazon) {
                    AmazonInfo dcInfo = (AmazonInfo) info.getDataCenterInfo();
                    ami = dcInfo.get(AmazonInfo.MetaDataKey.amiId);
                    zone = dcInfo.get(AmazonInfo.MetaDataKey.availabilityZone);
                }
                Integer count = amiCounts.get(ami);
                if (count != null) {
                    amiCounts.put(ami, count + 1);
                } else {
                    amiCounts.put(ami, 1);
                }
                count = zoneCounts.get(zone);
                if (count != null) {
                    zoneCounts.put(zone, count + 1);
                } else {
                    zoneCounts.put(zone, 1);
                }
                List<Pair<String, String>> list = instancesByStatus.get(status);
                if (list == null) {
                    list = new ArrayList<>();
                    instancesByStatus.put(status, list);
                }
                list.add(new Pair<>(id, url));
            }
            appData.put("amiCounts", amiCounts.entrySet());
            appData.put("zoneCounts", zoneCounts.entrySet());
            ArrayList<Map<String, Object>> instanceInfos = new ArrayList<>();
            appData.put("instanceInfos", instanceInfos);
            for (Iterator<Map.Entry<InstanceInfo.InstanceStatus, List<Pair<String, String>>>> iter = instancesByStatus
                    .entrySet().iterator(); iter.hasNext(); ) {
                Map.Entry<InstanceInfo.InstanceStatus, List<Pair<String, String>>> entry = iter
                        .next();
                List<Pair<String, String>> value = entry.getValue();
                InstanceInfo.InstanceStatus status = entry.getKey();
                LinkedHashMap<String, Object> instanceData = new LinkedHashMap<>();
                instanceInfos.add(instanceData);
                instanceData.put("status", entry.getKey());
                ArrayList<Map<String, Object>> instances = new ArrayList<>();
                instanceData.put("instances", instances);
                instanceData.put("isNotUp", status != InstanceInfo.InstanceStatus.UP);

// TODO

				/*
                 * if(status != InstanceInfo.InstanceStatus.UP){
				 * buf.append(""); }
				 * buf.append("").append(status
				 * .name()).append(" (").append(value.size()).append(") - ");
				 * if(status != InstanceInfo.InstanceStatus.UP){
				 * buf.append(""); }
				 */

                for (Pair<String, String> p : value) {
                    LinkedHashMap<String, Object> instance = new LinkedHashMap<>();
                    instances.add(instance);
                    instance.put("id", p.first());
                    String url = p.second();
                    instance.put("url", url);
                    boolean isHref = url != null && url.startsWith("http");
                    instance.put("isHref", isHref);
                    /*
					 * String id = p.first(); String url = p.second(); if(url != null &&
					 * url.startsWith("http")){
					 * buf.append(""); }else { url =
					 * null; } buf.append(id); if(url != null){ buf.append(""); }
					 * buf.append(", ");
					 */
                }
            }
            // out.println("" + buf.toString() + "
");
        }
        model.put("apps", apps);
    }

    private void populateInstanceInfo(Map<String, Object> model, StatusInfo statusInfo) {
        InstanceInfo instanceInfo = statusInfo.getInstanceInfo();
        Map<String, String> instanceMap = new HashMap<>();
        instanceMap.put("ipAddr", instanceInfo.getIPAddr());
        instanceMap.put("status", instanceInfo.getStatus().toString());
        if (instanceInfo.getDataCenterInfo().getName() == DataCenterInfo.Name.Amazon) {
            AmazonInfo info = (AmazonInfo) instanceInfo.getDataCenterInfo();
            instanceMap.put("availability-zone",
                    info.get(AmazonInfo.MetaDataKey.availabilityZone));
            instanceMap.put("public-ipv4", info.get(AmazonInfo.MetaDataKey.publicIpv4));
            instanceMap.put("instance-id", info.get(AmazonInfo.MetaDataKey.instanceId));
            instanceMap.put("public-hostname",
                    info.get(AmazonInfo.MetaDataKey.publicHostname));
            instanceMap.put("ami-id", info.get(AmazonInfo.MetaDataKey.amiId));
            instanceMap.put("instance-type",
                    info.get(AmazonInfo.MetaDataKey.instanceType));
        }
        model.put("instanceInfo", instanceMap);
    }

    protected void filterReplicas(Map<String, Object> model, StatusInfo statusInfo) {
        Map<String, String> applicationStats = statusInfo.getApplicationStats();
        if (applicationStats.get("registered-replicas").contains("@")) {
            applicationStats.put("registered-replicas", scrubBasicAuth(applicationStats.get("registered-replicas")));
        }
        if (applicationStats.get("unavailable-replicas").contains("@")) {
            applicationStats.put("unavailable-replicas", scrubBasicAuth(applicationStats.get("unavailable-replicas")));
        }
        if (applicationStats.get("available-replicas").contains("@")) {
            applicationStats.put("available-replicas", scrubBasicAuth(applicationStats.get("available-replicas")));
        }
        model.put("applicationStats", applicationStats);
    }

    private String scrubBasicAuth(String urlList) {
        String[] urls = urlList.split(",");
        String filteredUrls = "";
        for (String u : urls) {
            if (u.contains("@")) {
                filteredUrls += u.substring(0, u.indexOf("//") + 2) + u.substring(u.indexOf("@") + 1, u.length()) + ",";
            } else {
                filteredUrls += u + ",";
            }
        }
        return filteredUrls.substring(0, filteredUrls.length() - 1);
    }
}


text:
module PuppetX
  # A COI PuppetX module
  module Coi
    # Require relative kernel-like method
    def self.require_relative(relative_path, lvl = 0)
      stack = Kernel.caller
      files = stack.reject { |line| /`require_relative'/.match(line) }
      files = files.map { |line| /(.+):\d+(?:\:in `[^']*')?/.match(line)[1] }
      files = files.uniq
      file = files[lvl]
      file = './' if ['(eval)', '(pry)', ''].include?(file)
      file = File.dirname(file)
      path = File.expand_path(File.join(file, relative_path) + '.rb')
      path = Pathname.new(path).realpath.to_s
      Kernel.require(path)
    end

    # JBoss module
    module Jboss
      # JBoss type module
      module Type
      end
      # JBoss provider module
      module Provider
      end
      # Value object module
      module Value
      end
      # Module that contains internal classes
      module Internal
        # Executor module
        module Executor end
        # Module that contains states
        module State end
      end
    end
  end
end
# Ruby default kernel module
module Kernel
  define_method(:require_relative) { |rel| PuppetX::Coi.require_relative(rel) } unless Kernel.respond_to? :require_relative
end

require_relative 'jboss/hash'
require_relative 'jboss/tail'
require_relative 'jboss/checks'
require_relative 'jboss/constants'
require_relative 'jboss/buildins_utils'
require_relative 'jboss/configuration'
require_relative 'jboss/facts'
require_relative 'jboss/factsrefresher'

require_relative 'jboss/value/try'
require_relative 'jboss/value/command'

require_relative 'jboss/internal/execute_logic'
require_relative 'jboss/internal/executor/shell_executor'
require_relative 'jboss/provider/abstract_jboss_cli'
require_relative 'jboss/internal/sanitizer'
require_relative 'jboss/provider/securitydomain'
require_relative 'jboss/internal/logic_creator'
require_relative 'jboss/internal/execution_state_wrapper'
require_relative 'jboss/internal/cli_executor'
require_relative 'jboss/internal/securitydomain_auditor'
require_relative 'jboss/internal/command_compilator'
require_relative 'jboss/internal/state/execution_state'
require_relative 'jboss/internal/state/securitydomain_state'
require_relative 'jboss/internal/securitydomain_destroyer'

require_relative 'jboss/functions/version_parse'
require_relative 'jboss/functions/validate_method_parameters'
require_relative 'jboss/functions/hash_setvalue'
require_relative 'jboss/functions/member'
require_relative 'jboss/functions/required_java'
require_relative 'jboss/functions/basename'
require_relative 'jboss/functions/dirname'
require_relative 'jboss/functions/short_version'
require_relative 'jboss/functions/to_bool'
require_relative 'jboss/functions/to_i'
require_relative 'jboss/functions/to_s'
require_relative 'jboss/functions/inspect'
require_relative 'jboss/functions/type_version'

require_relative 'jboss/type/meta'
require_relative 'jboss/type/confignode'
require_relative 'jboss/type/datasource'
require_relative 'jboss/type/deploy'
require_relative 'jboss/type/jdbcdriver'
require_relative 'jboss/type/jmsqueue'
require_relative 'jboss/type/resourceadapter'
require_relative 'jboss/type/securitydomain'

require_relative 'jboss/provider/datasource'
require_relative 'jboss/provider/datasource/post_wildfly_provider'
require_relative 'jboss/provider/datasource/pre_wildfly_provider'
require_relative 'jboss/provider/datasource/static'
require_relative 'jboss/provider/confignode'
require_relative 'jboss/provider/resourceadapter'
require_relative 'jboss/provider/deploy'

require_relative 'jboss/provider/securitydomain/abstract_provider'
require_relative 'jboss/provider/securitydomain/post_wildfly_provider'
require_relative 'jboss/provider/securitydomain/pre_wildfly_provider'
require_relative 'jboss/provider/jmsqueue'
require_relative 'jboss/provider/jdbcdriver'


text:
require 'spec_helper'

RSpec.describe Aspector::Advice::Metadata do
  pending
end


text:
package fwk

import (
	"reflect"
)

// OutputStream implements a task writing data to an OutputStreamer.
//
// OutputStream is concurrent-safe.
//
// OutputStream declares a property 'Ports', a []fwk.Port, which will
// be used to declare the input ports the task will access to,
// writing out data via the underlying OutputStreamer.
//
// OutputStream declares a property 'Streamer', a fwk.OutputStreamer,
// which will be used to actually write data to.
type OutputStream struct {
	TaskBase

	streamer OutputStreamer
	ctrl     StreamControl
}

// Configure declares the input ports defined by the 'Ports' property.
func (tsk *OutputStream) Configure(ctx Context) error {
	var err error

	for _, port := range tsk.ctrl.Ports {
		err = tsk.DeclInPort(port.Name, port.Type)
		if err != nil {
			return err
		}
	}

	return err
}

// StartTask starts the OutputStreamer task
func (tsk *OutputStream) StartTask(ctx Context) error {
	var err error

	return err
}

// StopTask stops the OutputStreamer task
func (tsk *OutputStream) StopTask(ctx Context) error {
	var err error

	err = tsk.disconnect()
	return err
}

func (tsk *OutputStream) connect(ctrl StreamControl) error {
	ctrl.Ports = make([]Port, len(tsk.ctrl.Ports))
	copy(ctrl.Ports, tsk.ctrl.Ports)

	tsk.ctrl = ctrl
	err := tsk.streamer.Connect(ctrl.Ports)
	if err != nil {
		return err
	}

	go tsk.write()

	return err
}

func (tsk *OutputStream) disconnect() error {
	return tsk.streamer.Disconnect()
}

func (tsk *OutputStream) write() {
	for {
		select {

		case ctx := <-tsk.ctrl.Ctx:
			tsk.ctrl.Err <- tsk.streamer.Write(ctx)

		case <-tsk.ctrl.Quit:
			return
		}
	}
}

// Process gets data from the store and
// writes it out via the underlying OutputStreamer
func (tsk *OutputStream) Process(ctx Context) error {
	var err error

	tsk.ctrl.Ctx <- ctx
	err = <-tsk.ctrl.Err
	if err != nil {
		return err
	}

	return err
}

func newOutputStream(typ, name string, mgr App) (Component, error) {
	var err error

	tsk := &OutputStream{
		TaskBase: NewTask(typ, name, mgr),
		streamer: nil,
		ctrl: StreamControl{
			Ports: make([]Port, 0),
		},
	}

	err = tsk.DeclProp("Ports", &tsk.ctrl.Ports)
	if err != nil {
		return nil, err
	}

	err = tsk.DeclProp("Streamer", &tsk.streamer)
	if err != nil {
		return nil, err
	}

	return tsk, err
}

func init() {
	Register(reflect.TypeOf(OutputStream{}), newOutputStream)
}


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.
// ----------------------------------------------------------------------------------

using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation;

namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets
{
    /// <summary>
    ///     Represents the New-AzureHDInsightConfig Power Shell Cmdlet.
    /// </summary>
    [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightMapReduceJobDefinition)]
    [OutputType(typeof(AzureHDInsightMapReduceJobDefinition))]
    public class NewAzureHDInsightMapReduceDefinitionCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightMapReduceJobDefinitionBase
    {
        private readonly INewAzureHDInsightMapReduceJobDefinitionCommand command;

        /// <summary>
        ///     Initializes a new instance of the NewAzureHDInsightMapReduceDefinitionCmdlet class.
        /// </summary>
        public NewAzureHDInsightMapReduceDefinitionCmdlet()
        {
            this.command = ServiceLocator.Instance.Locate<IAzureHDInsightCommandFactory>().CreateNewMapReduceDefinition();
        }

        /// <inheritdoc />
        [Parameter(Mandatory = false, HelpMessage = "The arguments for the jobDetails.")]
        [Alias(AzureHdInsightPowerShellConstants.AliasArguments)]
        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")]
        public string[] Arguments
        {
            get { return this.command.Arguments; }
            set { this.command.Arguments = value; }
        }

        /// <inheritdoc />
        [Parameter(Mandatory = true, HelpMessage = "The class name to use for the jobDetails.")]
        [Alias(AzureHdInsightPowerShellConstants.AliasClassName)]
        public string ClassName
        {
            get { return this.command.ClassName; }
            set { this.command.ClassName = value; }
        }

        /// <inheritdoc />
        [Parameter(Mandatory = false, HelpMessage = "The parameters for the jobDetails.")]
        [Alias(AzureHdInsightPowerShellConstants.AliasParameters)]
        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")]
        public Hashtable Defines
        {
            get { return this.command.Defines; }
            set { this.command.Defines = value; }
        }

        /// <inheritdoc />
        [Parameter(Mandatory = false, HelpMessage = "The resources for the jobDetails.")]
        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")]
        public string[] Files
        {
            get { return this.command.Files; }
            set { this.command.Files = value; }
        }

        /// <inheritdoc />
        [Parameter(Mandatory = true, HelpMessage = "The jar file to use for the jobDetails.")]
        [Alias(AzureHdInsightPowerShellConstants.AliasJarFile)]
        public string JarFile
        {
            get { return this.command.JarFile; }
            set { this.command.JarFile = value; }
        }

        /// <inheritdoc />
        [Parameter(Mandatory = false, HelpMessage = "The name of the jobDetails.")]
        [Alias(AzureHdInsightPowerShellConstants.AliasJobName)]
        public string JobName
        {
            get { return this.command.JobName; }
            set { this.command.JobName = value; }
        }

        /// <inheritdoc />
        [Parameter(Mandatory = false, HelpMessage = "The lib jars for the jobDetails.")]
        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")]
        public string[] LibJars
        {
            get { return this.command.LibJars; }
            set { this.command.LibJars = value; }
        }

        /// <inheritdoc />
        [Parameter(Mandatory = false, HelpMessage = "The output location to use for the jobDetails.")]
        public string StatusFolder
        {
            get { return this.command.StatusFolder; }
            set { this.command.StatusFolder = value; }
        }

        /// <summary>
        ///     Finishes the execution of the cmdlet by writing out the config object.
        /// </summary>
        protected override void EndProcessing()
        {
            this.WriteWarning(string.Format(AzureHdInsightPowerShellConstants.AsmWarning, "New-AzureRmHDInsightMapReduceJobDefinition"));
            this.command.EndProcessing().Wait();
            foreach (AzureHDInsightMapReduceJobDefinition output in this.command.Output)
            {
                this.WriteObject(output);
            }
            this.WriteDebugLog();
        }

        /// <inheritdoc />
        protected override void StopProcessing()
        {
            this.command.Cancel();
        }
    }
}


text:
require "binco/version"
require "binco/engine" if defined?(::Rails)


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
N. Z. Jl Bot. 15(4): 743 (1978)

#### Original name
Astrosporina graveolens E. Horak, 1978

### Remarks
null


text:
package ru.job4j.map;

import org.junit.Test;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertThat;

/**
 * Class ownHashMapTest | Task Solution: Make own HashMap implementation [#1008]
 * @author Aleksey Sidorenko (mailto:sidorenko.aleksey@gmail.com)
 * @since 23.09.2018
 */
public class OwnHashMapTest {
    private OwnHashMap<User, String> map = new OwnHashMap<>();

    @Test
    public void whenInsertPairThenGetPairValue() {
        User ivan = new User("Ivan", 1, 1985, 10, 11);
        map.insert(ivan, "Ivan");
        assertThat(map.get(ivan), is("Ivan"));
    }

    @Test
    public void whenInsertTwoPairsWithSameKeysThenGetFalseForSecondPairt() {
        User ivan = new User("Ivan", 1, 1985, 10, 11);
        map.insert(ivan, "Ivan");
        assertThat(map.insert(ivan, "Ivan v2"), is(false));
    }

    @Test
    public void whenInsertPairWithNullKeyThenGetPairValue() {
        map.insert(null, "Ivan");
        assertThat(map.get(null), is("Ivan"));
    }

    @Test
    public void whenDeletePairThenThereIsNoElementInStorage() {
        User ivan = new User("Ivan", 1, 1985, 10, 11);
        map.insert(ivan, "Ivan");
        map.delete(ivan);
        assertThat(map.get(ivan), is(nullValue()));
    }
}


text:
package main

import (
	"fmt"
	"net"
	"net/http"
	"net/http/httptest"
	"net/url"
	"time"
)

//TestPort The port to use for the gatewaty in the SystemUnderTest
const TestPort = 12345

//SystemUnderTest is a facade to start the APISecurityGateway, APISecurityGatewayProxy and a Fake Upstream HTTP API in order to test the solution.
type SystemUnderTest struct {
	APIGateway             APISecurityGateway
	APIGatewayProxy        *httptest.Server
	APIGatewayControlProxy *httptest.Server
	FakeEndpoint           *httptest.Server
	KeyStore               KeyStore
	ResponseBody           string
	ResponseCode           int
	ServerListener         net.Listener
}

//CreateSystemUnderTest takes a KeyStore and returns a pointer to a new instance of a SystemUnderTest
func CreateSystemUnderTest(keyStore KeyStore) *SystemUnderTest {
	instance := &SystemUnderTest{}

	instance.KeyStore = keyStore

	instance.FakeEndpoint = httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		var expectedResponseBody = instance.ResponseBody
		w.WriteHeader(instance.ResponseCode)
		fmt.Fprintln(w, expectedResponseBody)
	}))

	var gatewayProxy = APISecurityGatewayProxy{
		UpStream: fmt.Sprintf(":%d", TestPort),
	}

	instance.APIGatewayProxy = httptest.NewUnstartedServer(gatewayProxy.Handler())
	instance.APIGatewayControlProxy = httptest.NewUnstartedServer(gatewayProxy.ControlHandler())

	return instance
}

//SetResponseBody sets the response which the fake upstream HTTP API will return.
func (instance *SystemUnderTest) SetResponseBody(value string) {
	instance.ResponseBody = value
}

//SetResponseCode sets the response code which the fake upstream HTTP API will return.
func (instance *SystemUnderTest) SetResponseCode(value int) {
	instance.ResponseCode = value
}

//Start starts all the systems under the System Under Test.
func (instance *SystemUnderTest) Start() {
	instance.FakeEndpoint.Start()
	instance.APIGatewayProxy.Start()
	instance.APIGatewayControlProxy.Start()

	serverListener, err := net.Listen("tcp", fmt.Sprintf(":%d", TestPort))
	instance.ServerListener = serverListener

	CheckError(err)

	upStreamURL, _ := url.Parse(instance.FakeEndpoint.URL)
	var gateway = APISecurityGateway{
		UpStream: *upStreamURL,
		KeyStore: instance.KeyStore,
	}
	go gateway.Start(serverListener)
}

//Stop stops all the systems under the System Under Test.
func (instance *SystemUnderTest) Stop() {
	instance.ServerListener.Close()
	instance.FakeEndpoint.Close()
	instance.APIGatewayProxy.Close()
	instance.APIGatewayControlProxy.Close()
	time.Sleep(1 * time.Millisecond)
}


text:
export { arrow } from './arrow';
export { flip } from './flip';
export { initData } from './initData';
export { preventOverflow } from './preventOverflow';
export { shift } from './shift';


text:
namespace NorthwindWindowsStore.Views
{
    using NorthwindWindowsStore.Common;
    using NorthwindWindowsStore.ViewModel;
    using Telerik.UI.Xaml.Controls.Grid;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Navigation;

    /// <summary>
    /// Shippers Main page
    /// </summary>
    public sealed partial class ShippersMain : Page
    {
        private ShipperVM _shippers { get; set; }
        public ShipperVM Shippers
        {
            get
            {
                if (_shippers == null)
                {
                    _shippers = new ShipperVM();
                }
                return _shippers;
            }
        }

        private NavigationHelper navigationHelper;
        private const int MinimumWidthForSupportingTwoPanes = 768;
        public NavigationHelper NavigationHelper
        {
            get { return this.navigationHelper; }
        }

        public ShippersMain()
        {
            this.InitializeComponent();
            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += navigationHelper_LoadState;
            this.navigationHelper.SaveState += navigationHelper_SaveState;
            this.navigationHelper.GoBackCommand = new NorthwindWindowsStore.Common.RelayCommand(() => this.GoBack(), () => this.CanGoBack());

            RadDataGrid grid = this.FindName("ShippersGrid") as RadDataGrid;
            grid.ItemsSource = Shippers.Grid;

            this.InvalidateVisualState();
        }

        private bool UsingLogicalPageNavigation()
        {
            return Window.Current.Bounds.Width < MinimumWidthForSupportingTwoPanes;
        }
        private void InvalidateVisualState()
        {
            var visualState = DetermineVisualState();
            VisualStateManager.GoToState(this, visualState, false);
            this.navigationHelper.GoBackCommand.RaiseCanExecuteChanged();
        }

        private string DetermineVisualState()
        {
            if (!UsingLogicalPageNavigation())
                return "PrimaryView";

            var logicalPageBack = false;

            return logicalPageBack ? "SinglePane_Detail" : "SinglePane";
        }

        private void navigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
        }

        private void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
        {
        }

        private bool CanGoBack()
        {
            return this.navigationHelper.CanGoBack();
        }
        private void GoBack()
        {
            this.navigationHelper.GoBack();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            navigationHelper.OnNavigatedTo(e);
        }

        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            navigationHelper.OnNavigatedFrom(e);
        }
    }
}


text:
/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2004-2008, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 * Created on 31-dic-2004
 */
package org.geotools.geometry.jts.coordinatesequence;

import com.vividsolutions.jts.geom.CoordinateSequence;
import com.vividsolutions.jts.geom.impl.PackedCoordinateSequence;
import com.vividsolutions.jts.geom.impl.PackedCoordinateSequenceFactory;

/**
 * An implementation of a JTS CSBuilder which uses a PackedCoordinateSequence.
 *
 * @author wolf
 *
 *
 * @source $URL$
 */
public abstract class PackedCSBuilder implements CSBuilder {
	int size = -1;

	int dimensions = -1;

	/**
	 * @see org.geotools.geometry.coordinatesequence.CSBuilder#getSize()
	 */
	public int getSize() {
		return size;
	}

	/**
	 * @see org.geotools.geometry.coordinatesequence.CSBuilder#getDimension()
	 */
	public int getDimension() {
		return dimensions;
	}

	public static class Double extends PackedCSBuilder {
		double[] ordinates;

		PackedCoordinateSequenceFactory factory = new PackedCoordinateSequenceFactory(PackedCoordinateSequenceFactory.DOUBLE);

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#start(int,
		 *      int)
		 */
		public void start(int size, int dimensions) {
			ordinates = new double[size * dimensions];
			this.size = size;
			this.dimensions = dimensions;
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#end()
		 */
		public CoordinateSequence end() {
			CoordinateSequence cs = factory.create(ordinates, dimensions);
			ordinates = null;
			size = -1;
			dimensions = -1;
			return cs;
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#setOrdinate(double,
		 *      int, int)
		 */
		public void setOrdinate(double value, int ordinateIndex,
				int coordinateIndex) {
			ordinates[coordinateIndex * dimensions + ordinateIndex] = value;
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#getOrdinate(int,
		 *      int)
		 */
		public double getOrdinate(int ordinateIndex, int coordinateIndex) {
			return ordinates[coordinateIndex * dimensions + ordinateIndex];
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#setOrdinate(com.vividsolutions.jts.geom.CoordinateSequence, double, int, int)
		 */
		public void setOrdinate(CoordinateSequence sequence, double value, int ordinateIndex, int coordinateIndex) {
			PackedCoordinateSequence pcs = (PackedCoordinateSequence) sequence;
			pcs.setOrdinate(coordinateIndex, ordinateIndex, value);
		}

	}

	public static class Float extends PackedCSBuilder {
		float[] ordinates;

		PackedCoordinateSequenceFactory factory = new PackedCoordinateSequenceFactory(PackedCoordinateSequenceFactory.FLOAT);

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#start(int,
		 *      int)
		 */
		public void start(int size, int dimensions) {
			ordinates = new float[size * dimensions];
			this.size = size;
			this.dimensions = dimensions;
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#end()
		 */
		public CoordinateSequence end() {
			CoordinateSequence cs = factory.create(ordinates, dimensions);
			ordinates = null;
			size = -1;
			dimensions = -1;
			return cs;
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#setOrdinate(double,
		 *      int, int)
		 */
		public void setOrdinate(double value, int ordinateIndex,
				int coordinateIndex) {
			ordinates[coordinateIndex * dimensions + ordinateIndex] = (float) value;
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#setOrdinate(com.vividsolutions.jts.geom.CoordinateSequence, double, int, int)
		 */
		public void setOrdinate(CoordinateSequence sequence, double value, int ordinateIndex, int coordinateIndex) {
			PackedCoordinateSequence pcs = (PackedCoordinateSequence) sequence;
			pcs.setOrdinate(coordinateIndex, ordinateIndex, value);
		}

		/**
		 * @see org.geotools.geometry.coordinatesequence.CSBuilder#getOrdinate(int,
		 *      int)
		 */
		public double getOrdinate(int ordinateIndex, int coordinateIndex) {
			return ordinates[coordinateIndex * dimensions + ordinateIndex];
		}

	}

}


text:
/*
 * Created on May 1, 2006
 */
package net.sf.launch4j.formimpl;

import javax.swing.JFileChooser;
import javax.swing.JRadioButton;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import net.sf.launch4j.FileChooserFilter;
import net.sf.launch4j.binding.Bindings;
import net.sf.launch4j.config.Config;
import net.sf.launch4j.form.BasicForm;

/**
 * @author Copyright (C) 2006 Grzegorz Kowal
 */
public class BasicFormImpl extends BasicForm {

	public BasicFormImpl(Bindings bindings, JFileChooser fc) {
		bindings.add("outfile", _outfileField)
				.add("dontWrapJar", _dontWrapJarCheck)
				.add("jar", _jarField)
				.add("manifest", _manifestField)
				.add("icon", _iconField)
				.add("cmdLine", _cmdLineField)
				.add("errTitle", _errorTitleField)
				.add("downloadUrl", _downloadUrlField, Config.DOWNLOAD_URL)
				.add("supportUrl", _supportUrlField)
				.add("chdir", _chdirField, ".")
				.add("priorityIndex", new JRadioButton[] { _normalPriorityRadio,
															_idlePriorityRadio,
															_highPriorityRadio })
				.add("stayAlive", _stayAliveCheck)
				.add("restartOnCrash", _restartOnCrashCheck);

		_dontWrapJarCheck.addChangeListener(new DontWrapJarChangeListener());

		_outfileButton.addActionListener(new BrowseActionListener(true, fc,
				new FileChooserFilter("Windows executables (.exe)", ".exe"),
				_outfileField));
		_jarButton.addActionListener(new BrowseActionListener(false, fc,
				new FileChooserFilter("Jar files", ".jar"), _jarField));
		_manifestButton.addActionListener(new BrowseActionListener(false, fc,
				new FileChooserFilter("Manifest files (.manifest)", ".manifest"),
				_manifestField));
		_iconButton.addActionListener(new BrowseActionListener(false, fc,
				new FileChooserFilter("Icon files (.ico)", ".ico"), _iconField));
	}

	private class DontWrapJarChangeListener implements ChangeListener {

		public void stateChanged(ChangeEvent e) {
			boolean dontWrap = _dontWrapJarCheck.isSelected();
			if (dontWrap)  {
				_jarLabel.setIcon(loadImage("images/asterix-o.gif"));
			    _jarLabel.setText(Messages.getString("jarPath"));
			    _jarField.setToolTipText(Messages.getString("jarPathTip"));
			} else {
				_jarLabel.setIcon(loadImage("images/asterix.gif"));
				_jarLabel.setText(Messages.getString("jar"));
				_jarField.setToolTipText(Messages.getString("jarTip"));
			}
			_jarButton.setEnabled(!dontWrap);
		}
	}
}